/* PWA Simple Client - Styles */

/* Prompt d'installation */
.pwa-install-prompt {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    max-width: 400px;
    width: 90%;
}

.pwa-prompt-content {
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    text-align: center;
}

.pwa-prompt-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.pwa-prompt-content h3 {
    margin: 0 0 10px 0;
    font-size: 20px;
    color: #333;
}

.pwa-prompt-content p {
    margin: 0 0 20px 0;
    color: #666;
    font-size: 14px;
}

.pwa-prompt-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.pwa-btn-primary,
.pwa-btn-secondary {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: bold;
}

.pwa-btn-primary {
    background: #4caf50;
    color: white;
}

.pwa-btn-primary:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.pwa-btn-secondary {
    background: #f5f5f5;
    color: #666;
}

.pwa-btn-secondary:hover {
    background: #e0e0e0;
}

/* Bouton d'installation */
.pwa-install-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: #2196f3;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.pwa-install-btn:hover {
    background: #1976d2;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* Toast notifications */
.pwa-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 300px;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.pwa-toast-success {
    background: #4caf50;
    color: white;
}

.pwa-toast-warning {
    background: #ff9800;
    color: white;
}

.pwa-toast-error {
    background: #f44336;
    color: white;
}

.pwa-toast-info {
    background: #2196f3;
    color: white;
}

.pwa-toast-icon::before {
    font-size: 20px;
}

.pwa-toast-success .pwa-toast-icon::before {
    content: '✓';
}

.pwa-toast-warning .pwa-toast-icon::before {
    content: '⚠';
}

.pwa-toast-error .pwa-toast-icon::before {
    content: '✗';
}

.pwa-toast-info .pwa-toast-icon::before {
    content: 'ℹ';
}

/* État offline */
body.offline::before {
    content: '⚠️ Hors ligne';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #ff9800;
    color: white;
    text-align: center;
    padding: 10px;
    font-weight: bold;
    z-index: 9998;
}

/* État installé */
body.pwa-installed .pwa-install-btn,
body.pwa-installed .pwa-install-prompt {
    display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    .pwa-install-prompt {
        bottom: 10px;
        width: 95%;
    }
    
    .pwa-prompt-content {
        padding: 15px;
    }
    
    .pwa-prompt-content h3 {
        font-size: 18px;
    }
    
    .pwa-prompt-buttons {
        flex-direction: column;
    }
    
    .pwa-toast {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}
