/* ============================================ */
/* PWA Install Prompt Styles */
/* Design moderne pour l'installation */
/* ============================================ */

/* Bannière d'installation */
.install-banner {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    max-width: 500px;
    z-index: 9999;
    transition: bottom 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.install-banner.show {
    bottom: 16px;
}

.install-content {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 16px 20px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.12),
        0 2px 8px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.4);
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.install-icon {
    font-size: 40px;
    line-height: 1;
    flex-shrink: 0;
}

.install-text {
    flex: 1;
    min-width: 0;
}

.install-title {
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 2px;
}

.install-subtitle {
    font-size: 13px;
    color: #6b7280;
}

.install-btn {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.install-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.install-btn:active::before {
    width: 300px;
    height: 300px;
}

.install-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(249, 115, 22, 0.4);
}

.install-btn:active {
    transform: translateY(0);
}

.install-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(107, 114, 128, 0.1);
    color: #6b7280;
    font-size: 24px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    line-height: 1;
}

.install-close:hover {
    background: rgba(107, 114, 128, 0.2);
    color: #1f2937;
}

/* Modal d'installation */
.install-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s;
}

.install-modal.show {
    opacity: 1;
}

.install-modal-content {
    background: white;
    border-radius: 24px;
    max-width: 420px;
    width: 100%;
    padding: 32px 28px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.install-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(107, 114, 128, 0.1);
    color: #6b7280;
    font-size: 28px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    line-height: 1;
}

.install-modal-close:hover {
    background: rgba(107, 114, 128, 0.2);
    transform: rotate(90deg);
}

.install-modal-header {
    text-align: center;
    margin-bottom: 28px;
}

.install-modal-icon {
    font-size: 56px;
    margin-bottom: 12px;
}

.install-modal-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.install-modal-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 28px;
}

/* Étapes d'installation */
.install-step {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.step-number {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

.step-content {
    flex: 1;
}

.step-title {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
}

.step-icon {
    font-size: 32px;
    margin: 8px 0;
}

.step-desc {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;
}

.install-modal-btn {
    width: 100%;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: white;
    border: none;
    padding: 16px 24px;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

.install-modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(249, 115, 22, 0.4);
}

.install-modal-btn:active {
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 480px) {
    .install-banner {
        width: calc(100% - 24px);
        bottom: -100px;
    }

    .install-banner.show {
        bottom: 12px;
    }

    .install-content {
        padding: 14px 16px;
        gap: 12px;
    }

    .install-icon {
        font-size: 36px;
    }

    .install-title {
        font-size: 15px;
    }

    .install-subtitle {
        font-size: 12px;
    }

    .install-btn {
        padding: 10px 20px;
        font-size: 14px;
    }

    .install-modal-content {
        padding: 28px 24px;
    }

    .install-modal-icon {
        font-size: 48px;
    }

    .install-modal-header h2 {
        font-size: 20px;
    }

    .step-number {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .step-title {
        font-size: 15px;
    }

    .step-icon {
        font-size: 28px;
    }

    .step-desc {
        font-size: 13px;
    }
}

/* Animation de pulsation pour attirer l'attention */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.install-btn {
    animation: pulse 2s ease-in-out infinite;
}

.install-btn:hover {
    animation: none;
}

/* iOS Safari specific - Highlight du bouton partage */
.ios-safari .install-modal-body::after {
    content: '';
    position: absolute;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, rgba(249, 115, 22, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
    pointer-events: none;
}
