/* =========================================
   POPUP WEBINAIRE ECOFA - PREMIUM DESIGN V2
   Contraste optimisé + Responsive Smartphone
   ========================================= */

/* Overlay (fond sombre) */
.ecofa-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 8, 20, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.4s ease;
    overflow-y: auto;
}

.ecofa-popup-overlay.active {
    display: flex;
    opacity: 1;
    animation: fadeInOverlay 0.5s ease forwards;
}

@keyframes fadeInOverlay {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Container principal — fond plus foncé pour contraste */
.ecofa-popup-container {
    position: relative;
    background: linear-gradient(145deg, #050818 0%, #0a1128 50%, #050818 100%);
    border-radius: 20px;
    max-width: 980px;
    width: 100%;
    max-height: 95vh;
    overflow-y: auto;
    box-shadow:
        0 25px 70px rgba(0, 0, 0, 0.85),
        0 0 80px rgba(212, 175, 55, 0.3),
        inset 0 0 0 1px rgba(212, 175, 55, 0.5);
    transform: scale(0.85) translateY(30px);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ecofa-popup-overlay.active .ecofa-popup-container {
    transform: scale(1) translateY(0);
    opacity: 1;
    transition-delay: 0.15s;
}

/* Bordure dorée animée */
.ecofa-popup-container::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, #d4af37, #f9d976, #d4af37, #b8860b, #d4af37);
    background-size: 300% 300%;
    border-radius: 22px;
    z-index: -1;
    animation: goldenBorder 4s ease infinite;
}

@keyframes goldenBorder {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Bouton de fermeture — plus visible */
.ecofa-popup-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid #d4af37;
    color: #f9d976;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.ecofa-popup-close:hover {
    background: #d4af37;
    color: #0a1128;
    border-color: #d4af37;
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 0 25px rgba(212, 175, 55, 0.8);
}

/* Layout en deux colonnes */
.ecofa-popup-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    align-items: stretch;
}

/* Section image (affiche) */
.ecofa-popup-image-section {
    position: relative;
    overflow: hidden;
    border-radius: 20px 0 0 20px;
    background: linear-gradient(145deg, #050818, #0a1128);
    min-height: 560px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.ecofa-popup-image-section img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 8s ease;
}

.ecofa-popup-container:hover .ecofa-popup-image-section img {
    transform: scale(1.04);
}

/* Badge "INÉDIT" sur l'image */
.ecofa-popup-badge {
    position: absolute;
    top: 18px;
    left: 18px;
    background: linear-gradient(135deg, #ff4500, #ff6b35, #f7931e);
    color: #ffffff;
    padding: 9px 18px;
    border-radius: 30px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    box-shadow: 0 6px 22px rgba(255, 69, 0, 0.7);
    animation: pulseBadge 2s ease infinite;
    z-index: 5;
    border: 1px solid rgba(255, 255, 255, 0.4);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

@keyframes pulseBadge {
    0%, 100% { transform: scale(1); box-shadow: 0 6px 22px rgba(255, 69, 0, 0.7); }
    50% { transform: scale(1.06); box-shadow: 0 6px 32px rgba(255, 69, 0, 1); }
}

/* Section texte — fond plus profond pour contraste */
.ecofa-popup-text-section {
    padding: 38px 34px;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: linear-gradient(160deg, #0a1128 0%, #050818 100%);
    border-radius: 0 20px 20px 0;
    position: relative;
}

/* Eyebrow — plus visible */
.ecofa-popup-eyebrow {
    display: inline-block;
    color: #ffd700;
    font-size: 12px;
    letter-spacing: 4px;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 14px;
    padding: 6px 14px;
    border: 1.5px solid #d4af37;
    border-radius: 20px;
    background: rgba(212, 175, 55, 0.12);
    align-self: flex-start;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* Titre — meilleur contraste */
.ecofa-popup-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 30px;
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 18px 0;
    background: linear-gradient(135deg, #ffffff 0%, #ffd700 50%, #d4af37 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 20px rgba(212, 175, 55, 0.3);
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
}

/* Citation — meilleure lisibilité */
.ecofa-popup-quote {
    font-style: italic;
    font-size: 15.5px;
    line-height: 1.6;
    color: #ffe680;
    margin-bottom: 18px;
    padding: 12px 16px;
    border-left: 4px solid #d4af37;
    background: rgba(212, 175, 55, 0.08);
    border-radius: 0 8px 8px 0;
    font-weight: 500;
}

/* Description — texte clair sur fond sombre */
.ecofa-popup-description {
    font-size: 14.5px;
    line-height: 1.75;
    color: #ffffff;
    margin-bottom: 14px;
    font-weight: 400;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.ecofa-popup-description strong {
    color: #ffd700;
    font-weight: 700;
}

/* Bloc d'informations — meilleur contraste */
.ecofa-popup-info-block {
    background: rgba(212, 175, 55, 0.12);
    border: 1.5px solid rgba(212, 175, 55, 0.45);
    border-radius: 12px;
    padding: 16px 18px;
    margin: 18px 0;
    box-shadow: inset 0 0 20px rgba(212, 175, 55, 0.05);
}

.ecofa-popup-info-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 9px;
    font-size: 14px;
    color: #ffffff;
    font-weight: 500;
}

.ecofa-popup-info-row:last-child {
    margin-bottom: 0;
}

.ecofa-popup-info-row .icon {
    font-size: 17px;
    flex-shrink: 0;
}

.ecofa-popup-info-row strong {
    color: #ffd700;
    font-weight: 700;
}

/* Lien Meet — plus contrasté */
.ecofa-popup-meet-link {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, rgba(52, 168, 83, 0.25), rgba(66, 133, 244, 0.25));
    border: 1.5px solid rgba(138, 180, 248, 0.6);
    border-radius: 10px;
    padding: 11px 14px;
    margin: 12px 0;
    color: #b3d1ff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    word-break: break-all;
    transition: all 0.3s ease;
}

.ecofa-popup-meet-link:hover {
    background: linear-gradient(135deg, rgba(52, 168, 83, 0.45), rgba(66, 133, 244, 0.45));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(66, 133, 244, 0.4);
    color: #ffffff;
}

.ecofa-popup-surprise {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.2), rgba(247, 147, 30, 0.2));
    border-radius: 10px;
    padding: 13px 16px;
    margin-top: 12px;
    font-size: 13.5px;
    color: #ffe0b3;
    text-align: center;
    border: 1.5px dashed rgba(247, 147, 30, 0.7);
    font-style: italic;
    font-weight: 500;
}

.ecofa-popup-surprise strong {
    color: #ffd700;
}

/* Boutons d'action */
.ecofa-popup-actions {
    display: flex;
    gap: 12px;
    margin-top: 22px;
    flex-wrap: wrap;
}

.ecofa-btn {
    flex: 1;
    min-width: 140px;
    padding: 14px 20px;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 800;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.ecofa-btn-primary {
    background: linear-gradient(135deg, #ffd700, #d4af37, #b8860b);
    color: #050818;
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.55);
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.3);
}

.ecofa-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(212, 175, 55, 0.85);
    background: linear-gradient(135deg, #f9d976, #ffd700, #d4af37);
}

.ecofa-btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border: 2px solid rgba(212, 175, 55, 0.5);
}

.ecofa-btn-secondary:hover {
    border-color: #d4af37;
    color: #ffd700;
    background: rgba(212, 175, 55, 0.15);
}

/* Compte à rebours — meilleur contraste */
.ecofa-countdown {
    display: flex;
    justify-content: space-around;
    gap: 8px;
    margin: 16px 0;
    padding: 14px 12px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    border: 1.5px solid rgba(212, 175, 55, 0.4);
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.4);
}

.countdown-item {
    text-align: center;
    flex: 1;
    position: relative;
}

.countdown-item:not(:last-child)::after {
    content: ':';
    position: absolute;
    right: -4px;
    top: 25%;
    color: #d4af37;
    font-size: 20px;
    font-weight: 700;
    opacity: 0.5;
}

.countdown-value {
    display: block;
    font-size: 24px;
    font-weight: 800;
    color: #ffd700;
    font-family: 'Playfair Display', Georgia, serif;
    line-height: 1;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

.countdown-label {
    display: block;
    font-size: 9.5px;
    color: #d8dde8;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-top: 6px;
    font-weight: 600;
}

/* =========================================
   RESPONSIVE — TABLETTE
   ========================================= */
@media (max-width: 900px) {
    .ecofa-popup-content {
        grid-template-columns: 1fr;
    }

    .ecofa-popup-image-section {
        border-radius: 20px 20px 0 0;
        min-height: auto;
        max-height: none;
        aspect-ratio: 4/3;
    }

    .ecofa-popup-image-section img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
    }

    .ecofa-popup-text-section {
        border-radius: 0 0 20px 20px;
        padding: 30px 28px;
    }

    .ecofa-popup-title {
        font-size: 24px;
    }
}

/* =========================================
   RESPONSIVE — SMARTPHONE
   ========================================= */
@media (max-width: 600px) {
    .ecofa-popup-overlay {
        padding: 10px;
        align-items: flex-start;
        padding-top: 15px;
    }

    .ecofa-popup-container {
        max-height: 96vh;
        border-radius: 16px;
    }

    .ecofa-popup-container::before {
        border-radius: 18px;
    }

    .ecofa-popup-image-section {
        border-radius: 16px 16px 0 0;
        aspect-ratio: 4/3;
        min-height: 220px;
        max-height: 50vh;
    }

    .ecofa-popup-image-section img {
        object-fit: cover;
        object-position: center;
    }

    .ecofa-popup-badge {
        top: 12px;
        left: 12px;
        font-size: 10px;
        padding: 7px 14px;
        letter-spacing: 1.8px;
    }

    .ecofa-popup-close {
        top: 10px;
        right: 10px;
        width: 38px;
        height: 38px;
        font-size: 18px;
    }

    .ecofa-popup-text-section {
        padding: 24px 20px;
        border-radius: 0 0 16px 16px;
    }

    .ecofa-popup-eyebrow {
        font-size: 10.5px;
        letter-spacing: 3px;
        padding: 5px 11px;
    }

    .ecofa-popup-title {
        font-size: 21px;
        margin-bottom: 14px;
    }

    .ecofa-popup-quote {
        font-size: 13.5px;
        padding: 10px 12px;
    }

    .ecofa-popup-description {
        font-size: 13.5px;
        line-height: 1.65;
    }

    .ecofa-popup-info-block {
        padding: 14px 14px;
    }

    .ecofa-popup-info-row {
        font-size: 13px;
    }

    .ecofa-popup-meet-link {
        font-size: 11.5px;
        padding: 10px 12px;
    }

    .ecofa-popup-surprise {
        font-size: 12.5px;
        padding: 11px 13px;
    }

    .ecofa-popup-actions {
        flex-direction: column;
        gap: 10px;
    }

    .ecofa-btn {
        width: 100%;
        padding: 13px 16px;
        font-size: 13px;
    }

    .countdown-value {
        font-size: 20px;
    }

    .countdown-label {
        font-size: 8.5px;
        letter-spacing: 1.2px;
    }

    .ecofa-countdown {
        padding: 10px 8px;
        gap: 4px;
    }
}

/* =========================================
   RESPONSIVE — TRÈS PETITS ÉCRANS
   ========================================= */
@media (max-width: 380px) {
    .ecofa-popup-text-section {
        padding: 20px 16px;
    }

    .ecofa-popup-title {
        font-size: 19px;
    }

    .ecofa-popup-description {
        font-size: 13px;
    }

    .countdown-value {
        font-size: 17px;
    }

    .countdown-item:not(:last-child)::after {
        display: none;
    }
}

/* Scrollbar personnalisée */
.ecofa-popup-container::-webkit-scrollbar {
    width: 8px;
}

.ecofa-popup-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.ecofa-popup-container::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #d4af37, #b8860b);
    border-radius: 10px;
}

.ecofa-popup-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #f9d976, #d4af37);
}
