/* === TITRE MA VISION === */
.app-title {
    font-family: 'Cormorant Garamond', Georgia, serif !important;
    font-size: 2.2rem !important;
    font-weight: 500 !important;
    letter-spacing: 0.12em !important;
    text-transform: uppercase !important;
    background: linear-gradient(135deg, var(--accent-light, #f0c850) 0%, var(--accent, #daa520) 50%, var(--accent-light, #f0c850) 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}

/* === INPUT TÂCHE - SIMPLE === */
.task-input-section {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-card);
    border-radius: 12px;
    margin-bottom: 20px;
}
#task-input {
    flex: 1;
    min-width: 200px;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-primary);
    color: var(--text);
    font-size: 1rem;
}
#task-input:focus {
    border-color: var(--accent);
    outline: none;
}
/* === SELECTS PREMIUM === */
.task-input-section select {
    padding: 12px 20px;
    padding-right: 36px;
    border-radius: 12px;
    border: 2px solid var(--accent-muted, rgba(224, 120, 64, 0.25));
    background-color: var(--bg-secondary, #1a1a1f);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23e07840' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    color: var(--text-primary, #ffffff);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.task-input-section select:hover {
    border-color: var(--accent);
    box-shadow: 0 6px 25px var(--accent-glow, rgba(224, 120, 64, 0.35));
    transform: translateY(-2px);
    background-color: var(--bg-tertiary, #252528);
}

.task-input-section select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-muted), 0 6px 25px var(--accent-glow, transparent);
    outline: none;
}

/* Options du dropdown - fond sombre lisible */
.task-input-section select option {
    background: var(--bg-secondary, #1a1a1f) !important;
    color: var(--text-primary, #ffffff) !important;
    padding: 12px 16px;
    font-weight: 500;
}
.task-input-section select option:hover,
.task-input-section select option:checked {
    background: linear-gradient(135deg, var(--accent-muted, rgba(224, 120, 64, 0.3)) 0%, var(--accent-muted, rgba(224, 120, 64, 0.2)) 100%) !important;
    color: var(--text-primary, #ffffff) !important;
}

/* Style PREMIUM pour select de priorité */
#priority-select {
    background-color: var(--bg-secondary, #1f1a18);
    border: 2px solid var(--accent-muted, rgba(224, 120, 64, 0.4));
    box-shadow: 0 4px 20px var(--accent-glow, rgba(224, 120, 64, 0.2));
}

#priority-select:hover {
    background-color: var(--bg-tertiary, #2a2320);
    border-color: var(--accent, #e07840);
    box-shadow: 0 8px 30px var(--accent-glow, rgba(224, 120, 64, 0.4));
}

/* Style PREMIUM pour select assignation */
#assign-select {
    background-color: var(--bg-secondary, #1a1a1f);
    border: 2px solid rgba(100, 116, 139, 0.4);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
}

#assign-select:hover {
    background-color: var(--bg-tertiary, #252528);
    border-color: rgba(148, 163, 184, 0.6);
    box-shadow: 0 6px 20px rgba(100, 116, 139, 0.25);
}
#add-task-btn {
    padding: 12px 20px;
    font-weight: 600;
    border-radius: 10px;
}

/* === BOUTON SUPPRESSION PROJET === */
.chip-delete {
    display: none;
    margin-left: 6px;
    padding: 2px 6px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    font-size: 0.9rem;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s;
}
.project-chip:hover .chip-delete {
    display: inline-block;
}
.chip-delete:hover {
    background: #ef4444;
    color: white;
    transform: scale(1.1);
}

/* === FILTRE UTILISATEUR - Élégant === */
.user-filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    background: var(--bg-card);
    border-radius: 25px;
    margin-bottom: 16px;
    width: fit-content;
    border: 1px solid var(--border);
    box-shadow: 0 2px 12px var(--accent-glow, transparent);
}
.user-filter-bar label {
    font-size: 0.85rem;
    color: var(--text-muted);
}
/* === CUSTOM USER SELECT DROPDOWN === */
.custom-user-select {
    position: relative;
}
.custom-select-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    border-radius: 12px;
    border: 2px solid var(--accent-muted, rgba(224, 120, 64, 0.3));
    background-color: var(--bg-secondary, #1a1a1f);
    color: var(--text-primary, #ffffff);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}
.custom-select-btn:hover {
    background-color: var(--bg-tertiary, #252528);
    border-color: var(--accent);
    box-shadow: 0 4px 15px var(--accent-glow, rgba(224, 120, 64, 0.25));
}
.custom-select-btn .select-avatar {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.custom-select-btn .select-avatar img {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
}
.custom-select-btn .select-arrow {
    font-size: 0.7rem;
    color: var(--accent);
    transition: transform 0.2s;
}
.custom-user-select.open .select-arrow {
    transform: rotate(180deg);
}
.custom-select-options {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 4px;
    min-width: 100%;
    background: var(--bg-secondary, #1a1a1f);
    border: 2px solid var(--accent-muted, rgba(224, 120, 64, 0.3));
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}
.custom-user-select.open .custom-select-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.custom-select-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.2s;
    color: var(--text-primary, #ffffff);
    font-weight: 500;
}
.custom-select-option:first-child {
    border-radius: 10px 10px 0 0;
}
.custom-select-option:last-child {
    border-radius: 0 0 10px 10px;
}
.custom-select-option:hover {
    background: var(--accent-muted, rgba(224, 120, 64, 0.2));
}
.custom-select-option.active {
    background: var(--accent-muted, rgba(224, 120, 64, 0.3));
}
.custom-select-option img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}
.custom-select-option .option-emoji {
    font-size: 1.1rem;
}

/* === BOUTON URGENT (Gyrophare) === */
.urgent-filter-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 2px solid rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.08);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: visible;
}
.gyrophare-icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
    transition: all 0.3s ease;
    filter: drop-shadow(0 0 3px rgba(239, 68, 68, 0.5));
}
.urgent-filter-btn:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: #ef4444;
    transform: scale(1.1);
}
.urgent-filter-btn:hover .gyrophare-icon {
    filter: drop-shadow(0 0 8px rgba(239, 68, 68, 0.8));
}
/* Mode URGENT (Rouge) */
.urgent-filter-btn.mode-urgent {
    background: radial-gradient(circle, rgba(239, 68, 68, 0.3) 0%, rgba(220, 38, 38, 0.15) 100%);
    border-color: #ef4444;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.6), 0 0 40px rgba(239, 68, 68, 0.3);
    animation: gyroGlowRed 1.2s ease-in-out infinite;
}
.urgent-filter-btn.mode-urgent .gyrophare-icon {
    animation: gyroSpin 0.8s linear infinite;
    filter: drop-shadow(0 0 12px rgba(239, 68, 68, 1)) drop-shadow(0 0 25px rgba(255, 100, 100, 0.8));
}
.urgent-filter-btn.mode-urgent .urgent-particles::before,
.urgent-filter-btn.mode-urgent .urgent-particles::after {
    background: radial-gradient(circle, #ff6b6b 0%, transparent 70%);
}
@keyframes gyroGlowRed {
    0%, 100% { box-shadow: 0 0 20px rgba(239, 68, 68, 0.6), 0 0 40px rgba(239, 68, 68, 0.3); }
    50% { box-shadow: 0 0 35px rgba(239, 68, 68, 0.8), 0 0 60px rgba(239, 68, 68, 0.5); }
}

/* Mode NORMAL (Bleu) */
.urgent-filter-btn.mode-normal {
    background: radial-gradient(circle, rgba(59, 130, 246, 0.3) 0%, rgba(37, 99, 235, 0.15) 100%);
    border-color: #3b82f6;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.6), 0 0 40px rgba(59, 130, 246, 0.3);
    animation: gyroGlowBlue 1.2s ease-in-out infinite;
}
.urgent-filter-btn.mode-normal .gyrophare-icon {
    animation: gyroSpin 1s linear infinite;
    filter: drop-shadow(0 0 12px rgba(59, 130, 246, 1)) drop-shadow(0 0 25px rgba(100, 150, 255, 0.8));
}
.urgent-filter-btn.mode-normal .urgent-particles::before,
.urgent-filter-btn.mode-normal .urgent-particles::after {
    background: radial-gradient(circle, #60a5fa 0%, transparent 70%);
}
@keyframes gyroGlowBlue {
    0%, 100% { box-shadow: 0 0 20px rgba(59, 130, 246, 0.6), 0 0 40px rgba(59, 130, 246, 0.3); }
    50% { box-shadow: 0 0 35px rgba(59, 130, 246, 0.8), 0 0 60px rgba(59, 130, 246, 0.5); }
}

/* Mode ZEN (Blanc) */
.urgent-filter-btn.mode-zen {
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, rgba(200, 200, 200, 0.15) 100%);
    border-color: #e5e5e5;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.6), 0 0 40px rgba(255, 255, 255, 0.3);
    animation: gyroGlowWhite 1.5s ease-in-out infinite;
}
.urgent-filter-btn.mode-zen .gyrophare-icon {
    animation: gyroFloat 2s ease-in-out infinite;
    filter: drop-shadow(0 0 12px rgba(255, 255, 255, 1)) drop-shadow(0 0 25px rgba(220, 220, 255, 0.8));
}
.urgent-filter-btn.mode-zen .urgent-particles::before,
.urgent-filter-btn.mode-zen .urgent-particles::after {
    background: radial-gradient(circle, #ffffff 0%, transparent 70%);
}
@keyframes gyroGlowWhite {
    0%, 100% { box-shadow: 0 0 20px rgba(255, 255, 255, 0.5), 0 0 40px rgba(255, 255, 255, 0.2); }
    50% { box-shadow: 0 0 30px rgba(255, 255, 255, 0.7), 0 0 50px rgba(255, 255, 255, 0.4); }
}
@keyframes gyroFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}
@keyframes gyroSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
/* Particules feu follet */
.urgent-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}
.urgent-filter-btn.active .urgent-particles {
    opacity: 1;
}
.urgent-filter-btn.active .urgent-particles::before,
.urgent-filter-btn.active .urgent-particles::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    background: radial-gradient(circle, #ff6b6b 0%, transparent 70%);
    border-radius: 50%;
    animation: firefly 2s ease-in-out infinite;
}
.urgent-filter-btn.active .urgent-particles::before {
    top: -8px;
    left: 50%;
    animation-delay: 0s;
}
.urgent-filter-btn.active .urgent-particles::after {
    bottom: -8px;
    right: 0;
    animation-delay: 1s;
}
@keyframes firefly {
    0%, 100% { opacity: 0; transform: translate(0, 0) scale(0.5); }
    25% { opacity: 1; transform: translate(-5px, -10px) scale(1); }
    50% { opacity: 0.7; transform: translate(5px, -15px) scale(0.8); }
    75% { opacity: 0.3; transform: translate(-3px, -20px) scale(0.5); }
}

/* === BULLES === */
body .bubble {
    padding: 16px 20px !important;
    border-radius: 16px !important;
    cursor: pointer !important;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
    background: var(--bubble-bg, linear-gradient(145deg, rgba(224, 120, 64, 0.2) 0%, rgba(180, 80, 40, 0.1) 100%)) !important;
    border: 2px solid var(--bubble-border, rgba(224, 120, 64, 0.4)) !important;
    box-shadow: var(--bubble-glow, 0 4px 20px rgba(224, 120, 64, 0.2)) !important;
}
body .bubble:hover {
    transform: translateY(-4px) scale(1.02) !important;
}

body .bubble .bubble-text {
    color: var(--text-primary, #ffffff) !important;
    font-size: 1.05rem !important;
    line-height: 1.4 !important;
    font-weight: 600 !important;
}

body .bubble .bubble-description {
    color: var(--bubble-text-muted, #444) !important;
    font-size: 0.85rem !important;
    line-height: 1.4 !important;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed rgba(0,0,0,0.2);
    font-style: normal;
}

body .bubble.inprogress {
    background: var(--bubble-inprogress-bg, linear-gradient(145deg, rgba(251, 191, 36, 0.5) 0%, rgba(249, 115, 22, 0.3) 100%)) !important;
    border: 2px solid var(--bubble-inprogress-border, rgba(251, 191, 36, 0.8)) !important;
    box-shadow: var(--bubble-inprogress-glow, 0 0 25px rgba(251, 191, 36, 0.5)) !important;
    animation: glowPulse 2.5s ease-in-out infinite !important;
}

body .bubble.done {
    background: var(--bubble-done-bg, linear-gradient(145deg, rgba(34, 197, 94, 0.35) 0%, rgba(22, 163, 74, 0.2) 100%)) !important;
    border: 2px solid var(--bubble-done-border, rgba(34, 197, 94, 0.5)) !important;
}
body .bubble.done .bubble-text {
    text-decoration: line-through !important;
    opacity: 0.6 !important;
}

/* === TEXTE VISIBLE PARTOUT === */
.bubble .bubble-text,
.bubble.inprogress .bubble-text,
.bubble.done .bubble-text {
    color: var(--text-primary, #ffffff) !important;
}

[data-theme="matrix"] .bubble .bubble-description,
[data-theme="midnight"] .bubble .bubble-description,
[data-theme="hacker"] .bubble .bubble-description,
[data-theme="fantasy"] .bubble .bubble-description,
[data-theme="ocean"] .bubble .bubble-description,
[data-theme="forest"] .bubble .bubble-description {
    color: #aaa !important;
}

[data-theme="matrix"] .bubble {
    background: linear-gradient(145deg, rgba(0, 255, 102, 0.15) 0%, rgba(0, 180, 70, 0.1) 100%) !important;
    border-color: rgba(0, 255, 102, 0.4) !important;
}
[data-theme="matrix"] .bubble.inprogress {
    background: linear-gradient(145deg, rgba(0, 255, 102, 0.3) 0%, rgba(0, 200, 80, 0.2) 100%) !important;
    border-color: rgba(0, 255, 102, 0.7) !important;
    box-shadow: 0 0 25px rgba(0, 255, 102, 0.4) !important;
}
[data-theme="matrix"] .bubble.done {
    background: linear-gradient(145deg, rgba(0, 255, 102, 0.1) 0%, rgba(0, 150, 60, 0.08) 100%) !important;
    border-color: rgba(0, 255, 102, 0.3) !important;
}

[data-theme="midnight"] .bubble {
    background: linear-gradient(145deg, rgba(100, 130, 255, 0.15) 0%, rgba(80, 100, 200, 0.1) 100%) !important;
    border-color: rgba(100, 130, 255, 0.4) !important;
}
[data-theme="midnight"] .bubble.inprogress {
    background: linear-gradient(145deg, rgba(100, 130, 255, 0.3) 0%, rgba(80, 100, 200, 0.2) 100%) !important;
    border-color: rgba(100, 130, 255, 0.7) !important;
}

[data-theme="hacker"] .bubble {
    background: linear-gradient(145deg, rgba(0, 255, 0, 0.1) 0%, rgba(0, 200, 0, 0.05) 100%) !important;
    border-color: rgba(0, 255, 0, 0.3) !important;
}
[data-theme="hacker"] .bubble.inprogress {
    background: linear-gradient(145deg, rgba(0, 255, 0, 0.2) 0%, rgba(0, 200, 0, 0.15) 100%) !important;
    border-color: rgba(0, 255, 0, 0.6) !important;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.3) !important;
}

[data-theme="fantasy"] .bubble {
    background: linear-gradient(145deg, rgba(191, 107, 255, 0.2) 0%, rgba(140, 80, 200, 0.1) 100%) !important;
    border-color: rgba(191, 107, 255, 0.4) !important;
}
[data-theme="fantasy"] .bubble.inprogress {
    background: linear-gradient(145deg, rgba(191, 107, 255, 0.35) 0%, rgba(140, 80, 200, 0.2) 100%) !important;
    border-color: rgba(191, 107, 255, 0.7) !important;
    box-shadow: 0 0 25px rgba(191, 107, 255, 0.4) !important;
}

/* Texte NOIR sur thèmes CLAIRS pour lisibilité */
[data-theme="ivory"] .bubble .bubble-text,
[data-theme="ivory"] .bubble.inprogress .bubble-text,
[data-theme="ivory"] .bubble.done .bubble-text,
[data-theme="ivory"] .task-bubble .task-text,
[data-theme="ivory"] .task-bubble.inprogress .task-text,
[data-theme="ivory"] .task-bubble.done .task-text,
[data-theme="sakura"] .bubble .bubble-text,
[data-theme="sakura"] .bubble.inprogress .bubble-text,
[data-theme="sakura"] .bubble.done .bubble-text,
[data-theme="sakura"] .task-bubble .task-text,
[data-theme="sakura"] .task-bubble.inprogress .task-text,
[data-theme="sakura"] .task-bubble.done .task-text,
[data-theme="pastel"] .bubble .bubble-text,
[data-theme="pastel"] .bubble.inprogress .bubble-text,
[data-theme="pastel"] .bubble.done .bubble-text,
[data-theme="pastel"] .task-bubble .task-text,
[data-theme="pastel"] .task-bubble.inprogress .task-text,
[data-theme="pastel"] .task-bubble.done .task-text,
[data-theme="mint"] .bubble .bubble-text,
[data-theme="mint"] .bubble.inprogress .bubble-text,
[data-theme="mint"] .bubble.done .bubble-text,
[data-theme="mint"] .task-bubble .task-text,
[data-theme="mint"] .task-bubble.inprogress .task-text,
[data-theme="mint"] .task-bubble.done .task-text,
[data-theme="paper"] .bubble .bubble-text,
[data-theme="paper"] .bubble.inprogress .bubble-text,
[data-theme="paper"] .bubble.done .bubble-text,
[data-theme="paper"] .task-bubble .task-text,
[data-theme="paper"] .task-bubble.inprogress .task-text,
[data-theme="paper"] .task-bubble.done .task-text,
[data-theme="porcelain"] .bubble .bubble-text,
[data-theme="porcelain"] .bubble.inprogress .bubble-text,
[data-theme="porcelain"] .bubble.done .bubble-text,
[data-theme="porcelain"] .task-bubble .task-text,
[data-theme="porcelain"] .task-bubble.inprogress .task-text,
[data-theme="porcelain"] .task-bubble.done .task-text,
[data-theme="zen"] .bubble .bubble-text,
[data-theme="zen"] .bubble.inprogress .bubble-text,
[data-theme="zen"] .bubble.done .bubble-text,
[data-theme="zen"] .task-bubble .task-text,
[data-theme="zen"] .task-bubble.inprogress .task-text,
[data-theme="zen"] .task-bubble.done .task-text,
[data-theme="watercolor"] .bubble .bubble-text,
[data-theme="watercolor"] .bubble.inprogress .bubble-text,
[data-theme="watercolor"] .bubble.done .bubble-text,
[data-theme="watercolor"] .task-bubble .task-text,
[data-theme="watercolor"] .task-bubble.inprogress .task-text,
[data-theme="watercolor"] .task-bubble.done .task-text,
[data-theme="nordic"] .bubble .bubble-text,
[data-theme="nordic"] .bubble.inprogress .bubble-text,
[data-theme="nordic"] .bubble.done .bubble-text,
[data-theme="nordic"] .task-bubble .task-text,
[data-theme="nordic"] .task-bubble.inprogress .task-text,
[data-theme="nordic"] .task-bubble.done .task-text,
[data-theme="printemps"] .bubble .bubble-text,
[data-theme="printemps"] .bubble.inprogress .bubble-text,
[data-theme="printemps"] .bubble.done .bubble-text,
[data-theme="printemps"] .task-bubble .task-text,
[data-theme="printemps"] .task-bubble.inprogress .task-text,
[data-theme="printemps"] .task-bubble.done .task-text,
[data-theme="ete"] .bubble .bubble-text,
[data-theme="ete"] .bubble.inprogress .bubble-text,
[data-theme="ete"] .bubble.done .bubble-text,
[data-theme="ete"] .task-bubble .task-text,
[data-theme="ete"] .task-bubble.inprogress .task-text,
[data-theme="ete"] .task-bubble.done .task-text,
[data-theme="pearl"] .bubble .bubble-text,
[data-theme="pearl"] .bubble.inprogress .bubble-text,
[data-theme="pearl"] .bubble.done .bubble-text,
[data-theme="pearl"] .task-bubble .task-text,
[data-theme="pearl"] .task-bubble.inprogress .task-text,
[data-theme="pearl"] .task-bubble.done .task-text,
[data-theme="snow"] .bubble .bubble-text,
[data-theme="snow"] .bubble.inprogress .bubble-text,
[data-theme="snow"] .bubble.done .bubble-text,
[data-theme="snow"] .task-bubble .task-text,
[data-theme="snow"] .task-bubble.inprogress .task-text,
[data-theme="snow"] .task-bubble.done .task-text,
[data-theme="bamboo"] .bubble .bubble-text,
[data-theme="bamboo"] .bubble.inprogress .bubble-text,
[data-theme="bamboo"] .bubble.done .bubble-text,
[data-theme="bamboo"] .task-bubble .task-text,
[data-theme="bamboo"] .task-bubble.inprogress .task-text,
[data-theme="bamboo"] .task-bubble.done .task-text,
[data-theme="provence"] .bubble .bubble-text,
[data-theme="provence"] .bubble.inprogress .bubble-text,
[data-theme="provence"] .bubble.done .bubble-text,
[data-theme="provence"] .task-bubble .task-text,
[data-theme="provence"] .task-bubble.inprogress .task-text,
[data-theme="provence"] .task-bubble.done .task-text,
[data-theme="academie"] .bubble .bubble-text,
[data-theme="academie"] .bubble.inprogress .bubble-text,
[data-theme="academie"] .bubble.done .bubble-text,
[data-theme="academie"] .task-bubble .task-text,
[data-theme="academie"] .task-bubble.inprogress .task-text,
[data-theme="academie"] .task-bubble.done .task-text {
    color: var(--text, #1a1a1a) !important;
    font-weight: 600 !important;
    text-shadow: none !important;
}

/* Texte blanc sur thèmes sombres */
[data-theme="bubblegum"] .bubble .bubble-text,
[data-theme="sunset"] .bubble .bubble-text {
    color: #ffffff !important;
}

@keyframes glowPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.92; }
}

/* === BOUTON EDIT (CRAYON) === */
.bubble .edit-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0,0,0,0.1);
    border: none;
    border-radius: 6px;
    padding: 4px 8px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
    font-size: 0.8rem;
}
.bubble:hover .edit-btn { opacity: 1; }
.bubble .edit-btn:hover { background: rgba(0,0,0,0.2); }
.bubble .edit-btn.has-note { opacity: 0.7; }
.bubble .edit-btn.has-note::after {
    content: '•';
    color: #e07840;
    font-size: 1.2rem;
    position: absolute;
    top: -4px;
    right: -2px;
}

[data-theme="matrix"] .bubble .edit-btn,
[data-theme="midnight"] .bubble .edit-btn,
[data-theme="hacker"] .bubble .edit-btn,
[data-theme="fantasy"] .bubble .edit-btn,
[data-theme="ocean"] .bubble .edit-btn,
[data-theme="forest"] .bubble .edit-btn {
    background: rgba(255,255,255,0.15);
}
[data-theme="matrix"] .bubble .edit-btn:hover,
[data-theme="midnight"] .bubble .edit-btn:hover,
[data-theme="hacker"] .bubble .edit-btn:hover,
[data-theme="fantasy"] .bubble .edit-btn:hover,
[data-theme="ocean"] .bubble .edit-btn:hover,
[data-theme="forest"] .bubble .edit-btn:hover {
    background: rgba(255,255,255,0.25);
}
[data-theme="matrix"] .bubble .edit-btn.has-note::after { color: #00ff66; }
[data-theme="hacker"] .bubble .edit-btn.has-note::after { color: #00ff00; }

/* === EDIT TASK MODAL - CENTERED OVERLAY === */
/* ALWAYS hidden by default - only JS can show it via .modal-visible class */
#edit-task-modal {
    display: none !important;
    position: fixed !important;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}
/* CRITICAL: Force hide on startup, only show when explicitly requested */
#edit-task-modal {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Only visible when JS explicitly adds modal-visible class */
#edit-task-modal.modal-visible {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}
/* === MODAL LARGE (task edit, reports) === */
.modal-box.modal-box-large {
    max-width: 620px;
    width: 94%;
    max-height: 85vh;
    overflow-y: auto;
    padding: 32px;
    text-align: left;
    scrollbar-width: thin;
    scrollbar-color: var(--accent, #daa520) transparent;
}
.modal-box.modal-box-large::-webkit-scrollbar {
    width: 6px;
}
.modal-box.modal-box-large::-webkit-scrollbar-track {
    background: transparent;
}
.modal-box.modal-box-large::-webkit-scrollbar-thumb {
    background: var(--accent, #daa520);
    border-radius: 3px;
}
.modal-box-large h3 {
    font-size: 1.4rem;
    margin-bottom: 20px;
    color: var(--text-primary, #fff);
    text-align: center;
    font-weight: 700;
}
.modal-box-large .modal-input {
    font-size: 1.05rem;
    padding: 14px 18px;
    width: 100%;
    box-sizing: border-box;
    background: var(--bg-primary, rgba(0, 0, 0, 0.3));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    color: var(--text-primary, #fff);
    margin-bottom: 14px;
}
.modal-box-large .modal-input:focus {
    outline: none;
    border-color: var(--accent, #daa520);
    box-shadow: 0 0 0 3px rgba(218, 165, 32, 0.2);
}

/* === LOGIN SCREEN CINÉMATIQUE === */

/* === PREMIUM REPORT MODALS === */
.modal-box.modal-box-premium,
.modal-box.modal-box-results {
    max-width: 620px;
    width: 94%;
    max-height: 88vh;
    overflow-y: auto;
    text-align: left;
    scrollbar-width: thin;
    scrollbar-color: var(--accent, #daa520) transparent;
}

/* Particules flottantes dorées */
.login-screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(2px 2px at 20% 30%, rgba(255, 200, 100, 0.8) 0%, transparent 100%),
        radial-gradient(2px 2px at 40% 70%, rgba(255, 215, 0, 0.6) 0%, transparent 100%),
        radial-gradient(3px 3px at 60% 20%, rgba(255, 180, 80, 0.7) 0%, transparent 100%),
        radial-gradient(2px 2px at 80% 50%, rgba(255, 200, 100, 0.5) 0%, transparent 100%),
        radial-gradient(3px 3px at 10% 80%, rgba(255, 215, 0, 0.6) 0%, transparent 100%),
        radial-gradient(2px 2px at 90% 90%, rgba(255, 180, 80, 0.4) 0%, transparent 100%);
    animation: floatingParticles 15s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes floatingParticles {
    0%, 100% { transform: translateY(0) translateX(0); opacity: 0.6; }
    25% { transform: translateY(-20px) translateX(10px); opacity: 1; }
    50% { transform: translateY(-10px) translateX(-10px); opacity: 0.8; }
    75% { transform: translateY(-30px) translateX(5px); opacity: 1; }
}

/* Animation d'entrée cinématique pour le logo - FLUIDE */
.login-logo {
    opacity: 0;
    animation: logoEntrance 1.8s cubic-bezier(0.22, 1, 0.36, 1) 0.2s forwards !important;
}

@keyframes logoEntrance {
    0% {
        transform: scale(0.3);
        opacity: 0;
        filter: blur(15px);
    }
    60% {
        transform: scale(1.02);
        opacity: 1;
        filter: blur(0);
    }
    100% {
        transform: scale(1);
        opacity: 1;
        filter: blur(0);
    }
}

/* Animation titre - Effet WOW spectaculaire et fluide */
.login-container h1 {
    opacity: 0;
    animation: titleWow 1.2s cubic-bezier(0.22, 1, 0.36, 1) 1.2s forwards !important;
    background: linear-gradient(135deg, #fff 0%, #ffd700 25%, #ff8c00 50%, #ffd700 75%, #fff 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
}

@keyframes titleWow {
    0% {
        opacity: 0;
        transform: translateY(25px) scale(0.9);
        filter: blur(8px);
        background-position: 200% center;
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
        background-position: 0% center;
    }
}

/* Glow animé sur le titre */
.login-container h1::after {
    content: 'ProductiveApp';
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    background: inherit;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: blur(8px);
    opacity: 0.5;
    z-index: -1;
    animation: titleGlow 2s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    0% { opacity: 0.3; filter: blur(8px); }
    100% { opacity: 0.6; filter: blur(12px); }
}

.login-container {
    position: relative;
}

/* Sous-titre - fluide après titre */
.login-container > p {
    opacity: 0;
    animation: fadeInSlow 0.8s cubic-bezier(0.22, 1, 0.36, 1) 2s forwards !important;
}

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

/* === CARROUSEL UTILISATEURS - PIÉDESTAL === */
.user-carousel {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin-top: 30px;
    opacity: 0;
    animation: carouselAppear 0.8s cubic-bezier(0.22, 1, 0.36, 1) 2.5s forwards;
    position: relative;
}

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

.carousel-arrow {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid rgba(255, 200, 100, 0.3);
    background: rgba(0, 0, 0, 0.4);
    color: rgba(255, 200, 100, 0.7);
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    z-index: 10;
}

.carousel-arrow:hover {
    background: var(--accent-muted);
    border-color: var(--accent-light);
    color: var(--text);
    transform: scale(1.15);
    box-shadow: 0 0 25px var(--accent-glow, transparent);
}

/* Conteneur piédestal - UN SEUL profil visible */
.user-select-grid {
    display: flex !important;
    gap: 0 !important;
    padding: 30px !important;
    overflow: hidden !important;
    scroll-behavior: smooth;
    width: 220px !important;
    justify-content: center;
    position: relative;
}

/* Léger glow subtil autour du piédestal - PAS de carré */
.user-select-grid::before {
    display: none;
}

/* Profil sur piédestal avec ZOOM */
/* Profil sans cadre - juste l'icône */
.user-select-btn {
    min-width: 180px !important;
    flex-shrink: 0 !important;
    opacity: 0;
    display: none;
    transform: scale(1.1);
    position: relative;
    z-index: 5;
    box-shadow: none !important;
    border: none !important;
    background: transparent !important;
    border-radius: 0 !important;
    padding: 20px !important;
}

.user-select-btn:hover {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* Animation d'entrée du premier profil */
@keyframes cardReveal {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.8);
        filter: blur(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1.1);
        filter: blur(0);
    }
}

/* Animations de glissement gauche/droite */
@keyframes slideInFromRight {
    0% { opacity: 0; transform: translateX(100px) scale(0.8); }
    100% { opacity: 1; transform: translateX(0) scale(1.1); }
}

@keyframes slideInFromLeft {
    0% { opacity: 0; transform: translateX(-100px) scale(0.8); }
    100% { opacity: 1; transform: translateX(0) scale(1.1); }
}

@keyframes slideOutToLeft {
    0% { opacity: 1; transform: translateX(0) scale(1.1); }
    100% { opacity: 0; transform: translateX(-100px) scale(0.8); }
}

@keyframes slideOutToRight {
    0% { opacity: 1; transform: translateX(0) scale(1.1); }
    100% { opacity: 0; transform: translateX(100px) scale(0.8); }
}

/* Glow et shimmer désactivés */
.user-select-btn::before,
.user-select-btn::after {
    display: none !important;
}

/* Container pour l'avatar et ses particules */
.avatar-orbit-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 160px;
    height: 160px;
}

/* Images avatars login avec léger glow subtil */
.user-avatar-img-login {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    z-index: 2;
    /* Léger glow doré subtil */
    filter: drop-shadow(0 0 12px rgba(255, 200, 100, 0.35));
}

.user-select-btn:hover .user-avatar-img-login {
    transform: scale(1.08);
    filter: drop-shadow(0 0 18px rgba(255, 200, 100, 0.5));
}

/* Conteneur des particules de souffle */
.fire-breath-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    pointer-events: none;
    z-index: 1;
}

/* Particule de souffle de feu */
.breath-particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
}

/* === BULLES DE FEU TRAVERSANTES === */
.fire-bubbles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.fire-bubble {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    animation: fireBubbleTraverse linear forwards;
}

/* Animation traverse de gauche à droite */
@keyframes fireBubbleTraverse {
    0% {
        transform: translateX(-100px) scale(0.5);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateX(calc(100vw + 100px)) scale(0.5);
        opacity: 0;
    }
}

/* Animation traverse de droite à gauche */
@keyframes fireBubbleTraverseReverse {
    0% {
        transform: translateX(calc(100vw + 100px)) scale(0.5);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateX(-100px) scale(0.5);
        opacity: 0;
    }
}

/* === MODAL TEXTAREA === */
.modal-textarea {
    width: 100%;
    padding: 16px 18px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: var(--bg-primary, rgba(0, 0, 0, 0.3));
    color: var(--text);
    font-size: 1rem;
    line-height: 1.7;
    resize: vertical;
    min-height: 180px;
    margin-bottom: 16px;
    font-family: inherit;
    box-sizing: border-box;
    transition: all 0.3s ease;
}
.modal-textarea:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 3px var(--accent-glow, rgba(224, 120, 64, 0.15));
    background: var(--bg-secondary, rgba(0, 0, 0, 0.4));
}
.modal-textarea::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

/* === SÉLECTEURS PROJET/USER === */
.modal-selects-row {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}
.modal-select-group { flex: 1; }
.modal-select-group label {
    display: block;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 6px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.modal-select {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: var(--bg-primary, rgba(0, 0, 0, 0.3));
    color: var(--text);
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
}
.modal-select:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 3px var(--accent-glow, rgba(99, 102, 241, 0.15));
}

/* === MODAL STATUS ACTIONS === */
.modal-status-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.modal-action-btn {
    padding: 11px 18px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-warning { background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%); color: #1a1a1a; }
.btn-success { background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%); color: white; }
.btn-danger { background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); color: white; }
.modal-action-btn:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* === RESPONSIVE MOBILE === */
@media (max-width: 768px) {
    .app-header {
        flex-wrap: wrap;
        gap: 10px;
        padding: 12px;
    }
    .app-title {
        font-size: 1.5rem !important;
        order: -1;
        width: 100%;
        text-align: center;
    }
    .header-left, .header-right { flex: 1; }
    
    .projects-nav { padding: 8px; gap: 6px; }
    .project-chip { padding: 6px 10px; font-size: 0.8rem; }
    
    .task-input-section {
        flex-wrap: wrap;
        gap: 8px;
        padding: 10px;
    }
    #task-input { width: 100%; min-width: auto; }
    .task-input-section select { flex: 1; min-width: 80px; }
    
    .tasks-view.columns-view { flex-direction: column; gap: 16px; }
    .task-column { min-width: auto; width: 100%; }
    
    .bubbles-view { flex-direction: column; gap: 16px; }
    .bubbles-column { width: 100%; }
    
    .modal-box {
        width: 95%;
        padding: 24px;
        border-radius: 20px;
    }
    .modal-box.modal-box-large {
        width: 96%;
        max-width: none;
        max-height: 92vh;
        padding: 20px;
    }
    .modal-textarea { min-height: 150px; }
    .modal-selects-row { flex-direction: column; gap: 10px; }
    .modal-status-actions { justify-content: center; }
    .modal-action-btn { flex: 1; min-width: 100px; }
    .modal-actions { flex-direction: column; gap: 10px; }
    .modal-actions button { min-width: auto; }
    
    .journal-input-row { flex-wrap: wrap; }
    .journal-input-row select,
    .journal-input-row input { flex: 1; min-width: 120px; }
}

@media (max-width: 480px) {
    .app-title { font-size: 1.2rem !important; }
    .user-badge .user-name { display: none; }
    .header-right .icon-btn { padding: 8px; font-size: 1rem; }
    
    .bubble { padding: 12px 14px !important; }
    .bubble .bubble-text { font-size: 0.95rem !important; }
    
    .modal-box-large h3 { font-size: 1.1rem; }
    .modal-action-btn { padding: 8px 12px; font-size: 0.8rem; }
}

/* === CHATBOT FONT SIZE === */
.chatbot-panel[data-font="small"] .chatbot-messages,
.chatbot-panel[data-font="small"] .chat-msg { font-size: 0.75rem !important; }
.chatbot-panel[data-font="medium"] .chatbot-messages,
.chatbot-panel[data-font="medium"] .chat-msg { font-size: 0.95rem !important; }
.chatbot-panel[data-font="large"] .chatbot-messages,
.chatbot-panel[data-font="large"] .chat-msg { font-size: 1.15rem !important; }
.chatbot-panel[data-font="xlarge"] .chatbot-messages,
.chatbot-panel[data-font="xlarge"] .chat-msg { font-size: 1.4rem !important; }
#chatbot-font-size {
    font-size: 0.75rem;
    padding: 4px 8px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 4px;
    color: white;
    cursor: pointer;
}
#chatbot-font-size:hover { background: rgba(255,255,255,0.2); }

/* === CHATBOT STYLE WHATSAPP VERT PREMIUM === */

/* Bouton FAB - Vert premium avec glow */
.chatbot-fab {
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%) !important;
    box-shadow:
        0 4px 20px rgba(37, 211, 102, 0.5),
        0 0 40px rgba(37, 211, 102, 0.25) !important;
    border: none !important;
    animation: fabGlowGreen 2s ease-in-out infinite;
}

.chatbot-fab:hover {
    transform: scale(1.12) !important;
    box-shadow:
        0 6px 30px rgba(37, 211, 102, 0.7),
        0 0 60px rgba(37, 211, 102, 0.4) !important;
}

@keyframes fabGlowGreen {
    0%, 100% { box-shadow: 0 4px 20px rgba(37,211,102,0.5), 0 0 40px rgba(37,211,102,0.25); }
    50% { box-shadow: 0 4px 25px rgba(37,211,102,0.7), 0 0 50px rgba(37,211,102,0.35); }
}

/* Panel style WhatsApp - Desktop */
.chatbot-panel {
    width: 420px !important;
    min-width: 380px !important;
    max-width: 500px !important;
    border-radius: 16px !important;
    overflow: hidden;
    box-shadow:
        0 8px 40px rgba(0,0,0,0.5),
        0 0 60px rgba(37, 211, 102, 0.15) !important;
    border: 1px solid rgba(37, 211, 102, 0.2) !important;
}

.chatbot-panel.large {
    width: 600px !important;
    max-width: 90vw !important;
    height: 75vh !important;
}

/* Masquer l'UI d'enregistrement avec croix jaune - SUPPRIMÉ */
.audio-recorder-ui {
    display: none !important;
}

/* Bouton fermer - clignotement subtil */
#chatbot-close {
    animation: subtlePulse 3s ease-in-out infinite;
}

@keyframes subtlePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Header vert premium */
.chatbot-header {
    background: linear-gradient(135deg, #075e54 0%, #128c7e 100%) !important;
    padding: 12px 16px !important;
    box-shadow: 0 2px 15px rgba(0,0,0,0.3);
}

.chatbot-controls button {
    background: rgba(255,255,255,0.1) !important;
    border: 1px solid rgba(255,255,255,0.2) !important;
}

.chatbot-controls button:hover {
    background: rgba(37,211,102,0.3) !important;
    box-shadow: 0 0 15px rgba(37,211,102,0.3);
}

/* Zone de saisie */
.chatbot-input-area {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 10px 12px !important;
    background: #0b141a !important;
    border-top: 1px solid rgba(37, 211, 102, 0.15) !important;
}

/* Conteneur boutons média */
.chat-media-buttons {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

/* Boutons média VERT PREMIUM */
.chat-media-btn {
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    border: none !important;
    background: rgba(37, 211, 102, 0.15) !important;
    color: #25d366 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.25s ease !important;
    padding: 0 !important;
}

.chat-media-btn svg {
    width: 20px !important;
    height: 20px !important;
    transition: all 0.25s ease !important;
}

.chat-media-btn:hover {
    background: rgba(37, 211, 102, 0.25) !important;
    color: #2eec77 !important;
    box-shadow: 0 0 20px rgba(37, 211, 102, 0.4) !important;
    transform: scale(1.08) !important;
}

/* Micro en enregistrement - GROS et ROUGE */
.chat-media-btn.recording,
#chat-mic-btn.recording {
    width: 60px !important;
    height: 60px !important;
    background: linear-gradient(135deg, #ff4444 0%, #cc0000 100%) !important;
    color: white !important;
    animation: micRecordBig 0.7s ease-in-out infinite !important;
    box-shadow:
        0 0 25px rgba(255, 68, 68, 0.7),
        0 0 50px rgba(255, 68, 68, 0.4) !important;
    position: relative;
    z-index: 10;
}

.chat-media-btn.recording svg,
#chat-mic-btn.recording svg {
    width: 28px !important;
    height: 28px !important;
}

@keyframes micRecordBig {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 25px rgba(255,68,68,0.7), 0 0 50px rgba(255,68,68,0.4);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 35px rgba(255,68,68,0.9), 0 0 70px rgba(255,68,68,0.5);
    }
}

/* Champ texte style WhatsApp */
.chatbot-input-area input[type="text"] {
    flex: 1 !important;
    min-width: 0 !important;
    background: #2a2a30 !important;
    border: none !important;
    border-radius: 20px !important;
    padding: 10px 16px !important;
    color: white !important;
    font-size: 0.95rem !important;
}

.chatbot-input-area input[type="text"]::placeholder {
    color: rgba(255,255,255,0.4) !important;
}

.chatbot-input-area input[type="text"]:focus {
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(37,211,102,0.3) !important;
}

/* Bouton envoi style WhatsApp */
.chatbot-input-area > button#chatbot-send {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    border-radius: 50% !important;
    border: none !important;
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%) !important;
    color: white !important;
    cursor: pointer;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important;
    padding: 0 !important;
    flex-shrink: 0;
}

.chatbot-input-area > button#chatbot-send svg {
    width: 20px;
    height: 20px;
}

.chatbot-input-area > button#chatbot-send:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(37,211,102,0.4);
}

/* Messages style WhatsApp */
.chatbot-messages {
    background: #0b141a !important;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") !important;
}

.chat-msg {
    max-width: 85% !important;
    border-radius: 12px !important;
    padding: 10px 14px !important;
    margin: 4px 12px !important;
    position: relative;
}

.chat-msg.user {
    background: linear-gradient(135deg, #005c4b 0%, #025144 100%) !important;
    margin-left: auto !important;
    border-bottom-right-radius: 4px !important;
}

.chat-msg.assistant {
    background: #1f2c34 !important;
    margin-right: auto !important;
    border-bottom-left-radius: 4px !important;
}

/* Indicateur d'envoi média */
.chat-msg.media-preview {
    padding: 8px !important;
}

.chat-msg.media-preview img {
    max-width: 200px;
    max-height: 200px;
    border-radius: 8px;
}

.chat-msg.media-preview audio {
    max-width: 100%;
}

/* Mobile : PLEIN ÉCRAN comme ChatGPT */
@media (max-width: 768px) {
    /* Panel chatbot mobile - FULL SCREEN avec layout flex correct */
    .chatbot-panel {
        width: 100vw !important;
        min-width: 100vw !important;
        max-width: 100vw !important;
        height: 100vh !important;
        max-height: 100vh !important;
        right: 0 !important;
        left: 0 !important;
        top: 0 !important;
        bottom: 0 !important;
        border-radius: 0 !important;
        border: none !important;
        position: fixed !important;
        display: flex !important;
        flex-direction: column !important;
    }

    .chatbot-panel.large {
        height: 100vh !important;
        max-height: 100vh !important;
    }

    /* Messages prennent tout l'espace disponible */
    .chatbot-messages {
        flex: 1 1 auto !important;
        min-height: 0 !important;
        overflow-y: auto !important;
    }

    /* Zone de saisie mobile - EN BAS, COMPACTE */
    .chatbot-input-area {
        flex-shrink: 0 !important;
        position: relative !important;
        bottom: auto !important;
        padding: 8px 10px !important;
        gap: 6px !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        background: #0b141a !important;
    }

    /* Boutons média plus petits sur mobile */
    .chat-media-buttons {
        gap: 4px !important;
        flex-shrink: 0 !important;
    }

    .chat-media-btn {
        width: 34px !important;
        height: 34px !important;
        min-width: 34px !important;
    }

    .chat-media-btn svg {
        width: 18px !important;
        height: 18px !important;
    }

    /* Micro enregistrement mobile - MÊME TAILLE pour éviter tremblement */
    .chat-media-btn.recording,
    #chat-mic-btn.recording {
        width: 34px !important;
        height: 34px !important;
        min-width: 34px !important;
        position: relative !important;
        left: auto !important;
        transform: none !important;
        bottom: auto !important;
        z-index: 10 !important;
        flex-shrink: 0 !important;
        animation: micPulseSmall 0.8s ease-in-out infinite !important;
    }

    .chat-media-btn.recording svg,
    #chat-mic-btn.recording svg {
        width: 18px !important;
        height: 18px !important;
    }

    @keyframes micPulseSmall {
        0%, 100% { box-shadow: 0 0 10px rgba(255,68,68,0.5); }
        50% { box-shadow: 0 0 20px rgba(255,68,68,0.8); }
    }

    /* Champ texte mobile - prend l'espace */
    .chatbot-input-area input[type="text"] {
        flex: 1 !important;
        min-width: 0 !important;
        padding: 10px 14px !important;
        font-size: 16px !important; /* Évite zoom iOS */
    }

    /* Bouton envoi mobile - TOUJOURS VISIBLE */
    .chatbot-input-area > button#chatbot-send {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        flex-shrink: 0 !important;
    }

    .chatbot-input-area > button#chatbot-send svg {
        width: 18px !important;
        height: 18px !important;
    }

    /* FAB mobile */
    .chatbot-fab {
        width: 56px !important;
        height: 56px !important;
        bottom: 20px !important;
        right: 20px !important;
    }

    .chatbot-fab img {
        width: 38px !important;
        height: 38px !important;
    }
}

/* === NOTES RÉTRACTABLES === */
.note-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    margin-top: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.75rem;
    color: var(--accent);
    transition: all 0.2s ease;
}
.note-toggle:hover {
    background: var(--accent-muted);
    transform: scale(1.02);
}
.note-toggle.expanded {
    background: var(--accent-muted);
}
.note-dot {
    font-size: 0.6rem;
}
.note-arrow {
    font-size: 0.6rem;
    transition: transform 0.2s ease;
}
.note-toggle.expanded .note-arrow {
    transform: rotate(180deg);
}

.bubble-description {
    margin-top: 10px;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text-muted, #666);
    white-space: pre-wrap;
    word-break: break-word;
    border-left: 3px solid var(--accent, #e07840);
    animation: slideDown 0.2s ease;
}
.bubble-description.hidden {
    display: none;
}

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

/* Thèmes sombres - notes */
[data-theme="matrix"] .note-toggle {
    background: rgba(0, 255, 102, 0.1);
    border-color: rgba(0, 255, 102, 0.3);
    color: #00ff66;
}
[data-theme="matrix"] .bubble-description {
    background: rgba(0, 255, 102, 0.05);
    border-left-color: #00ff66;
    color: #aaa;
}

[data-theme="midnight"] .note-toggle {
    background: rgba(100, 130, 255, 0.1);
    border-color: rgba(100, 130, 255, 0.3);
    color: #6482ff;
}
[data-theme="midnight"] .bubble-description {
    background: rgba(100, 130, 255, 0.05);
    border-left-color: #6482ff;
    color: #aaa;
}

[data-theme="hacker"] .note-toggle {
    background: rgba(0, 255, 0, 0.1);
    border-color: rgba(0, 255, 0, 0.3);
    color: #00ff00;
}
[data-theme="hacker"] .bubble-description {
    background: rgba(0, 255, 0, 0.05);
    border-left-color: #00ff00;
    color: #aaa;
}

[data-theme="fantasy"] .note-toggle {
    background: rgba(191, 107, 255, 0.1);
    border-color: rgba(191, 107, 255, 0.3);
    color: #bf6bff;
}
[data-theme="fantasy"] .bubble-description {
    background: rgba(191, 107, 255, 0.05);
    border-left-color: #bf6bff;
    color: #aaa;
}

/* === VUE 2 COLONNES === */
.bubbles-view .hint {
    font-size: 0.7rem;
    font-weight: normal;
    opacity: 0.6;
}
.bubbles-view .bubble { cursor: pointer; }
.bubbles-view .bubble:active { transform: scale(0.98) !important; }
.bubbles-view .task-actions { display: none !important; }

/* === BARRE RECHERCHE TÂCHES === */
.search-container {
    display: flex;
    align-items: center;
    gap: 0;
    margin-left: 8px;
    position: relative;
}

.search-toggle-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.05);
    color: var(--text-secondary, #888);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 2;
}
.search-toggle-btn:hover {
    background: rgba(255,255,255,0.1);
    color: var(--accent, #daa520);
    transform: scale(1.1);
}
.search-toggle-btn.active {
    background: var(--accent, #daa520);
    color: #000;
    box-shadow: 0 0 12px rgba(218, 165, 32, 0.4);
}

.search-input {
    width: 0;
    padding: 0;
    border: none;
    background: rgba(0,0,0,0.3);
    color: var(--text-primary, #fff);
    border-radius: 20px;
    font-size: 0.9rem;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-left: -36px;
    padding-left: 40px;
}
.search-input::placeholder {
    color: var(--text-secondary, #666);
}
.search-container.expanded .search-input {
    width: 180px;
    padding: 8px 12px 8px 40px;
    opacity: 1;
    border: 1px solid rgba(218, 165, 32, 0.3);
}
.search-input:focus {
    outline: none;
    border-color: var(--accent, #daa520);
    box-shadow: 0 0 8px rgba(218, 165, 32, 0.2);
}

.search-count {
    position: absolute;
    right: 8px;
    font-size: 0.7rem;
    color: var(--accent, #daa520);
    opacity: 0;
    transition: opacity 0.2s;
}
.search-container.expanded .search-count {
    opacity: 1;
}

/* Highlight des tâches trouvées */
.bubble.search-match {
    box-shadow: 0 0 0 2px var(--accent, #daa520), 0 4px 15px rgba(218, 165, 32, 0.3) !important;
}
.bubble.search-hidden {
    opacity: 0.15;
    transform: scale(0.98);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .search-container.expanded .search-input {
        width: 140px;
    }
}

/* === LOGIN MOBILE OPTIMISÉ === */
@media (max-width: 500px) {
    /* Réduire le padding global */
    .login-container {
        padding: 20px 15px !important;
        margin: 10px !important;
        max-width: calc(100vw - 20px) !important;
    }
    
    /* Logo plus petit et moins de marge */
    .login-logo {
        width: 80px !important;
        height: 80px !important;
        margin-bottom: 15px !important;
    }
    
    /* Titre plus compact */
    .login-container h1 {
        font-size: 1.8rem !important;
        margin-bottom: 5px !important;
    }
    
    /* Sous-titre */
    .login-container > p {
        font-size: 0.95rem !important;
        margin-bottom: 15px !important;
    }
    
    /* Carousel ajusté */
    .user-carousel {
        margin-top: 15px !important;
        gap: 15px !important;
    }
    
    /* Flèches plus petites */
    .carousel-arrow {
        width: 40px !important;
        height: 40px !important;
        font-size: 1.5rem !important;
    }
    
    /* Container profil */
    .user-select-grid {
        width: 180px !important;
        padding: 15px !important;
    }
    
    /* Avatar login plus petit */
    .user-avatar-img-login {
        width: 90px !important;
        height: 90px !important;
    }
    
    /* Nom utilisateur - VISIBLE et pas coupé */
    .user-name-select {
        font-size: 0.95rem !important;
        white-space: nowrap !important;
        overflow: visible !important;
        text-overflow: clip !important;
        max-width: none !important;
        padding: 0 5px !important;
    }
    
    /* Bouton profil */
    .user-select-btn {
        min-width: 150px !important;
        padding: 10px !important;
    }
    
    /* Masquer l'image de fond du Maître */
    .login-screen::after {
        display: none !important;
    }
}

/* Très petits écrans */
@media (max-width: 360px) {
    .login-logo {
        width: 60px !important;
        height: 60px !important;
    }
    
    .login-container h1 {
        font-size: 1.5rem !important;
    }
    
    .user-avatar-img-login {
        width: 70px !important;
        height: 70px !important;
    }
    
    .user-name-select {
        font-size: 0.85rem !important;
    }
}

/* ================================================
   SIDEBAR INTEGRATION - ProductiveApp v4.4
   ================================================ */

/* Masquer l'ancien header quand sidebar est active */
body.logged-in .header-left .user-badge {
    display: none;
}

/* Garder le galaxy icon visible dans le header */
body.logged-in .header-left .galaxy-icon-container {
    display: flex;
}

/* Ajuster le contenu principal pour la sidebar */
@media (min-width: 769px) {
    /* Par défaut: sidebar OUVERTE (260px) */
    body.logged-in .main-content {
        margin-left: 260px !important;
        transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    /* Quand sidebar REPLIÉE (64px) */
    body.logged-in.sidebar-collapsed .main-content {
        margin-left: 64px !important;
    }
}

@media (max-width: 768px) {
    body.logged-in .main-content {
        margin-left: 0 !important;
    }
}

/* Highlight animation for search results */
@keyframes taskHighlight {
    0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
    50% { box-shadow: 0 0 20px 5px rgba(245, 158, 11, 0.5); }
}

.task-bubble.highlight,
.task-card.highlight {
    animation: taskHighlight 0.5s ease 3;
}

/* Sidebar accent color sync with theme */
[data-theme="executive"] { --sidebar-accent: #d4af37; }
[data-theme="corporate"] { --sidebar-accent: #3b82f6; }
[data-theme="minimal"] { --sidebar-accent: #374151; }
[data-theme="slate"] { --sidebar-accent: #64748b; }
[data-theme="obsidian"] { --sidebar-accent: #a1a1aa; }
[data-theme="academie"] { --sidebar-accent: #92400e; }
[data-theme="sunset"] { --sidebar-accent: #f97316; }
[data-theme="ocean"] { --sidebar-accent: #06b6d4; }
[data-theme="forest"] { --sidebar-accent: #22c55e; }
[data-theme="bubblegum"] { --sidebar-accent: #ec4899; }
[data-theme="aurora"] { --sidebar-accent: #a78bfa; }
[data-theme="matrix"] { --sidebar-accent: #22c55e; }
[data-theme="cyberpunk"] { --sidebar-accent: #f0abfc; }
[data-theme="terminal"] { --sidebar-accent: #22c55e; }
[data-theme="midnight"] { --sidebar-accent: #818cf8; }

/* Mobile: Ajuster le contenu quand sidebar drawer est ouverte */
@media (max-width: 768px) {
    body.sidebar-mobile-open .app-container {
        transform: translateX(280px);
        transition: transform 0.3s ease;
    }

    /* Augmenter z-index du mobile toggle pour qu'il soit au-dessus */
    .sidebar-mobile-toggle {
        z-index: 998;
        background: var(--bg-card, rgba(15, 15, 20, 0.95)) !important;
        border: 1px solid var(--border, rgba(255, 255, 255, 0.1)) !important;
    }
}

/* ================================================
   CHATBOT IMPROVEMENTS
   - Ball fades when chat opens
   - Chat positioned at ball
   - Minimum dimensions fixed
   ================================================ */

/* Hide chatbot before login */
.chatbot-fab {
    display: none !important;
}

body.logged-in .chatbot-fab {
    display: flex !important;
}

/* Panel stays hidden until opened */
.chatbot-panel.hidden {
    display: none !important;
}

/* Global search overlay - COMPLETELY REMOVED FROM UI */
.global-search-overlay,
.global-search-overlay.active,
.global-search-overlay.show,
.global-search-overlay[class],
#global-search-overlay {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    left: -9999px !important;
}

/* ================================================
   CONFIRM MODAL - Theme-aware Premium
   ================================================ */

.confirm-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.confirm-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* 3D Relief Premium Modal - TeamTalk inspired */
.confirm-modal {
    position: relative;
    background: linear-gradient(180deg,
        rgba(35, 32, 45, 0.98) 0%,
        rgba(25, 23, 32, 0.98) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top-color: rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    padding: 40px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    transform: scale(0.8) translateY(40px);
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    /* 3D relief shadow - subtle depth effect */
    box-shadow:
        0 2px 0 rgba(255, 255, 255, 0.03) inset,
        0 -2px 0 rgba(0, 0, 0, 0.3) inset,
        0 25px 60px -15px rgba(0, 0, 0, 0.5),
        0 10px 30px -10px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.05);
    overflow: hidden;
    backdrop-filter: blur(20px);
}

/* 3D Relief border - Premium TeamTalk style (no rotation) */
.confirm-modal::before {
    content: '';
    position: absolute;
    inset: -1px;
    background: linear-gradient(145deg,
        rgba(255, 255, 255, 0.12) 0%,
        rgba(255, 255, 255, 0.05) 50%,
        transparent 100%);
    border-radius: 25px;
    z-index: -1;
    pointer-events: none;
}

/* Top accent line */
.confirm-modal::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, var(--accent, #6366f1) 50%, transparent 100%);
    border-radius: 2px;
}

.confirm-modal-overlay.active .confirm-modal {
    transform: scale(1) translateY(0);
}

.confirm-modal-icon {
    font-size: 52px;
    margin-bottom: 20px;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.4));
}

.confirm-modal-title {
    color: var(--text-primary, #fff);
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 12px;
}

.confirm-modal-message {
    color: var(--text-secondary, rgba(255, 255, 255, 0.65));
    font-size: 1rem;
    margin: 0 0 32px;
    line-height: 1.6;
}

.confirm-modal-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.confirm-modal-btn {
    position: relative;
    padding: 14px 32px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 130px;
    overflow: hidden;
}

.confirm-modal-btn.cancel {
    background: var(--bg-secondary, rgba(255, 255, 255, 0.08));
    color: var(--text-secondary, rgba(255, 255, 255, 0.8));
    border: 1px solid var(--border-primary, rgba(255, 255, 255, 0.12));
}

.confirm-modal-btn.cancel:hover {
    background: var(--bg-hover, rgba(255, 255, 255, 0.12));
    color: var(--text-primary, #fff);
    transform: translateY(-2px);
}

.confirm-modal-btn.confirm {
    background: var(--accent, #6366f1);
    color: #fff;
    box-shadow: 0 4px 15px var(--accent-glow, rgba(99, 102, 241, 0.4));
}

.confirm-modal-btn.confirm:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px var(--accent-glow, rgba(99, 102, 241, 0.5));
}

.confirm-modal-btn.confirm.danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.confirm-modal-btn.confirm.danger:hover {
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.5);
}

/* ================================================
   SIDEBAR TOGGLE - Clean style (inside sidebar)
   ================================================ */

/* Toggle is now handled in style-sidebar.css */

/* FAB button fade animation when chat is open */
.chatbot-fab {
    transition: opacity 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease !important;
}

.chatbot-fab.hidden {
    opacity: 0 !important;
    pointer-events: none !important;
    transform: scale(0.8) !important;
}

/* Panel position - starts from bottom-right where ball is */
.chatbot-panel {
    bottom: 20px !important;
    right: 20px !important;
    min-height: 450px !important;
    max-height: 70vh !important;
    transform-origin: bottom right !important;
    animation: chatPanelOpen 0.3s ease forwards !important;
}

@keyframes chatPanelOpen {
    0% {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.chatbot-panel.closing {
    animation: chatPanelClose 0.25s ease forwards !important;
}

@keyframes chatPanelClose {
    0% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    100% {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
}

/* Fix button cutoff - ensure footer has enough space */
.chatbot-input-area {
    min-height: 60px !important;
    padding: 12px 14px !important;
}

/* ================================================
   MENU DROPDOWN ANIMATION
   Fade + scale for smooth appearance
   ================================================ */

.menu-dropdown,
.dropdown-menu,
#menu-dropdown {
    opacity: 0;
    visibility: hidden;
    transform: scale(0.95) translateY(-8px);
    transform-origin: top right;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.menu-dropdown.active,
.menu-dropdown.show,
.dropdown-menu.active,
.dropdown-menu.show,
#menu-dropdown.active,
#menu-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: scale(1) translateY(0);
}

/* ================================================
   LOGIN FORM v2.0 - Team Auth + Member Picker
   ================================================ */

/* Container du formulaire login */
.login-form-container {
    opacity: 0;
    animation: fadeInUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 1.5s forwards;
    max-width: 320px;
    margin: 0 auto;
}

.login-form-container .login-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    margin-bottom: 20px;
    font-weight: 600;
}

.login-inputs {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.login-inputs input {
    padding: 14px 18px;
    border-radius: 12px;
    border: 2px solid rgba(255, 200, 100, 0.2);
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.login-inputs input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.login-inputs input:focus {
    border-color: rgba(255, 200, 100, 0.6);
    background: rgba(0, 0, 0, 0.5);
    outline: none;
    box-shadow: 0 0 20px rgba(255, 200, 100, 0.15);
}

.login-btn {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #ffd700 0%, #ff8c00 100%);
    border: none;
    border-radius: 12px;
    color: #1a1a1f;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(255, 140, 0, 0.3);
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(255, 140, 0, 0.5);
}

.login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.login-btn .spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(0, 0, 0, 0.3);
    border-top-color: #1a1a1f;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* === MEMBER PICKER - HORIZONTAL RESPONSIVE === */
.member-picker-container {
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
    width: 100%;
    max-width: 100vw;
    padding: 0 20px;
    box-sizing: border-box;
}

.member-picker-container.hidden {
    display: none;
}

.member-picker-container .login-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.2rem;
    margin-bottom: 20px;
    font-weight: 600;
    text-align: center;
}

/* Grille horizontale responsive */
.member-grid {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 15px 10px 25px;
    margin: 0 auto;
    max-width: 850px;
    justify-content: center;
    flex-wrap: wrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.member-grid::-webkit-scrollbar {
    display: none;
}

.member-select-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 14px 16px;
    background: rgba(0, 0, 0, 0.5) !important;
    border: 2px solid rgba(255, 200, 100, 0.15) !important;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    scroll-snap-align: center;
    flex-shrink: 0;
    width: 110px;
    pointer-events: auto !important;
    position: relative;
    z-index: 100;
}

.member-select-btn:hover {
    transform: translateY(-5px) scale(1.02);
    border-color: rgba(255, 200, 100, 0.5);
    background: rgba(255, 200, 100, 0.08);
    box-shadow: 0 12px 30px rgba(255, 140, 0, 0.2);
}

.member-select-btn .user-avatar-img-login {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 200, 100, 0.25);
    transition: all 0.3s ease;
}

.member-select-btn:hover .user-avatar-img-login {
    border-color: rgba(255, 200, 100, 0.7);
    box-shadow: 0 0 20px rgba(255, 200, 100, 0.3);
}

.member-name {
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100px;
}

.member-role {
    color: rgba(255, 200, 100, 0.6);
    font-size: 0.7rem;
    font-weight: 500;
}

/* Responsive mobile - slider horizontal */
@media (max-width: 768px) {
    .member-grid {
        flex-wrap: nowrap;
        justify-content: flex-start;
        padding-left: 15px;
        padding-right: 15px;
        max-width: 100%;
    }

    .member-select-btn {
        width: 95px;
        padding: 12px;
    }

    .member-select-btn .user-avatar-img-login {
        width: 48px;
        height: 48px;
    }

    .member-name {
        font-size: 0.75rem;
        max-width: 85px;
    }
}

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

/* === FIX LOGIN SCREEN - DISABLED (Using AuthLogin now) === */
/* COMMENTED OUT 2026-02-13 - Old login system no longer used
.login-screen {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    background: radial-gradient(ellipse at center, #1a1a2e 0%, #0f0f1a 100%) !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}
*/

/* Removed generic border reset - was breaking member buttons */

.login-container {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    max-width: 400px !important;
    width: 100% !important;
    padding: 20px !important;
    box-sizing: border-box !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* Logo et titre */
.login-logo {
    width: 80px !important;
    height: 80px !important;
    margin-bottom: 15px !important;
    border-radius: 20px !important;
}

.login-container h1 {
    font-size: 2rem !important;
    margin-bottom: 8px !important;
}

/* "Tout le monde" option spéciale */
.member-select-btn.member-all {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(139, 92, 246, 0.2) 100%);
    border-color: rgba(139, 92, 246, 0.3);
}

.member-select-btn.member-all:hover {
    border-color: rgba(139, 92, 246, 0.6);
    box-shadow: 0 12px 30px rgba(139, 92, 246, 0.25);
}

/* Hide old elements */
.user-carousel,
#password-form,
#email-login-form {
    display: none !important;
}

/* === FIX: Hide ALL app elements before login === */
body:not(.logged-in) .main-content,
body:not(.logged-in) .sidebar,
body:not(.logged-in) #app-sidebar,
body:not(.logged-in) #app-header,
body:not(.logged-in) .header,
body:not(.logged-in) .sidebar-mobile-toggle,
body:not(.logged-in) .sidebar-mobile-overlay,
body:not(.logged-in) .global-search-overlay,
body:not(.logged-in) .chatbot-panel,
body:not(.logged-in) #chatbot-panel,
body:not(.logged-in) .chatbot-fab,
body:not(.logged-in) #chatbot-toggle {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Remove any borders/outlines on login */
.login-screen,
.login-screen *,
.login-container,
.login-form-container,
.member-picker-container {
    outline: none !important;
}

/* Fix inputs styling */
.login-inputs input {
    border: 2px solid rgba(255, 200, 100, 0.2) !important;
}

/* FIX: Removed opacity:0 and pointer-events:none that was hiding inputs on focus */

/* Ensure login screen covers everything - DISABLED 2026-02-13 */
/*
.login-screen:not(.hidden) {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 9999 !important;
    background: radial-gradient(ellipse at center, #1a1a2e 0%, #0f0f1a 100%) !important;
}
*/

/* === EXTRA FIX: Remove any outlines/borders on login === */
.login-screen,
.login-container,
#login-screen,
.login-form-container,
.member-picker-container,
.login-inputs,
.member-grid {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

/* Only allow borders on specific elements */
.member-select-btn {
    border: 2px solid rgba(255, 200, 100, 0.15) !important;
}

.member-select-btn:hover {
    border: 2px solid rgba(255, 200, 100, 0.5) !important;
}

.login-inputs input {
    border: 2px solid rgba(255, 200, 100, 0.2) !important;
}

.login-inputs input:focus {
    border: 2px solid rgba(255, 200, 100, 0.5) !important;
}

/* === FIX: User avatar in header badge === */
.user-avatar-img {
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    border: 2px solid var(--accent, #d4af37) !important;
    flex-shrink: 0 !important;
}

.user-badge {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.user-badge .user-name {
    font-size: 0.9rem !important;
    font-weight: 500 !important;
}

/* ================================================
   CLEAN LOGIN FIX - Remove all visual bugs
   ================================================ */

/* Hide the border/glow around login container */
.login-container::before {
    display: none !important;
}

/* Hide any stray overlays before login */
body:not(.logged-in) *:not(.login-screen):not(.login-screen *):not(.fire-bubble) {
    /* This is too aggressive, let's be more specific */
}

/* Specifically hide the sidebar-mobile-overlay */
.sidebar-mobile-overlay {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

body.logged-in .sidebar-mobile-overlay.active {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Login form inputs need proper styling */
#login-email,
#login-password {
    border: 2px solid rgba(255, 200, 100, 0.3) !important;
    background: rgba(0, 0, 0, 0.5) !important;
    color: #fff !important;
    padding: 14px 18px !important;
    border-radius: 12px !important;
    font-size: 1rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
    outline: none !important;
}

#login-email:focus,
#login-password:focus {
    border-color: rgba(255, 200, 100, 0.6) !important;
    box-shadow: 0 0 15px rgba(255, 200, 100, 0.15) !important;
}

/* Login button clickable */
#login-btn {
    cursor: pointer !important;
    pointer-events: auto !important;
    z-index: 100 !important;
    position: relative !important;
}

/* ================================================
   CLEAN LOGIN SCREEN - Simple and Stable
   ================================================ */

/* Hide visual effects on login screen */
.login-screen::before,
.login-screen::after,
.login-container::before,
.login-container::after,
#login-btn::before,
#login-btn::after {
    display: none !important;
}

/* Clean background - DISABLED 2026-02-13 */
/*
.login-screen {
    background: linear-gradient(165deg, #0a0a0a 0%, #1a1410 40%, #2d2117 100%) !important;
}
*/

/* CRITICAL FIX: Hide login-screen when logged in (2026-02-13) */
body.logged-in .login-screen {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
    z-index: -9999 !important;
}

/* CRITICAL FIX: FORCE auth-login-overlay to be visible (2026-02-13) */
body:not(.logged-in) .auth-login-overlay,
body:not(.logged-in) #auth-login-container {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    z-index: 99999 !important;
}

/* Login button - simple and clickable */
#login-btn {
    animation: none !important;
    cursor: pointer !important;
}

/* Member grid - stable layout */
#member-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 15px !important;
}

/* Member buttons - stable and clickable */
.member-select-btn {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    padding: 15px !important;
    background: rgba(255, 200, 100, 0.1) !important;
    border: 2px solid rgba(255, 200, 100, 0.3) !important;
    border-radius: 12px !important;
    cursor: pointer !important;
    transition: transform 0.2s, border-color 0.2s !important;
    width: 100px !important;
    min-height: 120px !important;
}

.member-select-btn:hover {
    transform: scale(1.05) !important;
    border-color: rgba(255, 200, 100, 0.8) !important;
}

.member-select-btn img {
    width: 50px !important;
    height: 50px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    margin-bottom: 8px !important;
}

.member-select-btn .member-name {
    font-size: 12px !important;
    color: #fff !important;
    text-align: center !important;
}

.member-select-btn .member-role {
    font-size: 10px !important;
    color: rgba(255, 200, 100, 0.7) !important;
}

/* ================================================
   PROJECT DETAIL VIEW - Empty State
   ================================================ */

.project-detail-container {
    max-width: 600px;
    margin: 40px auto;
    padding: 0 20px;
}

.project-detail-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 30px;
    background: var(--bg-card, rgba(0, 0, 0, 0.3));
    border-radius: 20px;
    border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
    margin-bottom: 24px;
}

.project-detail-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    flex-shrink: 0;
}

.project-detail-info {
    flex: 1;
}

.project-detail-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary, #fff);
    margin: 0 0 8px 0;
}

.project-detail-desc {
    font-size: 1rem;
    color: var(--text-secondary, rgba(255, 255, 255, 0.6));
    margin: 0;
}

.project-detail-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
}

.project-detail-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--bg-secondary, rgba(0, 0, 0, 0.2));
    border-radius: 12px;
    color: var(--text-secondary, rgba(255, 255, 255, 0.7));
    font-size: 0.95rem;
}

.project-detail-stat svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

/* Empty state */
.project-empty-state {
    text-align: center;
    padding: 60px 30px;
    background: var(--bg-card, rgba(0, 0, 0, 0.2));
    border-radius: 24px;
    border: 2px dashed var(--border, rgba(255, 255, 255, 0.15));
}

.project-empty-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.8;
}

.project-empty-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary, #fff);
    margin: 0 0 12px 0;
}

.project-empty-text {
    font-size: 1rem;
    color: var(--text-secondary, rgba(255, 255, 255, 0.6));
    margin: 0 0 30px 0;
}

.btn-large {
    padding: 16px 32px !important;
    font-size: 1.1rem !important;
}

.btn-large svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    margin-right: 8px;
    vertical-align: middle;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .project-detail-container {
        margin: 20px auto;
    }

    .project-detail-header {
        flex-direction: column;
        text-align: center;
        padding: 24px;
    }

    .project-detail-icon {
        width: 70px;
        height: 70px;
        font-size: 2rem;
    }

    .project-detail-title {
        font-size: 1.4rem;
    }

    .project-detail-stats {
        flex-direction: column;
        gap: 10px;
    }

    .project-empty-state {
        padding: 40px 20px;
    }

    .project-empty-icon {
        font-size: 3rem;
    }

    .project-empty-title {
        font-size: 1.2rem;
    }
}

/* ================================================
   3D RELIEF PREMIUM STYLING - Theme Aware
   Uses CSS variables to respect active theme
   ================================================ */

/* === Relief Variables - Theme Aware === */
:root {
    /* Relief uses theme colors via CSS variables */
    --relief-inset-light: rgba(255, 255, 255, 0.05);
    --relief-inset-dark: rgba(0, 0, 0, 0.15);
    --relief-border-light: rgba(255, 255, 255, 0.08);
    --relief-shadow-soft: 0 10px 30px -10px rgba(0, 0, 0, 0.3);
}

/* === Task Cards - Subtle 3D with Theme Colors === */
.bubble,
.task-card,
.dashboard-card,
.stat-card,
.note-card {
    /* Let theme background show through, just add depth */
    border: 1px solid var(--border, var(--relief-border-light)) !important;
    border-top-color: var(--relief-border-light) !important;
    box-shadow: 
        0 1px 0 var(--relief-inset-light) inset,
        0 -1px 0 var(--relief-inset-dark) inset,
        var(--relief-shadow-soft) !important;
    transition: all 0.25s ease !important;
}

.bubble:hover,
.task-card:hover,
.dashboard-card:hover {
    border-color: var(--accent, currentColor) !important;
    box-shadow: 
        0 1px 0 var(--relief-inset-light) inset,
        0 -1px 0 var(--relief-inset-dark) inset,
        0 15px 40px -10px rgba(0, 0, 0, 0.4),
        0 0 25px var(--accent-glow, rgba(99, 102, 241, 0.15)) !important;
    transform: translateY(-2px);
}

/* === Input Fields - Glass with Theme === */
.modal-input,
.modal-textarea,
.modal-select,
input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
    background: var(--bg-secondary, rgba(0, 0, 0, 0.3)) !important;
    border: 1px solid var(--border, var(--relief-border-light)) !important;
    border-radius: 12px !important;
    box-shadow: 
        0 1px 0 var(--relief-inset-dark) inset !important;
    transition: all 0.3s ease !important;
}

.modal-input:focus,
.modal-textarea:focus,
.modal-select:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus {
    border-color: var(--accent, #6366f1) !important;
    box-shadow: 
        0 1px 0 var(--relief-inset-dark) inset,
        0 0 0 3px var(--accent-glow, rgba(99, 102, 241, 0.15)) !important;
    outline: none !important;
}

/* === Buttons - 3D with Theme Accent === */
.btn,
.btn-primary,
.btn-secondary,
.modal-action-btn,
.confirm-modal-btn {
    position: relative;
    border-radius: 12px !important;
    border: 1px solid var(--border, rgba(255, 255, 255, 0.1)) !important;
    border-top-color: var(--relief-border-light) !important;
    box-shadow: 
        0 1px 0 var(--relief-inset-light) inset,
        0 -1px 0 var(--relief-inset-dark) inset,
        0 4px 12px rgba(0, 0, 0, 0.2) !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.btn:hover,
.btn-primary:hover,
.btn-secondary:hover,
.modal-action-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 
        0 1px 0 var(--relief-inset-light) inset,
        0 -1px 0 var(--relief-inset-dark) inset,
        0 8px 20px rgba(0, 0, 0, 0.3) !important;
}

.btn:active,
.btn-primary:active,
.btn-secondary:active {
    transform: translateY(0) !important;
    box-shadow: 
        0 1px 0 var(--relief-inset-dark) inset !important;
}

/* === Dashboard Widgets - Theme Aware === */
.dash-chart-card,
.analytics-card,
.settings-card,
.report-card {
    background: var(--bg-card, var(--surface, rgba(26, 26, 46, 0.9))) !important;
    border: 1px solid var(--border, var(--relief-border-light)) !important;
    border-top-color: var(--relief-border-light) !important;
    border-radius: 16px !important;
    box-shadow: 
        0 1px 0 var(--relief-inset-light) inset,
        0 15px 40px -15px rgba(0, 0, 0, 0.4) !important;
    backdrop-filter: blur(10px);
}

/* === Sidebar Items - Respects Theme === */
.sidebar-nav-item,
.nav-item {
    border-radius: 10px !important;
    transition: all 0.25s ease !important;
}

.sidebar-nav-item:hover,
.nav-item:hover {
    background: var(--bg-hover, rgba(255, 255, 255, 0.05)) !important;
    box-shadow: 
        0 1px 0 var(--relief-inset-light) inset,
        0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.sidebar-nav-item.active,
.nav-item.active {
    background: var(--accent-muted, rgba(99, 102, 241, 0.1)) !important;
    border: 1px solid var(--accent, currentColor) !important;
    box-shadow: 
        0 1px 0 var(--relief-inset-light) inset,
        0 0 15px var(--accent-glow, rgba(99, 102, 241, 0.1)) !important;
}

/* === Chatbot Panel - Theme Glass === */
.chatbot-panel {
    background: var(--bg-card, var(--surface, rgba(26, 26, 46, 0.98))) !important;
    border: 1px solid var(--border, var(--relief-border-light)) !important;
    border-top-color: var(--relief-border-light) !important;
    box-shadow: 
        0 1px 0 var(--relief-inset-light) inset,
        -10px 0 40px rgba(0, 0, 0, 0.4),
        0 0 40px var(--accent-glow, rgba(99, 102, 241, 0.05)) !important;
    backdrop-filter: blur(15px);
}

/* === FAB Button - Theme Accent === */
.chatbot-fab,
.fab-btn {
    background: var(--accent, linear-gradient(145deg, #6366f1, #4f46e5)) !important;
    border: none !important;
    box-shadow: 
        0 2px 0 rgba(255, 255, 255, 0.15) inset,
        0 -2px 0 rgba(0, 0, 0, 0.2) inset,
        0 8px 25px rgba(0, 0, 0, 0.35),
        0 0 25px var(--accent-glow, rgba(99, 102, 241, 0.25)) !important;
}

.chatbot-fab:hover,
.fab-btn:hover {
    transform: translateY(-3px) scale(1.05) !important;
    box-shadow: 
        0 2px 0 rgba(255, 255, 255, 0.2) inset,
        0 -2px 0 rgba(0, 0, 0, 0.25) inset,
        0 15px 40px rgba(0, 0, 0, 0.45),
        0 0 40px var(--accent-glow, rgba(99, 102, 241, 0.35)) !important;
}

/* === Scrollbars - Theme Accent === */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary, rgba(0, 0, 0, 0.2));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--accent, #6366f1);
    opacity: 0.5;
    border-radius: 4px;
    border: 1px solid var(--relief-inset-light);
}

::-webkit-scrollbar-thumb:hover {
    opacity: 0.8;
}

/* === Remove ALL Rotating Animations === */
.modal-box::before,
.confirm-modal::before,
.card::before {
    animation: none !important;
}

/* === DISABLE Divine Rotate Animations (golden spinning backgrounds) === */
#view-team-messaging::before,
#view-campaigns::before,
.ai-btn::after,
.msg-container::before {
    animation: none !important;
    opacity: 0 !important;
}

/* Force disable ALL rotating animations (golden spinning) */
@keyframes divineRotate { from, to { transform: none; } }
@keyframes campaignDivineRotate { from, to { transform: none; } }
@keyframes ai-btnRotate { from, to { transform: none; } }
@keyframes ai-ambientRotate { from, to { transform: none; } }
@keyframes borderRotate { from, to { transform: none; } }
@keyframes ringRotate { from, to { transform: none; } }
@keyframes sparkleRotate { from, to { transform: none; } }
@keyframes sunRotate { from, to { transform: none; } }
@keyframes pageFlip { from, to { transform: none; } }

/* Disable ALL ::before pseudo-elements that rotate */
*[class*="view-"]::before,
*[class*="modal"]::before,
.ai-btn::after {
    animation: none !important;
}

/* === CRITICAL: Force hide modals with .hidden class === */
#edit-task-modal.hidden,
#theme-modal.hidden,
#project-modal.hidden,
#premium-report-modal.hidden,
#premium-results-modal.hidden,
.modal.hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* === Modal Styles - Theme Aware === */
.modal-box,
.confirm-modal {
    background: var(--bg-card, var(--surface, rgba(30, 30, 45, 0.98))) !important;
    border: 1px solid var(--border, var(--relief-border-light)) !important;
    border-top-color: var(--relief-border-light) !important;
    box-shadow: 
        0 2px 0 var(--relief-inset-light) inset,
        0 -2px 0 var(--relief-inset-dark) inset,
        0 25px 60px -15px rgba(0, 0, 0, 0.5),
        0 0 0 1px var(--relief-inset-light) !important;
    backdrop-filter: blur(20px);
}

/* === Theme-specific overrides === */

/* Light themes (Minimal, Academie) */
[data-theme="minimal"],
[data-theme="academie"] {
    --relief-inset-light: rgba(255, 255, 255, 0.5);
    --relief-inset-dark: rgba(0, 0, 0, 0.08);
    --relief-border-light: rgba(0, 0, 0, 0.1);
}

[data-theme="minimal"] .bubble,
[data-theme="minimal"] .task-card,
[data-theme="minimal"] .modal-box,
[data-theme="academie"] .bubble,
[data-theme="academie"] .task-card,
[data-theme="academie"] .modal-box {
    box-shadow: 
        0 1px 0 rgba(255, 255, 255, 0.8) inset,
        0 -1px 0 rgba(0, 0, 0, 0.05) inset,
        0 10px 30px -10px rgba(0, 0, 0, 0.15) !important;
}

/* Matrix/Hacker themes - Green glow */
[data-theme="matrix"],
[data-theme="hacker"] {
    --accent-glow: rgba(0, 255, 100, 0.2);
}

/* Cyberpunk theme - Pink glow */
[data-theme="cyberpunk"] {
    --accent-glow: rgba(255, 0, 150, 0.2);
}

/* Ocean theme - Blue glow */
[data-theme="ocean"] {
    --accent-glow: rgba(0, 150, 255, 0.2);
}

/* Forest theme - Green glow */
[data-theme="forest"] {
    --accent-glow: rgba(34, 197, 94, 0.2);
}

/* Sunset theme - Orange glow */
[data-theme="sunset"] {
    --accent-glow: rgba(255, 150, 50, 0.2);
}

/* Aurora theme - Purple glow */
[data-theme="aurora"] {
    --accent-glow: rgba(150, 100, 255, 0.2);
}

/* =============================================
   CAMPAIGNS LAYOUT FIXES
   ============================================= */

/* Remove rotating divine light animation */
#view-campaigns::before {
    animation: none !important;
    display: none !important;
}

/* Fix campaigns view to take full width */
#view-campaigns {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Campaigns content takes full width with proper padding */
.campaigns-content {
    width: 100% !important;
    padding: 0 !important;
}

/* Campaigns panels - center content with max-width */
.campaigns-panel {
    width: 100% !important;
    box-sizing: border-box !important;
}

.campaigns-list-panel,
.templates-panel {
    padding: 32px 48px !important;
    width: 100% !important;
    max-width: 1400px !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
}

/* Stats row - full width and centered */
.campaign-stats-row {
    width: 100% !important;
    max-width: 100% !important;
    margin-bottom: 24px !important;
}

/* Table container - full width */
.campaigns-table-container {
    width: 100% !important;
}

/* Templates grid - better distribution */
.templates-grid {
    width: 100% !important;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
}

/* Contacts panel - proper layout */
.contacts-panel {
    width: 100% !important;
}

/* Header and tabs - full width with centered content */
.campaigns-header,
.campaigns-tabs {
    width: 100% !important;
    padding-left: 48px !important;
    padding-right: 48px !important;
}

/* =============================================
   FORCE MATRIX BACKGROUND ANIMATION VISIBILITY
   ============================================= */

/* Canvas DERRIÈRE tout le contenu (z-index: -1) */
#matrix-bg {
    display: block !important;
    visibility: visible !important;
    opacity: 0.3 !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: -1 !important;
    pointer-events: none !important;
}

body, .app-container {
    background: var(--bg-primary) !important;
}

.main-content, .view-container, #app-sidebar {
    position: relative !important;
    z-index: 1 !important;
    background: var(--bg-primary) !important;
}

/* =============================================
   CRITICAL FIX: Sidebar Layout Restoration v2.0
   Fixes: Sidebar 100% width + horizontal layout bug
   Date: 2026-02-12
   ============================================= */

/* Sidebar MUST be 260px wide, vertical, fixed to left */
.sidebar,
#app-sidebar {
    width: var(--sb-width-open, 260px) !important;
    max-width: 260px !important;
    min-width: 260px !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    height: 100vh !important;
    display: flex !important;
    flex-direction: column !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    z-index: 100 !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
}

/* BUGFIX 2026-02-12: Force width with ultra-high specificity (sidebar width 100% bug) */
body.logged-in aside#app-sidebar.sidebar {
    width: 260px !important;
    max-width: 260px !important;
    min-width: 260px !important;
}

/* Collapsed sidebar state (64px) */
body.sidebar-collapsed .sidebar,
body.sidebar-collapsed #app-sidebar,
body.logged-in.sidebar-collapsed aside#app-sidebar.sidebar {
    width: var(--sb-width-closed, 64px) !important;
    max-width: 64px !important;
    min-width: 64px !important;
}

/* Main content MUST have proper left margin for sidebar */
.main-content {
    margin-left: var(--sb-width-open, 260px) !important;
    min-height: 100vh !important;
    position: relative !important;
    z-index: 1 !important;
    width: calc(100% - var(--sb-width-open, 260px)) !important;
    /* margin-top removed - let views manage their own top spacing */
}

/* Main content when sidebar collapsed */
body.sidebar-collapsed .main-content {
    margin-left: var(--sb-width-closed, 64px) !important;
    width: calc(100% - var(--sb-width-closed, 64px)) !important;
}

/* Mobile: no margin, sidebar overlay */
@media (max-width: 768px) {
    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
    }

    .sidebar,
    #app-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    body.sidebar-mobile-open .sidebar,
    body.sidebar-mobile-open #app-sidebar {
        transform: translateX(0);
    }
}
