/*
===========================================
MAISONS CTL - STYLES HERO V1.0
Fichier: /public_html/css/components/hero.css
Description: Styles spécifiques à la section Hero (bannière principale).
             Gère l'image de fond, le contenu centré, les animations
             et l'adaptation responsive de la section d'accueil.
Version: 1.0 - Hero section responsive
Date: Janvier 2025
===========================================
*/

/* ====== SECTION HERO ====== */
#hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url('/assets/images/2.2.webp');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    margin-top: calc(var(--header-height) * -1);
    padding-top: var(--header-height);
    overflow: hidden;
}

/* Overlay sombre pour améliorer la lisibilité */
#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.3) 0%,
        rgba(0, 0, 0, 0.5) 100%
    );
    z-index: 1;
}

/* ====== CONTENU HERO ====== */
.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    padding: 40px 20px;
    animation: fadeInUp 1s ease-out;
}

.hero-content h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 30px;
    color: var(--color-text-light);
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-content p {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    margin-bottom: 40px;
    color: var(--color-text-light);
    opacity: 0.95;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    line-height: 1.5;
}

/* ====== BOUTON TÉLÉPHONE HERO ====== */
.hero-content .phone-highlight {
    background-color: var(--color-accent);
    color: white;
    padding: 15px 30px;
    border-radius: var(--border-radius-pill);
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin: 30px auto;
    box-shadow: 0 10px 30px rgba(196, 30, 58, 0.5);
    transition: all var(--transition-speed) var(--transition-ease);
    animation: pulse 2s infinite;
}

.hero-content .phone-highlight:hover {
    background-color: var(--color-accent-hover);
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(196, 30, 58, 0.6);
    animation: none;
}

.hero-content .phone-highlight i {
    font-size: 1.2rem;
}

/* ====== ANIMATIONS ====== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* ====== INDICATEUR DE DÉFILEMENT ====== */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    animation: bounce 2s infinite;
}

.scroll-indicator i {
    font-size: 2rem;
    color: var(--color-text-light);
    opacity: 0.7;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* ====== RESPONSIVE ====== */
@media (max-width: 992px) {
    #hero {
        background-attachment: scroll; /* Désactive le parallax sur tablette/mobile */
    }
}

@media (max-width: 768px) {
    #hero {
        min-height: 80vh;
    }
    
    .hero-content {
        padding: 20px 15px;
    }
    
    .hero-content h1 {
        margin-bottom: 20px;
    }
    
    .hero-content p {
        margin-bottom: 30px;
    }
    
    .hero-content .phone-highlight {
        padding: 12px 25px;
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .hero-content h1 br {
        display: none; /* Supprime les sauts de ligne sur très petit écran */
    }
    
    .hero-content p br {
        display: none;
    }
}

/* ====== GESTION DES ERREURS D'IMAGE ====== */
#hero.image-error {
    background-image: none;
    background-color: var(--color-grey-dark);
}

#hero.image-error::before {
    background: rgba(196, 30, 58, 0.1);
}