/* notepadApp.css - Styles pour l'application Bloc-notes avec Export/Import */

/* Overlay principal */
.notepad-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

.notepad-popup-overlay.active {
    display: flex;
    animation: fadeIn 0.2s ease;
}

/* Contenu de la popup - pleine hauteur */
.notepad-popup-content {
    background: var(--card-bg, white);
    width: 90%;
    max-width: 900px;
    height: 90%;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

/* Header */
.notepad-popup-header {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notepad-popup-header h2 {
    margin: 0;
    font-size: 18px;
}

.notepad-popup-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.notepad-popup-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Corps de la popup */
.notepad-popup-body {
    display: flex;
    flex: 1;
    overflow: hidden;
    height: calc(100% - 120px);
}

/* Sidebar des notes */
.notes-sidebar {
    width: 250px;
    background: var(--secondary-bg, #f8f9fa);
    border-right: 1px solid #ddd;
    display: flex;
    flex-direction: column;
}

.notes-list-header {
    padding: 15px;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notes-list-header h3 {
    margin: 0;
    font-size: 16px;
    color: var(--text-color, #333);
}

.add-note-btn {
    background: #667eea;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.add-note-btn:hover {
    background: #764ba2;
    transform: rotate(90deg);
}

/* Liste des notes */
.notes-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.note-item {
    background: white;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.note-item:hover {
    transform: translateX(5px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.note-item.active {
    border-color: #667eea;
    background: linear-gradient(to right, rgba(102, 126, 234, 0.1), transparent);
}

.note-item-title {
    font-weight: bold;
    color: var(--text-color, #333);
    margin-bottom: 5px;
}

.note-item-preview {
    font-size: 12px;
    color: var(--text-secondary, #666);
    margin-bottom: 5px;
}

.note-item-date {
    font-size: 10px;
    color: #999;
}

/* NOUVEAU: Section Export/Import */
.notes-backup-section {
    padding: 10px;
    border-top: 1px solid #ddd;
    display: flex;
    gap: 8px;
    background: var(--secondary-bg, #f8f9fa);
}

.backup-btn {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s;
    color: white;
}

.export-btn {
    background: linear-gradient(135deg, #48bb78, #38a169);
}

.export-btn:hover {
    background: linear-gradient(135deg, #38a169, #2f855a);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(72, 187, 120, 0.3);
}

.import-btn {
    background: linear-gradient(135deg, #4299e1, #3182ce);
}

.import-btn:hover {
    background: linear-gradient(135deg, #3182ce, #2c5282);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(66, 153, 225, 0.3);
}

/* Éditeur de note */
.note-editor {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
    overflow: hidden;
    position: relative;
}

/* NOUVEAU: Sélecteur d'arrière-plan */
.note-background-selector {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 100;
}

.background-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2, #f093fb, #f5576c);
    background-size: 300% 300%;
    animation: gradient-shift 3s ease infinite;
    border: 2px solid white;
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    color: white;
}

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

.background-btn .material-icons {
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.background-btn:hover {
    transform: scale(1.15) rotate(10deg);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.background-btn:active {
    transform: scale(1.05) rotate(0deg);
}

.background-options {
    position: absolute;
    top: 50px;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 10px;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.9) translateY(-10px);
    transition: all 0.3s;
    z-index: 101;
}

.background-options.show {
    opacity: 1;
    visibility: visible;
    transform: scale(1) translateY(0);
}

.background-options-grid {
    display: grid;
    grid-template-columns: repeat(4, 40px);
    gap: 8px;
    width: 192px;
}

.background-option {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.background-option:hover {
    transform: scale(1.1);
    border-color: #667eea;
}

.background-option.selected {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.background-check {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #667eea;
    font-size: 20px;
    display: none;
    background: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
}

.background-option.selected .background-check {
    display: block;
}

.note-title-input {
    width: 100%;
    padding: 10px;
    padding-right: 60px; /* Espace pour le bouton palette */
    font-size: 18px;
    font-weight: bold;
    border: none;
    border-bottom: 2px solid #eee;
    margin-bottom: 15px;
    background: transparent;
    color: var(--text-color, #333);
}

.note-title-input:focus {
    outline: none;
    border-bottom-color: #667eea;
}

.note-content-area {
    flex: 1;
    width: 100%;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 8px;
    resize: none;
    font-family: inherit;
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-color, #333);
    background: var(--card-bg, white);
    min-height: 300px;
    overflow-y: auto;
    transition: background-color 0.3s, color 0.3s;
}

.note-content-area:focus {
    outline: none;
    border-color: var(--primary-color, #667eea);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Actions de note */
.note-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.note-date {
    font-size: 12px;
    color: #999;
}

.note-buttons {
    display: flex;
    gap: 10px;
}

.note-btn {
    padding: 8px 15px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    transition: all 0.3s;
}

.save-btn {
    background: #667eea;
    color: white;
}

.save-btn:hover {
    background: #5a67d8;
}

.delete-btn {
    background: #f56565;
    color: white;
}

.delete-btn:hover {
    background: #e53e3e;
}

/* Footer */
.notepad-popup-footer {
    background: var(--secondary-bg, #f8f9fa);
    padding: 10px 20px;
    text-align: center;
    font-size: 12px;
    color: var(--text-secondary, #666);
}

/* Toast amélioré */
.notepad-toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #4CAF50;
    color: white;
    padding: 14px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 10002;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
}

.notepad-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* === RESPONSIVE === */

/* Mobile - pleine page */
@media (max-width: 768px) {
    .notepad-popup-content {
        width: 100%;
        height: 100%;
        max-width: 100%;
        border-radius: 0;
    }
    
    .notepad-popup-body {
        flex-direction: column;
        height: calc(100% - 100px);
        overflow: hidden;
    }
    
    .notes-sidebar {
        width: 100%;
        min-height: 150px;
        max-height: 250px;
        border-right: none;
        border-bottom: 2px solid #ddd;
        flex-shrink: 0;
    }
    
    .notes-list {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 10px;
        gap: 10px;
        height: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .note-item {
        min-width: 120px;
        max-width: 150px;
        margin-bottom: 0;
        height: fit-content;
    }
    
    /* Section Export/Import mobile */
    .notes-backup-section {
        position: sticky;
        bottom: 0;
        border-top: 2px solid #ddd;
        background: var(--secondary-bg, #f8f9fa);
        padding: 8px;
        gap: 6px;
    }
    
    .backup-btn {
        font-size: 12px;
        padding: 10px 8px;
    }
    
    .backup-btn .material-icons {
        font-size: 18px;
    }

    .note-editor {
        flex: 1;
        padding: 15px;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
        min-height: 0;
    }
    
    /* Sélecteur d'arrière-plan mobile */
    .note-background-selector {
        top: 15px;
        right: 15px;
    }
    
    .background-btn {
        width: 35px;
        height: 35px;
    }
    
    .background-options {
        right: -10px;
    }
    
    .background-options-grid {
        grid-template-columns: repeat(3, 40px);
        width: 144px;
    }
    
    .note-content-area {
        flex: 1;
        font-size: 16px;
        line-height: 1.8;
        min-height: 200px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .note-title-input {
        padding: 8px;
        padding-right: 50px;
        font-size: 16px;
        margin-bottom: 10px;
    }
    
    .note-actions {
        position: sticky;
        bottom: 0;
        background: var(--card-bg, white);
        padding: 10px 0;
        margin-top: 10px;
        border-top: 1px solid #eee;
    }
    
    .note-btn {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .notepad-popup-footer {
        padding: 8px 15px;
        font-size: 11px;
    }
    
    .notepad-popup-close {
        width: 44px !important;
        height: 44px !important;
        position: absolute;
        top: 5px;
        right: 10px;
        z-index: 10001;
    }
    
    .notepad-popup-header {
        padding-right: 60px;
    }
    
    .notepad-toast {
        bottom: 20px;
        width: 90%;
        max-width: 300px;
    }
} 0;
        height: fit-content;
    }
    
    /* Section Export/Import mobile */
    .notes-backup-section {
        position: sticky;
        bottom: 0;
        border-top: 2px solid #ddd;
        background: var(--secondary-bg, #f8f9fa);
        padding: 8px;
        gap: 6px;
    }
    
    .backup-btn {
        font-size: 12px;
        padding: 10px 8px;
    }
    
    .backup-btn .material-icons {
        font-size: 18px;
    }

    .note-editor {
        flex: 1;
        padding: 15px;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
        min-height: 0;
    }
    
    /* Sélecteur d'arrière-plan mobile */
    .note-background-selector {
        top: 6px;
        right: 15px;
    }
    
    .background-btn {
        width: 35px;
        height: 35px;
    }
    
    .background-options {
        right: -10px;
    }
    
    .background-options-grid {
        grid-template-columns: repeat(3, 40px);
        width: 144px;
    }
    
    .note-content-area {
        flex: 1;
        font-size: 16px;
        line-height: 1.8;
        min-height: 200px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .note-title-input {
        padding: 8px;
        padding-right: 50px;
        font-size: 16px;
        margin-bottom: 10px;
    }
    
    .note-actions {
        position: sticky;
        bottom: 0;
        background: var(--card-bg, white);
        padding: 10px 0;
        margin-top: 10px;
        border-top: 1px solid #eee;
    }
    
    .note-btn {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .notepad-popup-footer {
        padding: 8px 15px;
        font-size: 11px;
    }
    
    .notepad-popup-close {
        width: 44px !important;
        height: 44px !important;
        position: absolute;
        top: 5px;
        right: 10px;
        z-index: 10001;
    }
    
    .notepad-popup-header {
        padding-right: 60px;
    }
    
    .notepad-toast {
        bottom: 20px;
        width: 90%;
        max-width: 300px;
    }
    
    /* Section Export/Import mobile */
    .notes-backup-section {
        position: sticky;
        bottom: 0;
        border-top: 2px solid #ddd;
        background: var(--secondary-bg, #f8f9fa);
        padding: 8px;
        gap: 6px;
    }
    
    .backup-btn {
        font-size: 12px;
        padding: 10px 8px;
    }
    
    .backup-btn .material-icons {
        font-size: 18px;
    }

    .note-editor {
        flex: 1;
        padding: 15px;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
        min-height: 0;
    }
    
    .note-content-area {
        flex: 1;
        font-size: 16px;
        line-height: 1.8;
        min-height: 200px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .note-title-input {
        padding: 8px;
        font-size: 16px;
        margin-bottom: 10px;
    }
    
    .note-actions {
        position: sticky;
        bottom: 0;
        background: var(--card-bg, white);
        padding: 10px 0;
        margin-top: 10px;
        border-top: 1px solid #eee;
    }
    
    .note-btn {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .notepad-popup-footer {
        padding: 8px 15px;
        font-size: 11px;
    }
    
    .notepad-popup-close {
    width: 44px !important;
    height: 44px !important;
    position: relative;
    top: -1px;
    right: -45px;
    z-index: 10001;
	}
    
    .notepad-popup-header {
        padding-right: 60px;
    }
    
    .notepad-toast {
        bottom: 20px;
        width: 90%;
        max-width: 300px;
    }

/* Petits écrans */
@media (max-height: 600px) {
    .notes-sidebar {
        max-height: 150px;
        min-height: 100px;
    }
    
    .notepad-popup-header {
        padding: 10px 15px;
    }
    
    .notepad-popup-header h2 {
        font-size: 16px;
    }
    
    .notes-backup-section {
        padding: 6px;
    }
    
    .backup-btn {
        font-size: 11px;
        padding: 8px 6px;
    }
}

/* Bouton de fermeture mobile */
.mobile-close-btn {
    width: 100%;
    padding: 15px;
    background: #dc3545;
    color: white;
    border: none;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 0 0 15px 15px;
    position: sticky;
    bottom: 0;
    z-index: 10;
    display: none;
}

.mobile-close-btn:active {
    background: #c82333;
}

@media (max-width: 768px) {
    .mobile-close-btn {
        display: block;
    }
}

/* === SUPPORT POUR TOUS LES THÈMES === */

/* Thème Rouge (défaut) */
[data-theme="rouge"] .notepad-popup-content {
    --notepad-primary: #940000;
    --notepad-primary-light: rgba(148, 0, 0, 0.1);
    --notepad-bg: white;
    --notepad-sidebar-bg: #f8f9fa;
    --notepad-text: #333333;
    --notepad-text-secondary: #666666;
    --notepad-border: #ddd;
    --notepad-item-bg: white;
}

[data-theme="rouge"] .notepad-popup-header {
    background: linear-gradient(135deg, #940000, #c41e3a);
}

[data-theme="rouge"] .add-note-btn,
[data-theme="rouge"] .save-btn {
    background: #940000;
}

[data-theme="rouge"] .add-note-btn:hover,
[data-theme="rouge"] .save-btn:hover {
    background: #7a0000;
}

[data-theme="rouge"] .note-item.active {
    border-color: #940000;
    background: linear-gradient(to right, rgba(148, 0, 0, 0.1), transparent);
}

[data-theme="rouge"] .note-title-input:focus,
[data-theme="rouge"] .note-content-area:focus {
    border-color: #940000;
}

[data-theme="rouge"] .mobile-close-btn {
    background: linear-gradient(135deg, #940000, #c41e3a);
}

/* Bouton palette thème rouge */
[data-theme="rouge"] .background-btn {
    background: linear-gradient(135deg, #940000, #c41e3a, #ff6b6b, #ffa500);
    background-size: 300% 300%;
    animation: gradient-shift 3s ease infinite;
    border: 2px solid white;
    box-shadow: 0 3px 10px rgba(148, 0, 0, 0.3);
}

[data-theme="rouge"] .background-btn:hover {
    box-shadow: 0 5px 15px rgba(148, 0, 0, 0.5);
}

/* Thème Sombre (dark) */
[data-theme="dark"] .notepad-popup-content {
    --notepad-primary: #ff6b6b;
    --notepad-primary-light: rgba(255, 107, 107, 0.1);
    --notepad-bg: #2d3748;
    --notepad-sidebar-bg: #1a202c;
    --notepad-text: #e2e8f0;
    --notepad-text-secondary: #a0aec0;
    --notepad-border: #4a5568;
    --notepad-item-bg: #2d3748;
    background: #2d3748;
}

[data-theme="dark"] .notepad-popup-header {
    background: linear-gradient(135deg, #1a237e, #002cad);
}

[data-theme="dark"] .notes-sidebar {
    background: #1a202c;
    border-right-color: #4a5568;
}

[data-theme="dark"] .notes-list-header {
    border-bottom-color: #4a5568;
}

[data-theme="dark"] .notes-list-header h3 {
    color: #e2e8f0;
}

[data-theme="dark"] .note-item {
    background: #2d3748;
    color: #e2e8f0;
}

[data-theme="dark"] .note-item.active {
    border-color: #ff6b6b;
    background: linear-gradient(to right, rgba(255, 107, 107, 0.1), transparent);
}

[data-theme="dark"] .note-title-input,
[data-theme="dark"] .note-content-area {
    background: #2d3748;
    color: #e2e8f0;
    border-color: #4a5568;
}

[data-theme="dark"] .note-title-input:focus,
[data-theme="dark"] .note-content-area:focus {
    border-color: #ff6b6b;
}

[data-theme="dark"] .add-note-btn,
[data-theme="dark"] .save-btn {
    background: linear-gradient(135deg, #1a237e, #002cad);
}

[data-theme="dark"] .add-note-btn:hover,
[data-theme="dark"] .save-btn:hover {
    background: #ff5252;
}

[data-theme="dark"] .notepad-popup-footer {
    background: #1a202c;
    color: #a0aec0;
}

[data-theme="dark"] .notes-backup-section {
    background: #1a202c;
    border-top-color: #4a5568;
}

[data-theme="dark"] .mobile-close-btn {
    background: linear-gradient(135deg, #1a237e, #002cad);
}

/* Sélecteur d'arrière-plan en mode sombre */
[data-theme="dark"] .background-btn {
    background: linear-gradient(135deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4);
    background-size: 300% 300%;
    animation: gradient-shift 3s ease infinite;
    border: 2px solid #4a5568;
    box-shadow: 0 3px 10px rgba(255, 107, 107, 0.3);
    color: white;
}

[data-theme="dark"] .background-btn:hover {
    transform: scale(1.15) rotate(10deg);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.5);
}

[data-theme="dark"] .background-options {
    background: #2d3748;
    border: 1px solid #4a5568;
}

[data-theme="dark"] .background-option:hover {
    border-color: #ff6b6b;
}

[data-theme="dark"] .background-option.selected {
    border-color: #ff6b6b;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.2);
}

[data-theme="dark"] .background-check {
    color: #ff6b6b;
    background: #2d3748;
}

/* Thème Bleu Ciel (bleuciel) */
[data-theme="bleuciel"] .notepad-popup-content {
    --notepad-primary: #17a2b8;
    --notepad-primary-light: rgba(23, 162, 184, 0.1);
    --notepad-bg: white;
    --notepad-sidebar-bg: #f0f8ff;
    --notepad-text: #333333;
    --notepad-text-secondary: #5f6f7a;
    --notepad-border: #b8daff;
    --notepad-item-bg: white;
}

[data-theme="bleuciel"] .notepad-popup-header {
    background: linear-gradient(135deg, #17a2b8, #20c997);
}

[data-theme="bleuciel"] .notes-sidebar {
    background: #f0f8ff;
    border-right-color: #b8daff;
}

[data-theme="bleuciel"] .add-note-btn,
[data-theme="bleuciel"] .save-btn {
    background: #17a2b8;
}

[data-theme="bleuciel"] .add-note-btn:hover,
[data-theme="bleuciel"] .save-btn:hover {
    background: #138496;
}

[data-theme="bleuciel"] .note-item.active {
    border-color: #17a2b8;
    background: linear-gradient(to right, rgba(23, 162, 184, 0.1), transparent);
}

[data-theme="bleuciel"] .mobile-close-btn {
    background: linear-gradient(135deg, #17a2b8, #20c997);
}

/* Bouton palette thème bleu ciel */
[data-theme="bleuciel"] .background-btn {
    background: linear-gradient(135deg, #17a2b8, #20c997, #48dbfb, #00d2d3);
    background-size: 300% 300%;
    animation: gradient-shift 3s ease infinite;
    border: 2px solid white;
    box-shadow: 0 3px 10px rgba(23, 162, 184, 0.3);
}

[data-theme="bleuciel"] .background-btn:hover {
    box-shadow: 0 5px 15px rgba(23, 162, 184, 0.5);
}

/* Thème Violet (light) */
[data-theme="light"] .notepad-popup-content {
    --notepad-primary: #6f42c1;
    --notepad-primary-light: rgba(111, 66, 193, 0.1);
    --notepad-bg: white;
    --notepad-sidebar-bg: #f8f9ff;
    --notepad-text: #333333;
    --notepad-text-secondary: #6c757d;
    --notepad-border: #dee2e6;
    --notepad-item-bg: white;
}

[data-theme="light"] .notepad-popup-header {
    background: linear-gradient(135deg, #6f42c1, #e83e8c);
}

[data-theme="light"] .add-note-btn,
[data-theme="light"] .save-btn {
    background: #6f42c1;
}

[data-theme="light"] .add-note-btn:hover,
[data-theme="light"] .save-btn:hover {
    background: #5a32a3;
}

[data-theme="light"] .note-item.active {
    border-color: #6f42c1;
    background: linear-gradient(to right, rgba(111, 66, 193, 0.1), transparent);
}

[data-theme="light"] .mobile-close-btn {
    background: linear-gradient(135deg, #6f42c1, #e83e8c);
}

/* Bouton palette thème violet */
[data-theme="light"] .background-btn {
    background: linear-gradient(135deg, #6f42c1, #e83e8c, #f093fb, #f5576c);
    background-size: 300% 300%;
    animation: gradient-shift 3s ease infinite;
    border: 2px solid white;
    box-shadow: 0 3px 10px rgba(111, 66, 193, 0.3);
}

[data-theme="light"] .background-btn:hover {
    box-shadow: 0 5px 15px rgba(111, 66, 193, 0.5);
}

/* Utiliser les variables CSS pour les éléments communs */
.notepad-popup-content {
    background: var(--notepad-bg);
}

.notes-sidebar {
    background: var(--notepad-sidebar-bg);
    border-right-color: var(--notepad-border);
}

.note-item {
    background: var(--notepad-item-bg);
}

.note-item-title {
    color: var(--notepad-text);
}

.note-item-preview {
    color: var(--notepad-text-secondary);
}

.note-title-input {
    color: var(--notepad-text);
    border-bottom-color: var(--notepad-border);
}

.note-content-area {
    background: var(--notepad-bg);
    border-color: var(--notepad-border);
    color: var(--notepad-text);
    caret-color: var(--primary-color, #667eea);
}

.notepad-popup-footer {
    background: var(--notepad-sidebar-bg);
    color: var(--notepad-text-secondary);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes neon-glow {
    from {
        box-shadow: 
            0 0 10px #ff1744,
            0 0 20px #ff1744,
            0 0 30px #ff1744,
            0 4px 8px rgba(0,0,0,0.3);
    }
    to {
        box-shadow: 
            0 0 15px #ff1744,
            0 0 30px #ff1744,
            0 0 45px #ff1744,
            0 6px 12px rgba(0,0,0,0.4);
    }
}

/* Empêcher le scroll du body quand popup ouverte */
body.notepad-popup-open {
    overflow: hidden !important;
}