/**
 * PWA Popup Styles - Congrès COMBEQ
 *
 * @since 2026
 * @author Samuelle Langlois
 */

/* ==========================================================================
   PWA Popup - Base
   ========================================================================== */

.pwa-popup {
    position: fixed;
    bottom: -100%;
    left: 0;
    right: 0;
    z-index: 99999;
    background: linear-gradient(135deg, #00263a 0%, #003d5c 100%);
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    padding: 20px;
    transition: bottom 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 500px;
    margin: 0 auto;
}

.pwa-popup--visible {
    bottom: 0;
}

/* ==========================================================================
   PWA Popup - Header
   ========================================================================== */

.pwa-popup__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.pwa-popup__logo {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background-color: #fff;
    padding: 5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.pwa-popup__logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.pwa-popup__close-btn {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.pwa-popup__close-btn:hover {
    opacity: 1;
}

/* ==========================================================================
   PWA Popup - Content
   ========================================================================== */

.pwa-popup__content {
    text-align: center;
    color: #fff;
}

.pwa-popup__title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: #fff;
}

.pwa-popup__description {
    font-size: 14px;
    margin: 0 0 20px 0;
    opacity: 0.9;
    line-height: 1.4;
    color: #FFF;
}

/* ==========================================================================
   PWA Popup - Buttons
   ========================================================================== */

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

.pwa-popup__install-btn {
    background: linear-gradient(135deg, #939336 0%, #7a7a2d 100%);
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 15px rgba(147, 147, 54, 0.4);
}

.pwa-popup__install-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(147, 147, 54, 0.5);
}

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

.pwa-popup__later-btn {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 12px 25px;
    border-radius: 25px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.pwa-popup__later-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

/* ==========================================================================
   PWA Popup - iOS Instructions
   ========================================================================== */

.pwa-popup--ios .pwa-popup__instructions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.pwa-popup__step {
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
}

.pwa-popup__step-number {
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.pwa-popup__step-text {
    font-size: 14px;
    line-height: 1.4;
}

.pwa-popup__step-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    vertical-align: middle;
    margin: 0 3px;
}

/* ==========================================================================
   PWA Popup - Animation
   ========================================================================== */

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

.pwa-popup__logo {
    animation: pwa-bounce 2s ease infinite;
    animation-delay: 0.5s;
}

/* ==========================================================================
   PWA Popup - Responsive
   ========================================================================== */

@media screen and (max-width: 400px) {
    .pwa-popup {
        padding: 15px;
    }

    .pwa-popup__title {
        font-size: 16px;
    }

    .pwa-popup__description {
        font-size: 13px;
    }

    .pwa-popup__buttons {
        flex-direction: column;
    }

    .pwa-popup__install-btn,
    .pwa-popup__later-btn {
        width: 100%;
    }
}

/* ==========================================================================
   PWA Popup - Safe Area (pour les téléphones avec notch)
   ========================================================================== */

@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .pwa-popup {
        padding-bottom: calc(20px + env(safe-area-inset-bottom));
    }
}
