/* ============================================================================
   PREMIUM GLASSMORPHISM + VARIED SCROLL ANIMATIONS
   Auto-applies to existing homepage elements. Loaded last for cascade priority.
   ========================================================================= */

/* ----------------------------------------------------------------------------
   1. GLASS UTILITIES — reusable frosted glass looks
   ------------------------------------------------------------------------- */
.glass,
section.realisation-lecoq,
#faq details,
.testimonial-card,
.testimonials article,
.service-card,
.trust-bar-section .trust-card {
    position: relative;
    isolation: isolate;
}

/* ----------------------------------------------------------------------------
   2. CARDS — frosted glass treatment (applied to plain white cards)
   ------------------------------------------------------------------------- */
#faq details {
    background: rgba(255, 255, 255, 0.65) !important;
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    border: 1px solid rgba(255, 255, 255, 0.6) !important;
    box-shadow:
        0 1px 2px rgba(44, 85, 48, 0.04),
        0 8px 30px rgba(44, 85, 48, 0.06) !important;
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1),
                box-shadow 0.4s cubic-bezier(0.2, 0.8, 0.2, 1),
                border-color 0.4s ease !important;
}
#faq details:hover {
    transform: translateY(-3px);
    box-shadow:
        0 4px 12px rgba(44, 85, 48, 0.08),
        0 20px 50px rgba(44, 85, 48, 0.12) !important;
    border-color: rgba(245, 179, 1, 0.4) !important;
}
#faq details[open] {
    border-color: rgba(245, 179, 1, 0.55) !important;
    background: rgba(255, 253, 245, 0.85) !important;
    backdrop-filter: blur(18px) saturate(150%);
}

/* Testimonial cards frosted */
.testimonials article,
.testimonial-card {
    background: rgba(255, 255, 255, 0.72) !important;
    backdrop-filter: blur(12px) saturate(140%);
    -webkit-backdrop-filter: blur(12px) saturate(140%);
    border: 1px solid rgba(255, 255, 255, 0.7);
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1),
                box-shadow 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
}
.testimonials article:hover,
.testimonial-card:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow: 0 22px 55px rgba(44, 85, 48, 0.13) !important;
}

/* ----------------------------------------------------------------------------
   3. BUTTONS / CTAs — glass + shimmer
   ------------------------------------------------------------------------- */
a.btn,
a.animated-button,
a[style*="border-radius: 50px"]:not(.lecoq-label):not([style*="font-size: 0.72rem"]):not([style*="font-size: 0.7rem"]):not([style*="padding: 4px 14px"]):not([style*="padding: 6px 14px"]):not([style*="padding: 8px 20px"]):not([style*="padding: 8px 22px"]),
button.btn {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1),
                box-shadow 0.35s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
}

/* Shimmer sweep on hover */
a.btn::before,
a.animated-button::before,
a[style*="border-radius: 50px"][style*="padding: 14px"]::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        110deg,
        transparent 20%,
        rgba(255, 255, 255, 0.35) 45%,
        rgba(255, 255, 255, 0.35) 55%,
        transparent 80%
    );
    transform: translateX(-100%);
    transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
    pointer-events: none;
    z-index: 1;
}
a.btn:hover::before,
a.animated-button:hover::before,
a[style*="border-radius: 50px"][style*="padding: 14px"]:hover::before {
    transform: translateX(100%);
}

a.btn:hover,
a.animated-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 35px rgba(44, 85, 48, 0.28) !important;
}

/* ----------------------------------------------------------------------------
   4. SECTION-SPECIFIC GLASS TREATMENTS
   ------------------------------------------------------------------------- */

/* Trust bar : enhanced glass with animated border gradient */
.trust-bar-section .trust-card {
    background: rgba(255, 255, 255, 0.10) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        0 8px 32px rgba(0, 0, 0, 0.15);
}
.trust-bar-section .trust-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(245, 179, 1, 0.18), transparent 60%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    z-index: -1;
}
.trust-bar-section .trust-card:hover::after {
    opacity: 1;
}

/* Mission section 3 values cards — glass upgrade */
.mission-section [style*="padding: 35px 28px"],
.mission-section [style*="padding: 35px 28px"] + [style*="padding: 35px 28px"] {
    backdrop-filter: blur(10px) saturate(130%);
    -webkit-backdrop-filter: blur(10px) saturate(130%);
    border: 1px solid rgba(255, 255, 255, 0.7);
}

/* ----------------------------------------------------------------------------
   5. MAP/LEAFLET — glass bubble markers
   ------------------------------------------------------------------------- */
.leaflet-div-icon,
.leaflet-marker-icon > div {
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.leaflet-popup-content-wrapper {
    background: rgba(255, 255, 255, 0.92) !important;
    backdrop-filter: blur(14px) saturate(150%);
    -webkit-backdrop-filter: blur(14px) saturate(150%);
    border-radius: 14px !important;
    border: 1px solid rgba(255, 255, 255, 0.8) !important;
    box-shadow: 0 20px 60px rgba(44, 85, 48, 0.2) !important;
}
.leaflet-popup-tip {
    background: rgba(255, 255, 255, 0.92) !important;
}

/* ----------------------------------------------------------------------------
   6. SCROLL ANIMATIONS — 6 VARIANTS
   ------------------------------------------------------------------------- */
[data-anim] {
    opacity: 0;
    will-change: transform, opacity;
    transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.9s cubic-bezier(0.16, 1, 0.3, 1),
                filter 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-anim="fade-up"]      { transform: translateY(50px); }
[data-anim="fade-down"]    { transform: translateY(-40px); }
[data-anim="slide-left"]   { transform: translateX(-70px); }
[data-anim="slide-right"]  { transform: translateX(70px); }
[data-anim="zoom-in"]      { transform: scale(0.82); }
[data-anim="zoom-rotate"]  { transform: scale(0.88) rotate(-3deg); }
[data-anim="blur-in"]      { filter: blur(18px); transform: translateY(20px); }
[data-anim="flip-up"]      { transform: perspective(800px) rotateX(25deg) translateY(30px); transform-origin: 50% 100%; }

[data-anim].in-view {
    opacity: 1;
    transform: none;
    filter: none;
}

/* Stagger by position — applied via data-stagger on parent */
[data-stagger] > *      { transition-delay: 0s; }
[data-stagger] > *:nth-child(1)  { transition-delay: 0.05s; }
[data-stagger] > *:nth-child(2)  { transition-delay: 0.15s; }
[data-stagger] > *:nth-child(3)  { transition-delay: 0.25s; }
[data-stagger] > *:nth-child(4)  { transition-delay: 0.35s; }
[data-stagger] > *:nth-child(5)  { transition-delay: 0.45s; }
[data-stagger] > *:nth-child(6)  { transition-delay: 0.55s; }
[data-stagger] > *:nth-child(n+7) { transition-delay: 0.65s; }

/* ----------------------------------------------------------------------------
   7. HERO — animated gradient background + parallax feel
   ------------------------------------------------------------------------- */
.hero {
    position: relative;
    overflow: hidden;
}
.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(245, 179, 1, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(106, 141, 115, 0.18) 0%, transparent 55%);
    animation: heroGradient 18s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: 1;
}
.hero > * { position: relative; z-index: 2; }

@keyframes heroGradient {
    0%   { transform: translate(0, 0) scale(1); opacity: 0.8; }
    50%  { transform: translate(30px, -20px) scale(1.08); opacity: 1; }
    100% { transform: translate(-20px, 15px) scale(0.96); opacity: 0.85; }
}

/* ----------------------------------------------------------------------------
   8. PÔLES REGIONAL CARDS — glass sheet effect
   ------------------------------------------------------------------------- */
a[href^="/entretien-sepulture-"][style*="padding: 15px 20px"],
a[href^="/villeurbanne"][style*="padding: 15px 20px"],
a[href^="/"][style*="border-left: 3px solid"][style*="padding: 15px 20px"] {
    background: linear-gradient(135deg, rgba(248, 253, 249, 0.85), rgba(255, 255, 255, 0.7)) !important;
    backdrop-filter: blur(10px) saturate(140%);
    -webkit-backdrop-filter: blur(10px) saturate(140%);
    border: 1px solid rgba(255, 255, 255, 0.8) !important;
    position: relative;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1),
                box-shadow 0.4s cubic-bezier(0.2, 0.8, 0.2, 1),
                border-color 0.4s ease !important;
}
a[href^="/entretien-sepulture-"][style*="padding: 15px 20px"]::after {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 30%;
    background: linear-gradient(110deg, transparent, rgba(255, 255, 255, 0.3));
    transform: translateX(100%);
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
    pointer-events: none;
}
a[href^="/entretien-sepulture-"][style*="padding: 15px 20px"]:hover {
    transform: translateX(6px) !important;
    border-color: rgba(245, 179, 1, 0.45) !important;
    box-shadow: 0 10px 30px rgba(44, 85, 48, 0.15) !important;
}
a[href^="/entretien-sepulture-"][style*="padding: 15px 20px"]:hover::after {
    transform: translateX(0);
}

/* ----------------------------------------------------------------------------
   9. MONOGRAM CITY BADGES — glass sheen over gradient
   ------------------------------------------------------------------------- */
h3 > span[style*="border-radius: 50%"][style*="font-family: "] {
    position: relative;
    overflow: hidden;
}
h3 > span[style*="border-radius: 50%"][style*="font-family: "]::before {
    content: '';
    position: absolute;
    top: 5%;
    left: 10%;
    width: 50%;
    height: 30%;
    background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.45), transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

/* ----------------------------------------------------------------------------
   10. SECTION DIVIDERS — subtle gold line separators between key sections
   ------------------------------------------------------------------------- */
section.realisation-lecoq::before,
.hero-video-section::before,
.mission-section::before,
.testimonials::before,
#faq::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(245, 179, 1, 0.55), transparent);
    pointer-events: none;
}

section.realisation-lecoq,
.hero-video-section,
.mission-section,
.testimonials,
#faq {
    position: relative;
}

/* ----------------------------------------------------------------------------
   11. SERIF NUMERALS : subtle glow on scroll arrival
   ------------------------------------------------------------------------- */
@keyframes numeralArrive {
    0%   { opacity: 0; transform: scale(0.7) translateY(20px); filter: blur(8px); }
    60%  { filter: blur(0); opacity: 1; }
    100% { opacity: 1; transform: none; filter: blur(0); }
}
.in-view > [style*="font-family: 'Georgia'"][style*="font-size: 3.8rem"] {
    animation: numeralArrive 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

/* ----------------------------------------------------------------------------
   12. SCROLL PROGRESS BAR (top of page)
   ------------------------------------------------------------------------- */
.scroll-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, #6a8d73, #f5b301);
    z-index: 9999;
    transition: width 0.1s linear;
    pointer-events: none;
    box-shadow: 0 0 10px rgba(245, 179, 1, 0.6);
}

/* ----------------------------------------------------------------------------
   13. STAR RATINGS — glow gentle animation
   ------------------------------------------------------------------------- */
@keyframes starGlow {
    0%, 100% { text-shadow: 0 0 0 transparent; }
    50%      { text-shadow: 0 0 8px rgba(245, 179, 1, 0.5); }
}
/* star glow kept reserved for future use (empty ruleset removed) */

/* ----------------------------------------------------------------------------
   14. REDUCED MOTION — accessibility
   ------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    [data-anim] { opacity: 1 !important; transform: none !important; filter: none !important; transition: none !important; }
    .hero::after { animation: none !important; }
    .scroll-progress-bar { display: none; }
}

/* ----------------------------------------------------------------------------
   15. MOBILE TUNING
   ------------------------------------------------------------------------- */
@media (max-width: 768px) {
    /* Soften glassmorphism on mobile (perf + legibility) */
    #faq details,
    .testimonials article,
    .trust-bar-section .trust-card {
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }
    [data-anim="slide-left"], [data-anim="slide-right"] {
        transform: translateY(30px) !important;
    }
}
