/**
 * Styles pour la bannière d'application mobile Oedipe
 */

/* Bannière principale */
.oedipe-app-banner {
    position: fixed;
    left: 0;
    right: 0;
    z-index: 999999;
    background: linear-gradient(135deg, #f97316 0%, #dc2626 100%);
    color: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    animation: slideIn 0.4s ease-out;
}

/* Type de bannière - Sticky Top */
.oedipe-banner-sticky {
    top: 0;
}

/* Type de bannière - Sticky Bottom */
.oedipe-banner-bottom {
    bottom: 0;
}

/* Type de bannière - Popup Center */
.oedipe-banner-popup {
    top: 50%;
    left: 50%;
    right: auto;
    transform: translate(-50%, -50%);
    max-width: 500px;
    border-radius: 12px;
    animation: popIn 0.4s ease-out;
}

/* Container */
.oedipe-banner-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 60px 16px 20px; /* Plus d'espace à droite pour le X */
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
}

/* Contenu */
.oedipe-banner-content {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

/* Icône */
.oedipe-banner-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.oedipe-banner-icon svg {
    width: 100%;
    height: 100%;
    opacity: 0.9;
}

/* Texte */
.oedipe-banner-text {
    flex: 1;
    min-width: 0;
}

.oedipe-banner-title {
    margin: 0 0 4px 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
}

.oedipe-banner-description {
    margin: 0;
    font-size: 14px;
    opacity: 0.9;
    line-height: 1.4;
}

/* Actions */
.oedipe-banner-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

/* Boutons */
.oedipe-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #fff;
    color: #333;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.oedipe-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    color: #333;
}

.oedipe-btn svg {
    flex-shrink: 0;
}

.oedipe-btn-android {
    background: #3DDC84;
    color: #fff;
}

.oedipe-btn-android:hover {
    background: #2CC36F;
    color: #fff;
}

.oedipe-btn-ios {
    background: #000;
    color: #fff;
}

.oedipe-btn-ios:hover {
    background: #333;
    color: #fff;
}

/* Bouton fermer */
.oedipe-banner-close {
    position: absolute;
    top: 50%;
    right: -5px;
    transform: translateY(-50%);
    background: transparent !important;
    border: none !important;
    color: #fff !important;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: opacity 0.2s ease;
    z-index: 1000001;
    flex-shrink: 0;
    outline: none !important;
    box-shadow: none !important;
    -webkit-tap-highlight-color: rgba(0,0,0,0) !important;
    -webkit-tap-highlight-color: transparent !important;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.oedipe-banner-close:hover,
.oedipe-banner-close:focus,
.oedipe-banner-close:active,
.oedipe-banner-close:visited {
    opacity: 1;
    background: transparent !important;
    color: #fff !important;
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
}

.oedipe-banner-close svg {
    width: 24px;
    height: 24px;
    pointer-events: none;
}

.oedipe-banner-close svg path {
    fill: #fff !important;
}

/* Modal iOS */
.oedipe-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

.oedipe-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.oedipe-modal-content {
    position: relative;
    background: #fff;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease-out;
}

.oedipe-modal-header {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.oedipe-modal-header h3 {
    margin: 0;
    font-size: 20px;
    color: #333;
}

.oedipe-modal-close {
    background: transparent;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.oedipe-modal-close:hover {
    color: #333;
}

.oedipe-modal-body {
    padding: 24px;
}

/* Steps d'installation */
.oedipe-install-steps {
    list-style: none;
    padding: 0;
    margin: 0;
}

.oedipe-install-steps li {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.oedipe-install-steps li:last-child {
    margin-bottom: 0;
}

.step-number {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #f97316 0%, #dc2626 100%);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
}

.step-content {
    flex: 1;
}

.step-content p {
    margin: 0 0 8px 0;
    font-size: 16px;
    color: #333;
    line-height: 1.5;
}

.step-content svg {
    color: #f97316;
}

/* Animations */
@keyframes slideIn {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes popIn {
    from {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0;
    }
    to {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .oedipe-banner-container {
        flex-wrap: wrap;
        padding: 12px 50px 12px 16px; /* Plus d'espace à droite pour le X */
    }
    
    .oedipe-banner-close {
        top: 5px;
        right: -50px;
        transform: none;
    }
    
    .oedipe-banner-content {
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .oedipe-banner-icon {
        width: 40px;
        height: 40px;
    }
    
    .oedipe-banner-title {
        font-size: 16px;
    }
    
    .oedipe-banner-description {
        font-size: 13px;
    }
    
    .oedipe-banner-actions {
        width: 100%;
        flex-direction: column;
        gap: 8px;
    }
    
    .oedipe-btn {
        width: 100%;
        justify-content: center;
        padding: 12px 20px;
    }
    
    .oedipe-banner-popup {
        max-width: 90%;
        margin: 20px;
    }
    
    .oedipe-modal-content {
        width: 95%;
    }
}

@media (max-width: 480px) {
    .oedipe-banner-text {
        width: 100%;
    }
    
    .oedipe-banner-title {
        font-size: 15px;
    }
    
    .oedipe-banner-description {
        font-size: 12px;
    }
}

/* Cache la bannière par défaut sur desktop si l'option est activée */
body.oedipe-mobile-only .oedipe-app-banner {
    display: none !important;
}

@media (max-width: 768px) {
    body.oedipe-mobile-only .oedipe-app-banner {
        display: block !important;
    }
}
