/**
 * 2007-2026 PrestaShop
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License (AFL 3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/afl-3.0.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@prestashop.com so we can send you a copy immediately.
 *
 * @author     Z-index <contact@z-index.fr>
 * @copyright 2007-2026 Z-index
 * @license   http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 */

/* Animation globale d'apparition fluide (légèrement plus rapide : 0.5s) */
@keyframes heroFadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Section Hero principale */
.zindex-hero-section {
    position: relative;
    width: 100%;
    min-height: 500px;
    height: 75vh;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 60px 0;
    font-family: inherit;

    /* Alignement et grille */
    & .zindex-hero-container {
        position: relative;
        z-index: 2;
        width: 100%;
        max-width: 1200px;
        margin-right: auto;
        margin-left: auto;
        padding-right: 15px;
        padding-left: 15px;
    }

    /* Overlay sombre d'arrière-plan */
    & .zindex-hero-overlay {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.45) !important;
        background: linear-gradient(90deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.45) 50%, rgba(0, 0, 0, 0.2) 100%) !important;
        z-index: 1;
        pointer-events: none;
    }

    /* Conteneur de texte */
    & .zindex-hero-content {
        max-width: 600px;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        text-align: left;

        /* Préparation à l'animation d'apparition accélérée */
        & .zindex-hero-title,
        & .zindex-hero-subtitle,
        & .zindex-hero-buttons {
            opacity: 0;
            animation: heroFadeInUp 0.5s cubic-bezier(0.25, 1, 0.5, 1) forwards;
        }

        /* Titre principal (Apparition quasi immédiate) */
        & .zindex-hero-title {
            font-family: inherit;
            font-size: clamp(2rem, 5vw, 3.2rem);
            font-weight: 800;
            line-height: 1.2;
            color: #ffffff !important;
            margin: 0 0 20px 0;
            text-transform: none;
            animation-delay: 0.05s;
        }

        /* Sous-titre (Enchaînement serré après le titre) */
        & .zindex-hero-subtitle {
            font-family: inherit;
            font-size: clamp(0.95rem, 1.8vw, 1.1rem);
            font-weight: 400;
            line-height: 1.6;
            color: rgba(255, 255, 255, 1) !important;
            margin: 0 0 30px 0;
            max-width: 620px;
            text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
            animation-delay: 0.18s;
        }

        /* Conteneur des boutons (S'affiche juste après le sous-titre) */
        & .zindex-hero-buttons {
            display: flex;
            flex-wrap: wrap;
            gap: 12px;
            width: 100%;
            animation-delay: 0.3s;

            /* Styles généraux des boutons avec une forte spécificité */
            & .zindex-hero-btn {
                display: inline-flex !important;
                align-items: center;
                justify-content: center;
                padding: 12px 24px !important;
                font-size: clamp(0.85rem, 1.5vw, 0.9rem) !important;
                font-weight: 700 !important;
                text-transform: uppercase !important;
                letter-spacing: 0.05em !important;
                border-radius: 4px !important;
                text-decoration: none !important;
                white-space: nowrap;
                border: none !important;
                transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out, opacity 0.2s;

                /* Correction de la visibilité des boutons via leurs classes et ID */
                &.zindex-hero-btn-primary, &#zindex-hero-btn-primary {
                    background-color: #e61a27 !important;
                    color: #ffffff !important;

                    &:hover {
                        background-color: #cd1320 !important;
                        color: #ffffff !important;
                    }
                }

                &.zindex-hero-btn-secondary, &#zindex-hero-btn-secondary {
                    background-color: #ffffff !important;
                    color: #1f2937 !important;

                    &:hover {
                        background-color: #f3f4f6 !important;
                        color: #1f2937 !important;
                    }
                }
            }
        }
    }

    /* --- RESPONSIVITÉ MOBILE & TABLETTE --- */
    @media (max-width: 768px) {
        min-height: 440px;
        height: auto;
        padding: 60px 0;

        & .zindex-hero-overlay {
            background: linear-gradient(180deg, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.6) 100%) !important;
        }

        & .zindex-hero-content {
            align-items: center;
            text-align: center;
            margin: 0 auto;

            & .zindex-hero-subtitle {
                margin-right: auto;
                margin-left: auto;
            }

            & .zindex-hero-buttons {
                justify-content: center;
                gap: 10px;

                & .zindex-hero-btn {
                    width: 100%;
                    max-width: 260px;
                    padding: 10px 20px !important;
                }
            }
        }
    }
}