/* ==========================================================================
   PLUGIN WEATHER HEADER BOURGES - ARCHITECTURE EN 4 CALQUES (STRATES)
   ========================================================================== */

.bourges-weather-hero {
    position: relative;
    width: 100%;
    min-height: 440px;
    height: auto;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: 36px 48px 32px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #ffffff;
    background: #0f172a;
    transition: all 0.8s ease;
}

/* --- CALQUE 1 : PANORAMA PHOTORÉALISTE DE BOURGES (Z-INDEX 1) --- */
.weather-layer-sky {
    position: absolute;
    inset: 0;
    z-index: 1;
    background-image: url('../img/bourges_panorama.webp');
    background-size: cover;
    background-position: center 35%;
    transition: filter 1.2s cubic-bezier(0.16, 1, 0.3, 1), transform 1.2s ease;
}

@media (max-width: 768px) {
    .weather-layer-sky {
        background-image: url('../img/bourges_panorama_mobile.webp');
    }
}

/* Ambiances atmosphériques réalistes par surcouche optique */
.mode-sunny .weather-layer-sky {
    filter: brightness(1.03) contrast(1.04) saturate(1.05);
}

.mode-golden .weather-layer-sky {
    filter: brightness(0.92) contrast(1.1) sepia(0.22) hue-rotate(-12deg);
}

.mode-cloudy .weather-layer-sky {
    filter: brightness(0.88) contrast(0.96) saturate(0.85);
}

.mode-rain .weather-layer-sky {
    filter: brightness(0.72) contrast(1.08) saturate(0.75);
}

.mode-fog .weather-layer-sky {
    filter: brightness(0.92) contrast(0.82) blur(1px);
}

.mode-night .weather-layer-sky {
    filter: brightness(0.48) contrast(1.15) hue-rotate(180deg) saturate(0.7);
}

/* Astre désactivé en mode photoréaliste (la photo a son propre ciel naturel) */
.weather-sky-orb {
    display: none !important;
}

/* Nuages de synthèse désactivés en mode photoréaliste */
.weather-layer-clouds,
.weather-layer-clouds-far {
    display: none !important;
}

/* Premier plan SVG/découpé désactivé (intégré au panorama authentique) */
.weather-layer-foreground {
    display: none !important;
}

.mode-sunny .weather-layer-foreground {
    filter: brightness(1.05) contrast(1.02);
}

.mode-golden .weather-layer-foreground {
    filter: sepia(0.25) saturate(1.25) brightness(0.92) contrast(1.05);
}

.mode-cloudy .weather-layer-foreground {
    filter: brightness(0.88) contrast(1.0);
}

.mode-rain .weather-layer-foreground {
    filter: brightness(0.7) contrast(1.1) saturate(0.85);
}

.mode-night .weather-layer-foreground {
    filter: brightness(0.42) contrast(1.2) hue-rotate(10deg);
}

.mode-fog .weather-layer-foreground {
    filter: brightness(0.8) contrast(0.9) blur(0.5px);
}

/* Voile d'ambiance et de lisibilité pour le texte */
.weather-hero-scrim {
    position: absolute;
    inset: 0;
    z-index: 6;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.72) 0%, rgba(15, 23, 42, 0.45) 45%, rgba(0, 0, 0, 0.05) 90%);
    pointer-events: none;
    transition: background 0.8s ease;
}

.mode-night .weather-hero-scrim {
    background: linear-gradient(90deg, rgba(5, 11, 20, 0.82) 0%, rgba(5, 11, 20, 0.55) 50%, rgba(0, 0, 0, 0.15) 90%);
}

/* --- CALQUE 4 : PARTICULES & EFFETS MÉTÉO CANVAS (Z-INDEX 8) --- */
/* La pluie, la brume ou les rayons passent PAR-DESSUS le monument */
.weather-layer-fx {
    position: absolute;
    inset: 0;
    z-index: 8;
    pointer-events: none;
}

#weather-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* --- CALQUE 5 : CONTENU TEXTUEL & ACTIONS (Z-INDEX 10) --- */
.weather-hero-content {
    position: relative;
    z-index: 10;
    max-width: 600px;
}

.weather-live-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 18px;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.weather-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
    animation: weatherDotPulse 2s infinite ease-in-out;
}

@keyframes weatherDotPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.85); }
}

.weather-hero-title {
    font-family: 'Outfit', sans-serif;
    font-size: 46px;
    font-weight: 800;
    margin: 0 0 12px 0;
    line-height: 1.1;
    color: #ffffff;
    text-shadow: 0 3px 12px rgba(0, 0, 0, 0.35);
}

.weather-hero-title .hero-accent {
    color: #c8861e;
}

.weather-hero-subtitle {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 24px 0;
    line-height: 1.5;
    font-weight: 400;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.weather-hero-actions {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.weather-hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #c8861e 0%, #e5b04c 100%);
    color: #0f172a;
    font-weight: 700;
    font-size: 15px;
    padding: 13px 26px;
    border-radius: 12px;
    text-decoration: none;
    box-shadow: 0 4px 18px rgba(200, 134, 30, 0.4);
    transition: all 0.25s ease;
}

.weather-hero-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(200, 134, 30, 0.55);
    color: #000000;
}

.weather-hero-btn-pro {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #ffffff;
    font-weight: 700;
    font-size: 15px;
    padding: 12px 22px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
    transition: all 0.25s ease;
}

.weather-hero-btn-pro:hover {
    background: rgba(255, 140, 66, 0.95);
    border-color: #ff8c42;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 140, 66, 0.45);
}

/* --- DOCK DE DÉMONSTRATION / SÉLECTEUR D'AMBIANCES MÉTÉO --- */
.weather-demo-dock {
    position: absolute;
    top: 20px;
    right: 24px;
    bottom: auto;
    z-index: 25;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 6px 10px;
    border-radius: 999px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.weather-dock-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.7);
    margin-right: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.weather-dock-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 6px 8px;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.weather-dock-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.18);
    color: #ffffff;
}

.weather-dock-btn.active {
    background: #c8861e;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(200, 134, 30, 0.5);
    transform: scale(1.1);
}

/* --- RESPONSIVE MOBILE --- */
@media (max-width: 768px) {
    .bourges-weather-hero {
        height: auto;
        min-height: 400px;
        padding: 55px 16px 35px 16px;
    }

    .weather-hero-content {
        width: 100%;
        max-width: 100%;
    }

    .weather-hero-title {
        font-size: 30px;
        line-height: 1.2;
    }

    .weather-hero-subtitle {
        font-size: 15px;
        margin-bottom: 20px;
    }

    .weather-hero-actions {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 10px !important;
        width: 100% !important;
        max-width: 380px !important;
        margin: 0 auto !important;
    }

    .weather-hero-btn,
    .weather-hero-btn-pro {
        flex: 1 1 0 !important;
        min-height: 46px !important;
        padding: 10px 14px !important;
        font-size: 14px !important;
        border-radius: 10px !important;
        justify-content: center !important;
        text-align: center !important;
        white-space: nowrap !important;
        box-sizing: border-box !important;
    }

    .weather-demo-dock {
        top: 10px;
        right: 10px;
        bottom: auto;
        left: auto;
        padding: 4px 8px;
    }

    .weather-dock-label {
        display: none;
    }

    .weather-dock-btn {
        font-size: 1rem;
        padding: 5px 6px;
    }
}

@media (max-width: 380px) {
    .weather-hero-actions {
        flex-direction: column !important;
        gap: 8px !important;
        max-width: 280px !important;
    }

    .weather-hero-btn,
    .weather-hero-btn-pro {
        width: 100% !important;
        flex: none !important;
    }
}
