/* Calendly Custom Close Button */
#custom-calendly-close {
    position: fixed !important;
    top: calc(16px + env(safe-area-inset-top, 0px)) !important;
    right: 16px !important;
    width: 64px !important;
    height: 64px !important;
    background: #fff !important;
    border-radius: 50% !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25) !important;
    z-index: 2147483647 !important;
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    border: none !important;
    font-size: 32px !important;
    color: #333 !important;
    font-weight: bold !important;
}

#custom-calendly-close:hover {
    background: #f5f5f5 !important;
    transform: scale(1.1) !important;
}

#custom-calendly-close.visible {
    display: flex !important;
}

/* Force full screen Calendly */
.calendly-overlay {
    position: fixed !important;
    inset: 0 !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0, 0, 0, 0.85) !important;
    z-index: 999998 !important;
    transform: none !important;
}

.calendly-popup {
    position: fixed !important;
    inset: 0 !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    background: #fff !important;
    z-index: 999999 !important;
    transform: none !important;
}

.calendly-popup-content {
    position: fixed !important;
    inset: 0 !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    z-index: 1000000 !important;
    transform: none !important;
}

.calendly-popup-content iframe {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    border: none !important;
}

/* Override BRUTAL des classes Calendly internes */
.calendly-popup div[class*="Yirv_"],
.calendly-popup div[class*="NLDHOZB"],
.calendly-popup-content div[class*="Yirv_"],
.calendly-popup-content div[class*="NLDHOZB"] {
    min-height: 100vh !important;
    height: 100vh !important;
    max-height: 100vh !important;
}

/* Ecrase le media query de Calendly */
@media (min-height: 797px) {
    .calendly-popup div[class*="Yirv_"],
    .calendly-popup div[class*="NLDHOZB"],
    .calendly-popup-content div[class*="Yirv_"],
    .calendly-popup-content div[class*="NLDHOZB"],
    .Yirv_lcEoJvq0f_H9E0w.NLDHOZbATrV0sB7lot85 {
        min-height: 100vh !important;
        height: 100vh !important;
        max-height: 100vh !important;
    }
}

/* Force TOUT les divs dans Calendly */
.calendly-popup > div,
.calendly-popup-content > div {
    min-height: 100vh !important;
    height: 100vh !important;
}

/* FAQ Dropdown Menu - Keep open on hover with delay */
.faq-dropdown-menu {
    display: none;
    pointer-events: none;
}

.faq-dropdown-wrapper:hover .faq-dropdown-menu {
    display: block !important;
    pointer-events: auto;
    animation: fadeIn 0.15s ease-in;
}

.faq-dropdown-menu:hover {
    display: block !important;
    pointer-events: auto;
}

/* Add a pseudo-element to create a hover bridge */
.faq-dropdown-wrapper::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 8px;
    background: transparent;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Image Loading Optimization */
img[loading="lazy"] {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

img[loading="lazy"][src] {
    animation: fadeIn 0.3s ease-in;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Critical images - ensure smooth display */
img[src*="julien"],
img[src*="guidance"],
img[src*="photo"] {
    will-change: opacity;
}

/* Preload hint for LCP images */
link[rel="preload"][as="image"] {
    opacity: 0;
    display: none;
}
