/* Survey Article Popup Styles - Design amélioré */
.survey-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 99999;
    display: none;
    align-items: flex-end;
    justify-content: flex-end;
    animation: fadeIn 0.4s ease-out;
    padding: 1rem;
    /* Permettre l'interaction avec le site en arrière-plan */
    pointer-events: none;
}

.survey-popup-overlay.active {
    display: flex;
}

/* Permettre l'interaction uniquement avec la popup, pas avec l'overlay */
.survey-popup-overlay.active {
    pointer-events: none;
}

.survey-popup-overlay.active .survey-popup {
    pointer-events: auto;
    cursor: default;
    /* Positionner en bas à droite */
    margin-bottom: 1rem;
    margin-right: 1rem;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.survey-popup {
    background: #ffffff;
    border-radius: 20px;
    max-width: 380px;
    width: 100%;
    max-height: 70vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1);
    position: relative;
    animation: slideUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(60px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.survey-popup-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid rgba(0, 0, 0, 0.08);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
    color: #334155;
    font-weight: 300;
    line-height: 1;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.survey-popup-close:hover {
    background: #fff;
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.2);
}

.survey-popup-header {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
    padding: 1.5rem 1.5rem 1.25rem;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.survey-popup-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.survey-popup-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    animation: bounce 2s ease-in-out infinite;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
    position: relative;
    z-index: 1;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-12px) scale(1.05);
    }
}

.survey-popup-title {
    font-size: 1.25rem;
    font-weight: 800;
    margin: 0 0 0.25rem 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    letter-spacing: -0.5px;
    position: relative;
    z-index: 1;
}

.survey-popup-subtitle {
    font-size: 0.875rem;
    opacity: 0.95;
    margin: 0;
    font-weight: 400;
    position: relative;
    z-index: 1;
}

.survey-popup-body {
    padding: 1.5rem 1.5rem;
    flex: 1;
    overflow-y: auto;
    background: #ffffff;
}

.survey-ad-card {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 16px;
    padding: 1.25rem;
    margin-bottom: 0;
    border: 2px solid #e2e8f0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.survey-ad-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
}

.survey-ad-card:hover::before {
    left: 100%;
}

.survey-ad-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(99, 102, 241, 0.2);
    border-color: #6366f1;
}

.survey-ad-logo {
    width: 70px;
    height: 70px;
    margin: 0 auto 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 16px;
    font-size: 2.25rem;
    box-shadow: 0 6px 18px rgba(99, 102, 241, 0.15), 0 0 0 3px rgba(99, 102, 241, 0.05);
    transition: all 0.4s;
}

.survey-ad-image {
    width: 100%;
    max-width: 160px;
    height: auto;
    max-height: 120px;
    margin: 0 auto 0.875rem;
    display: block;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 6px 18px rgba(99, 102, 241, 0.15), 0 0 0 3px rgba(99, 102, 241, 0.05);
    transition: all 0.4s;
    background: #f8fafc;
}

/* Fallback si l'image ne charge pas */
.survey-ad-image[src=""],
.survey-ad-image:not([src]) {
    display: none;
}

.survey-ad-card:hover .survey-ad-logo,
.survey-ad-card:hover .survey-ad-image {
    transform: scale(1.05);
    box-shadow: 0 12px 32px rgba(99, 102, 241, 0.25), 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.survey-ad-name {
    font-size: 1.125rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 0.5rem;
    text-align: center;
    letter-spacing: -0.5px;
}

.survey-ad-description {
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 1rem;
    text-align: center;
    line-height: 1.6;
    font-weight: 500;
}

.survey-ad-features {
    list-style: none;
    padding: 0;
    margin: 0 0 1.25rem 0;
    display: grid;
    gap: 0.5rem;
}

.survey-ad-features li {
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s;
    font-weight: 500;
}

.survey-ad-features li:hover {
    background: #f8fafc;
    border-color: #6366f1;
    transform: translateX(4px);
}

.survey-ad-features li::before {
    content: '✓';
    color: #10b981;
    font-weight: 800;
    font-size: 1.25rem;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 50%;
    flex-shrink: 0;
}

.survey-ad-cta {
    display: block;
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #1f2937;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 800;
    font-size: 0.9375rem;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    box-shadow: 0 6px 18px rgba(251, 191, 36, 0.4), 0 0 0 0 rgba(251, 191, 36, 0);
    position: relative;
    overflow: hidden;
    letter-spacing: -0.3px;
}

.survey-ad-cta::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;
}

.survey-ad-cta:hover::before {
    width: 300px;
    height: 300px;
}

.survey-ad-cta:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 32px rgba(251, 191, 36, 0.5), 0 0 0 4px rgba(251, 191, 36, 0.1);
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
}

.survey-ad-cta:active {
    transform: translateY(-2px) scale(1);
}

.survey-popup-footer {
    padding: 0.875rem 1.5rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    text-align: center;
    font-size: 0.75rem;
    color: #64748b;
    border-top: 1px solid #e2e8f0;
    font-weight: 500;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .survey-popup-overlay {
        padding: 0.5rem;
        align-items: center;
        justify-content: center;
    }
    
    .survey-popup-overlay.active .survey-popup {
        margin-bottom: 0;
        margin-right: 0;
        max-width: calc(100% - 1rem);
        width: 100%;
    }
    
    .survey-popup {
        max-width: 100%;
        border-radius: 20px;
        max-height: 90vh;
    }
    
    .survey-popup-close {
        width: 30px;
        height: 30px;
        font-size: 18px;
        top: 10px;
        right: 10px;
    }
    
    .survey-popup-header {
        padding: 1.25rem 1.25rem 1rem;
    }
    
    .survey-popup-icon {
        font-size: 2rem;
        margin-bottom: 0.375rem;
    }
    
    .survey-popup-title {
        font-size: 1.125rem;
    }
    
    .survey-popup-subtitle {
        font-size: 0.8125rem;
    }
    
    .survey-popup-body {
        padding: 1.25rem 1.25rem;
    }
    
    .survey-ad-card {
        padding: 1rem;
    }
    
    .survey-ad-logo {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }
    
    .survey-ad-image {
        max-width: 140px;
        max-height: 100px;
    }
    
    .survey-ad-name {
        font-size: 1rem;
    }
    
    .survey-ad-description {
        font-size: 0.8125rem;
    }
    
    .survey-ad-features li {
        padding: 0.5rem 0.625rem;
        font-size: 0.75rem;
    }
    
    .survey-ad-cta {
        padding: 0.75rem 1.25rem;
        font-size: 0.875rem;
    }
    
    .survey-popup-footer {
        padding: 0.75rem 1.25rem;
        font-size: 0.6875rem;
    }
}

@media (max-width: 480px) {
    .survey-popup-header {
        padding: 1rem 1rem 0.875rem;
    }
    
    .survey-popup-body {
        padding: 1rem 1rem;
    }
    
    .survey-ad-card {
        padding: 0.875rem;
    }
    
    .survey-popup-icon {
        font-size: 1.75rem;
    }
    
    .survey-popup-title {
        font-size: 1rem;
    }
    
    .survey-popup-subtitle {
        font-size: 0.75rem;
    }
    
    .survey-ad-name {
        font-size: 0.9375rem;
    }
    
    .survey-ad-description {
        font-size: 0.75rem;
        margin-bottom: 0.875rem;
    }
    
    .survey-ad-features li {
        padding: 0.4375rem 0.5rem;
        font-size: 0.6875rem;
    }
    
    .survey-ad-cta {
        padding: 0.625rem 1rem;
        font-size: 0.8125rem;
    }
}
