/* ============================================================================
   AUTO-SAVE INDICATOR STYLES - auto-save-indicator.css
   ============================================================================ */

/* Indicateur d'auto-sauvegarde */
.auto-save-indicator {
    position: fixed;
    bottom: 80px;
    right: 20px;
    background: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95em;
    font-weight: 500;
    z-index: 9999;
    opacity: 0;
    transform: translateX(120%);
    transition: all 0.3s ease-in-out;
    pointer-events: none;
}

.auto-save-indicator.show {
    opacity: 1;
    transform: translateX(0);
}

/* États de l'indicateur */
.auto-save-indicator.saving {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #1976d2;
    border-left: 4px solid #2196F3;
}

.auto-save-indicator.saved {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    color: #2e7d32;
    border-left: 4px solid #4CAF50;
}

.auto-save-indicator.error {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    color: #c62828;
    border-left: 4px solid #f44336;
}

.auto-save-indicator.restored {
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
    color: #f57f17;
    border-left: 4px solid #FFC107;
}

/* Icône de l'indicateur */
.auto-save-indicator .icon {
    font-size: 1.3em;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Animation de rotation pour "saving" */
.auto-save-indicator.saving .icon {
    animation: rotate 1s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Animation de pulsation pour "saved" */
.auto-save-indicator.saved .icon {
    animation: pulse 0.5s ease-in-out;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .auto-save-indicator {
        bottom: 70px;
        right: 10px;
        font-size: 0.85em;
        padding: 10px 15px;
    }
}

/* Badge de dernière sauvegarde */
.last-save-badge {
    position: fixed;
    bottom: 125px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75em;
    color: #666;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.last-save-badge.show {
    opacity: 1;
}

.last-save-badge::before {
    content: "🕐 ";
}

/* Message de restauration */
.restore-notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 10000;
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
    transition: all 0.3s ease-in-out;
}

.restore-notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.restore-notification .icon {
    font-size: 1.5em;
}

.restore-notification .message {
    flex: 1;
}

.restore-notification .message strong {
    display: block;
    margin-bottom: 5px;
    color: #333;
}

.restore-notification .message span {
    font-size: 0.9em;
    color: #666;
}

.restore-notification .actions {
    display: flex;
    gap: 10px;
}

.restore-notification button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.restore-notification .btn-restore {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.restore-notification .btn-restore:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.restore-notification .btn-dismiss {
    background: #e0e0e0;
    color: #666;
}

.restore-notification .btn-dismiss:hover {
    background: #d0d0d0;
}
