/* Home Page Styles
-------------------------------------- */

/* Hero Section with Video Background */
.hero {
    position: relative;
    height: 80vh;
    min-height: 550px;
    max-height: 800px;
    color: var(--white);
    display: flex;
    align-items: center;
    padding-top: 80px; /* Account for fixed header */
    margin-bottom: var(--spacing-xl);
    overflow: hidden;
}

.hero__media {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero__media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.7);
    transition: filter 0.5s ease;
}

.hero:hover .hero__media video {
    filter: brightness(0.8);
}

.hero__fallback-image {
    display: none;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.7);
}

/* Show fallback image if video fails to load */
.hero__media video:not(:valid) + .hero__fallback-image {
    display: block;
}

.hero::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: linear-gradient(to top, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0));
    z-index: 1;
}

.hero__content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    text-align: center;
}

.hero__title {
    font-size: 3rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: var(--spacing-sm);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero__subtitle {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-lg);
    opacity: 0.9;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.hero__cta {
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
}

/* QualiEnR Top Left Badge */
.hero__qualienr-top {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 3;
    background-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    padding: 15px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition-base);
}

.hero__qualienr-top:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.hero__qualienr-top img {
    width: 60px;
    height: 60px;
}

.hero__qualienr-top span {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--white);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Introduction Section */
.intro {
    padding: var(--spacing-xl) 0;
}

.intro__content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--spacing-lg);
}

.intro__text {
    flex: 1 1 500px;
}

.intro__features {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.feature {
    flex: 1 1 160px;
    text-align: center;
    padding: var(--spacing-md);
    transition: var(--transition-base);
    border-radius: var(--border-radius);
}

.feature:hover {
    background-color: var(--gray-100);
    transform: translateY(-5px);
}

.feature__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    margin: 0 auto var(--spacing-sm);
    background-color: var(--gray-100);
    border-radius: 50%;
    transition: var(--transition-base);
}

.feature:hover .feature__icon {
    background-color: var(--primary-light);
}

.feature__title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.feature__text {
    font-size: 0.95rem;
    color: var(--text-light);
}

.intro__image {
    flex: 1 1 400px;
    position: relative;
}

.intro__image img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

/* Services Overview */
.services-overview {
    padding: var(--spacing-xl) 0;
    background-color: var(--gray-100);
}

.services-grid {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.service-card {
    flex: 1 1 350px;
    background-color: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow-sm);
    transition: var(--transition-base);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--box-shadow);
}

.service-card__image {
    overflow: hidden;
}

.service-card__image img {
    width: 100%;
    height: auto;
    transition: transform 0.5s ease;
}

.service-card:hover .service-card__image img {
    transform: scale(1.05);
}

.service-card__content {
    padding: var(--spacing-md);
}

.service-card__title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.service-card__text {
    color: var(--text-light);
    margin-bottom: var(--spacing-sm);
}

.service-card__link {
    display: inline-block;
    color: var(--primary-color);
    font-weight: 600;
    position: relative;
    padding-right: 20px;
}

.service-card__link::after {
    content: '→';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    transition: var(--transition-fast);
}

.service-card__link:hover::after {
    right: -5px;
}

.services-cta {
    text-align: center;
    margin-top: var(--spacing-lg);
}

/* Recent Projects */
.recent-projects {
    padding: var(--spacing-xl) 0;
}

.projects-showcase {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.project-item {
    flex: 1 1 250px;
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-sm);
}

.project-link {
    display: block;
}

.project-item img {
    width: 100%;
    height: auto;
    transition: transform 0.5s ease;
}

.project-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: var(--spacing-sm);
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0));
    color: var(--white);
    transition: var(--transition-base);
}

.project-title {
    font-size: 1rem;
    margin-bottom: 0.25rem;
    color: var(--white);
}

.project-cat {
    font-size: 0.85rem;
    opacity: 0.8;
}

.project-item:hover img {
    transform: scale(1.1);
}

.project-item:hover .project-overlay {
    background: linear-gradient(to top, rgba(13, 110, 253, 0.8), rgba(13, 110, 253, 0.4), rgba(0, 0, 0, 0));
}

.projects-cta {
    text-align: center;
    margin-top: var(--spacing-lg);
}

/* Responsive Styles */
@media (max-width: 991px) {
    .hero {
        height: 70vh;
    }
    
    .hero__title {
        font-size: 2.5rem;
    }
    
    .hero__subtitle {
        font-size: 1.25rem;
    }
}

@media (max-width: 768px) {
    .hero {
        min-height: 500px;
    }
    
    .hero__title {
        font-size: 2rem;
    }
    
    .hero__cta {
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero__qualienr-top {
        position: static;
        margin-bottom: var(--spacing-md);
        justify-content: center;
    }
    
    .intro__content {
        flex-direction: column;
    }
    
    .intro__text {
        order: 2;
    }
    
    .intro__image {
        order: 1;
        margin-bottom: var(--spacing-md);
    }
    
    /* Afficher la vidéo sur mobile */
.hero__media video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero__fallback-image {
    display: none;
}
}

@media (max-width: 576px) {
    .hero {
        min-height: 450px;
    }
    
    .hero__title {
        font-size: 1.75rem;
    }
    
    .hero__subtitle {
        font-size: 1.1rem;
    }
    
    .feature {
        flex: 1 1 100%;
    }
}