/* =========================================
   1. CORE & TEXTURES
   ========================================= */

/* Grain Texture Overlay (Cinematic Feel) */
body::before {
    content: "";
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.04'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 50;
    mix-blend-mode: multiply;
}

/* Scroll Progress Bar */
#gma-progress-bar {
    position: fixed;
    top: 0; left: 0;
    height: 3px;
    background: #d97706; /* Brand Gold */
    z-index: 9999;
    width: 0%;
    transition: width 0.1s ease-out;
}

/* Typography Utilities */
.text-balance { text-wrap: balance; }

/* =========================================
   2. ANIMATIONS & INTERACTIONS
   ========================================= */

/* Scroll Reveal (Fade Up) */
.gma-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.gma-reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* SVG Line Drawing Animation */
.animate-draw-line {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: gmaDraw 2.5s ease-out forwards;
}
@keyframes gmaDraw {
    to { stroke-dashoffset: 0; }
}

/* Floating Animation (for Partners UI) */
.animate-float {
    animation: gmaFloat 6s ease-in-out infinite;
}
@keyframes gmaFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Shimmer Effect (Buttons) */
@keyframes gmaShimmer {
    100% { transform: translateX(100%); }
}
.group:hover .animate-shimmer {
    animation: gmaShimmer 1.5s infinite;
}

/* =========================================
   3. COMPONENTS
   ========================================= */

/* --- Spotlight Card (Home/Services) --- */
.gma-spotlight-card {
    position: relative;
    overflow: hidden;
    /* Nécessite le JS pour mettre à jour --mouse-x et --mouse-y */
}
.gma-spotlight-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
    background: radial-gradient(
        600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        rgba(255, 255, 255, 0.08),
        transparent 40%
    );
    opacity: 0;
    transition: opacity 0.5s;
    z-index: 2;
}
.gma-spotlight-card:hover::before { opacity: 1; }

/* --- Comparison Slider (Before/After) --- */
.gma-comparison-slider {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
    border-radius: 1.5rem;
    cursor: col-resize;
    user-select: none;
}
.gma-comparison-slider img {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none;
}
.gma-comparison-slider .overlay-img {
    clip-path: inset(0 0 0 var(--slider-pos, 50%));
    z-index: 2;
}
.gma-slider-handle {
    position: absolute; top: 0; bottom: 0; left: var(--slider-pos, 50%);
    width: 2px; background: white; z-index: 10;
    pointer-events: none;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
}
.gma-slider-button {
    position: absolute; top: 50%; left: var(--slider-pos, 50%);
    transform: translate(-50%, -50%);
    width: 40px; height: 40px;
    background: #d97706; border-radius: 50%; border: 2px solid white;
    display: flex; align-items: center; justify-content: center;
    color: white; z-index: 11;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3); pointer-events: none;
}

/* --- Forms (Pro & Dark styles) --- */
.gma-input-light {
    width: 100%;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    color: #0f172a;
    transition: all 0.2s;
    font-family: inherit;
}
.gma-input-light:focus {
    outline: none;
    border-color: #0e7490;
    background: white;
    box-shadow: 0 0 0 4px rgba(14, 116, 144, 0.1);
}

.gma-input-dark {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
    border-radius: 0.75rem;
    width: 100%;
    padding: 1rem 1.25rem;
    transition: all 0.3s;
}
.gma-input-dark:focus {
    outline: none;
    border-color: #f59e0b;
    background: rgba(15, 23, 42, 0.9);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.1);
}

/* --- Glassmorphism --- */
.gma-glass-panel {
    background: rgba(30, 41, 59, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .gma-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .animate-float,
    .animate-shimmer {
        animation: none !important;
    }
}

html.gma-reduced-motion .gma-reveal {
    opacity: 1;
    transform: none;
    transition: none;
}
html.gma-reduced-motion .animate-float,
html.gma-reduced-motion .animate-shimmer {
    animation: none !important;
}
