/**
 * PWA Installation Styles
 * Styles pour le bouton d'installation PWA
 */

/* Banner d'installation PWA */
.pwa-install-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    animation: slideUp 0.3s ease-out;
    max-width: 400px;
    margin: 0 auto;
}

.pwa-install-content {
    display: flex;
    align-items: center;
    padding: 16px;
    gap: 12px;
}

.pwa-install-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
}

.pwa-install-text {
    flex: 1;
    color: white;
}

.pwa-install-text h4 {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 600;
    color: white;
}

.pwa-install-text p {
    margin: 0;
    font-size: 14px;
    opacity: 0.9;
    line-height: 1.4;
}

.pwa-install-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pwa-install-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pwa-install-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.pwa-install-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.pwa-install-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* Instructions iOS */
.ios-instructions {
    background: linear-gradient(135deg, #007AFF 0%, #5856D6 100%);
}

.ios-instructions .pwa-install-text p {
    font-size: 13px;
}

.ios-instructions .pwa-install-text i {
    color: #FFD700;
    margin: 0 2px;
}

/* Étapes d'installation iOS */
.pwa-ios-steps {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    margin-top: 12px;
    padding-top: 16px;
}

.pwa-steps-content {
    padding: 0 16px 16px 16px;
}

.pwa-step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.pwa-step:last-of-type {
    margin-bottom: 20px;
}

.pwa-step-number {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: white;
}

.pwa-step-text {
    flex: 1;
    color: white;
    font-size: 14px;
    line-height: 1.4;
    padding-top: 2px;
}

.pwa-share-icon {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    margin: 0 2px;
}

.pwa-got-it-btn {
    width: 100%;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.pwa-got-it-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

/* Message de succès */
.pwa-success-message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #27AE60;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    z-index: 10001;
    animation: slideDown 0.3s ease-out;
}

.pwa-success-content {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.pwa-success-content i {
    font-size: 18px;
}

/* Animations */
@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        transform: translateX(-50%) translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 480px) {
    .pwa-install-banner {
        left: 10px;
        right: 10px;
        bottom: 10px;
    }
    
    .pwa-install-content {
        padding: 12px;
        gap: 10px;
    }
    
    .pwa-install-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .pwa-install-text h4 {
        font-size: 15px;
    }
    
    .pwa-install-text p {
        font-size: 13px;
    }
    
    .pwa-install-btn {
        padding: 6px 12px;
        font-size: 13px;
    }
}

/* Masquer sur desktop si pas nécessaire */
@media (min-width: 1024px) {
    .pwa-install-banner {
        max-width: 350px;
    }
}

/* Mode sombre */
@media (prefers-color-scheme: dark) {
    .pwa-install-banner {
        background: linear-gradient(135deg, #1a1a1a 0%, #2c3e50 100%);
    }
    
    .ios-instructions {
        background: linear-gradient(135deg, #1a1a1a 0%, #007AFF 100%);
    }
}

/* Styles pour la version ultra-avancée */
.pwa-ios-progress {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    margin-top: 12px;
    padding-top: 16px;
}

.pwa-progress-content {
    padding: 0 16px 16px 16px;
}

.pwa-progress-step {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.pwa-progress-step.active {
    opacity: 1;
    transform: scale(1.02);
}

.pwa-progress-step.failed {
    opacity: 0.3;
    color: #ff6b6b;
}

.pwa-step-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.pwa-progress-step.active .pwa-step-icon {
    background: rgba(255, 255, 255, 0.4);
    animation: pulse 1.5s infinite;
}

.pwa-progress-step.failed .pwa-step-icon {
    background: rgba(255, 107, 107, 0.3);
}

.pwa-progress-step .pwa-step-text {
    flex: 1;
    color: white;
    font-size: 14px;
    font-weight: 500;
}

.pwa-ios-fallback {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    margin-top: 12px;
    padding-top: 16px;
}

.pwa-fallback-content {
    padding: 0 16px 16px 16px;
}

.pwa-fallback-text {
    text-align: center;
    margin-bottom: 16px;
}

.pwa-fallback-text h5 {
    color: white;
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
}

.pwa-fallback-text p {
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    font-size: 14px;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 8px rgba(255, 255, 255, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

/* Animation de chargement */
.pwa-progress-step.active .pwa-step-icon::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Styles pour le guide visuel */
.pwa-visual-guide {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    margin-top: 12px;
    padding-top: 16px;
}

.pwa-guide-content {
    padding: 0 16px 16px 16px;
}

.pwa-guide-step {
    margin-bottom: 24px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    border-left: 4px solid rgba(255, 255, 255, 0.3);
}

.pwa-step-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.pwa-step-header .pwa-step-number {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: white;
}

.pwa-step-header h5 {
    margin: 0;
    color: white;
    font-size: 16px;
    font-weight: 600;
}

.pwa-step-content {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    line-height: 1.5;
}

.pwa-step-content p {
    margin: 0 0 12px 0;
}

.pwa-option-highlight {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    margin: 12px 0;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

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

.pwa-option-text {
    flex: 1;
    color: white;
    font-weight: 500;
}

.pwa-plus-sign {
    background: #27ae60;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    margin-left: 8px;
}

.pwa-visual-demo {
    margin: 16px 0;
    display: flex;
    justify-content: center;
}

.pwa-phone-mockup {
    width: 120px;
    height: 200px;
    background: #2c3e50;
    border-radius: 20px;
    padding: 20px;
    position: relative;
}

.pwa-screen {
    width: 100%;
    height: 100%;
    background: #34495e;
    border-radius: 12px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 20px;
}

.pwa-share-button-demo {
    font-size: 24px;
    animation: bounce 2s infinite;
}

.pwa-menu-mockup {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 8px;
    min-width: 200px;
}

.pwa-menu-item {
    padding: 12px 16px;
    color: white;
    font-size: 14px;
    border-radius: 8px;
    margin: 4px 0;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
}

.pwa-menu-item.normal {
    background: rgba(255, 255, 255, 0.1);
}

.pwa-menu-item.highlight {
    background: rgba(39, 174, 96, 0.3);
    border: 2px solid #27ae60;
    animation: pulse 2s infinite;
}

.pwa-menu-icon {
    font-size: 16px;
}

.pwa-confirm-mockup {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    min-width: 180px;
}

.pwa-confirm-text {
    color: white;
    font-size: 14px;
    margin-bottom: 16px;
    text-align: center;
}

.pwa-confirm-buttons {
    display: flex;
    gap: 8px;
}

.pwa-cancel-btn, .pwa-add-btn {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
}

.pwa-cancel-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.pwa-add-btn {
    background: #27ae60;
    color: white;
}

.pwa-guide-actions {
    margin-top: 20px;
    display: flex;
    gap: 12px;
}

.pwa-open-share-btn {
    flex: 1;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.pwa-open-share-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.pwa-help-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    z-index: 10002;
    max-width: 300px;
    animation: slideIn 0.3s ease-out;
}

.pwa-help-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.pwa-help-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.pwa-help-text {
    flex: 1;
}

.pwa-help-text h5 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
}

.pwa-help-text p {
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
}

.pwa-help-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    flex-shrink: 0;
}

.pwa-help-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

@keyframes slideIn {
    from {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0;
    }
    to {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

/* Styles pour la détection Safari */
.pwa-safari-info {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    margin-top: 12px;
    padding-top: 16px;
}

.pwa-info-content {
    padding: 0 16px 16px 16px;
}

.pwa-info-header h5 {
    margin: 0 0 12px 0;
    color: white;
    font-size: 16px;
    font-weight: 600;
}

.pwa-info-text {
    margin-bottom: 16px;
}

.pwa-info-text p {
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    line-height: 1.5;
}

.pwa-browser-detection {
    margin: 16px 0;
}

.pwa-browser-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    margin: 8px 0;
    transition: all 0.3s ease;
}

.pwa-browser-item.active {
    background: rgba(39, 174, 96, 0.2);
    border: 1px solid #27ae60;
}

.pwa-browser-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.pwa-browser-name {
    flex: 1;
    color: white;
    font-weight: 500;
}

.pwa-browser-status {
    font-size: 12px;
    font-weight: 500;
}

.pwa-browser-item.active .pwa-browser-status {
    color: #27ae60;
}

.pwa-instructions {
    margin: 16px 0;
}

.pwa-instructions h6 {
    margin: 0 0 8px 0;
    color: white;
    font-size: 14px;
    font-weight: 600;
}

.pwa-instructions ol {
    margin: 0;
    padding-left: 20px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    line-height: 1.4;
}

.pwa-instructions li {
    margin: 4px 0;
}

.pwa-copy-url-btn {
    width: 100%;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.pwa-copy-url-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.pwa-safari-instructions {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.95);
    color: white;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    z-index: 10003;
    max-width: 320px;
    animation: slideIn 0.3s ease-out;
}

.pwa-instructions-content {
    text-align: center;
}

.pwa-instructions-header h5 {
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 600;
    color: white;
}

.pwa-instructions-steps {
    margin: 20px 0;
}

.pwa-instruction-step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 16px 0;
    text-align: left;
}

.pwa-instruction-step .pwa-step-number {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: white;
}

.pwa-instruction-step .pwa-step-text {
    flex: 1;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    line-height: 1.4;
}

.pwa-instructions-close {
    width: 100%;
    background: #27ae60;
    border: none;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.pwa-instructions-close:hover {
    background: #229954;
    transform: translateY(-1px);
}

.pwa-copy-success {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #27ae60;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    z-index: 10004;
    animation: slideDown 0.3s ease-out;
}

.pwa-copy-content {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.pwa-copy-content i {
    font-size: 16px;
}

/* Styles pour la version instructions seules */
.pwa-ios-instructions-content {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    margin-top: 12px;
    padding-top: 16px;
}

.pwa-instructions-wrapper {
    padding: 0 16px 16px 16px;
}

.pwa-instructions-header {
    text-align: center;
    margin-bottom: 24px;
}

.pwa-instructions-header h5 {
    margin: 0 0 8px 0;
    color: white;
    font-size: 18px;
    font-weight: 600;
}

.pwa-instructions-header p {
    margin: 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

.pwa-instruction-step {
    margin-bottom: 24px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    border-left: 4px solid rgba(255, 255, 255, 0.3);
}

.pwa-step-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.pwa-step-header .pwa-step-number {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: white;
}

.pwa-step-header h6 {
    margin: 0;
    color: white;
    font-size: 16px;
    font-weight: 600;
}

.pwa-step-content {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    line-height: 1.5;
}

.pwa-step-content p {
    margin: 0 0 12px 0;
}

.pwa-instructions-footer {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.pwa-tip {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 193, 7, 0.2);
    border-radius: 8px;
    margin-bottom: 16px;
    border-left: 4px solid #ffc107;
}

.pwa-tip-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.pwa-tip-text {
    flex: 1;
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    line-height: 1.4;
}

.pwa-tip-text strong {
    color: white;
}

/* Styles pour la version compacte */
.pwa-instruction-step.compact {
    margin-bottom: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    border-left: 3px solid rgba(255, 255, 255, 0.3);
}

.pwa-instruction-step.compact .pwa-step-header {
    margin-bottom: 0;
}

.pwa-instruction-step.compact .pwa-step-header h6 {
    font-size: 14px;
    margin: 0;
}

.pwa-instruction-step.compact .pwa-step-header .pwa-step-number {
    width: 24px;
    height: 24px;
    font-size: 12px;
}

.pwa-tip.compact {
    padding: 8px 12px;
    margin-bottom: 12px;
}

.pwa-tip.compact .pwa-tip-icon {
    font-size: 16px;
}

.pwa-tip.compact .pwa-tip-text {
    font-size: 12px;
}

.pwa-instructions-header h5 {
    font-size: 16px;
    margin-bottom: 16px;
}

.pwa-instructions-wrapper {
    padding: 0 12px 12px 12px;
}

.pwa-instructions-footer {
    margin-top: 16px;
    padding-top: 12px;
}
