/* --- GLOBAL FIX ZERO MARGIN ASTRA --- */
.home #content,
.home .site-content,
.home .ast-container,
.astra-child-full-width {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* --- HERO SECTION SAAS PREMIUM --- */
.home-hero {
    position: relative;
    min-height: 90vh;
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    display: flex;
    align-items: center;
    background-color: var(--cat-noir);
    color: var(--cat-blanc);
    padding: 4rem 0 12rem 0;
    /* L'image de fond sert de fallback si la vidéo charge lentement */
    background-image: url("https://images.unsplash.com/photo-1541888086225-f6740f9e8184?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    /* Arc arrondi en BAS du hero — effet SaaS/Premium cohérent avec la page À Propos */
    clip-path: ellipse(120% 100% at 50% 0%);
    overflow: hidden; /* Important pour masquer les débordements de la vidéo */
}

/* Style de la vidéo de fond */
.hero-video-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: 0; /* Derrière le cache noir (z-index 1) et le texte (z-index 3) */
    transform: translateX(-50%) translateY(-50%);
    object-fit: cover;
    pointer-events: none; /* Empêche les clics sur la vidéo */
}

/* Fond image pour le hero (page À Propos et pages internes)
   Même comportement que hero-video-bg mais pour les images et iframes */
.video-background {
    position: absolute;
    inset: 0; /* top: 0; right: 0; bottom: 0; left: 0 */
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* Quand .video-background contient une image via background-image, elle couvre tout */
.video-background[style*="background-image"] {
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

/* Quand .video-background contient un iframe (YouTube / Vimeo) */
.video-background.iframe-background {
    overflow: hidden;
}

.video-background.iframe-background iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 56.25vw; /* Ratio 16:9 */
    min-height: 100%;
    min-width: 177.77vh; /* Ratio 16:9 inverse */
    transform: translateX(-50%) translateY(-50%);
    pointer-events: none;
}

/* Redimensionnement intelligent pour les iFrames YouTube/Vimeo afin qu'ils simulent un objet-fit: cover */
iframe.hero-iframe-bg {
    width: 100vw;
    height: 56.25vw; /* Ratio 16:9 (100 / 16 * 9) */
    min-height: 100vh;
    min-width: 177.77vh; /* Ratio 16:9 (100 / 9 * 16) */
}

.hero-overlay {
    position: absolute;
    inset: 0;
    /* Gradient mesh très premium / Deep Space */
    background: radial-gradient(
        circle at 20% 50%,
        rgba(9, 9, 11, 0.85) 0%,
        rgba(9, 9, 11, 0.95) 100%
    );
    z-index: 1;
}

/* Glow jaune en fond pour l'effet tech */
.hero-overlay::after {
    content: "";
    position: absolute;
    top: -50%;
    left: -20%;
    width: 800px;
    height: 800px;
    background: radial-gradient(
        circle,
        var(--cat-jaune-glow) 0%,
        transparent 60%
    );
    opacity: 0.3;
    z-index: 2;
    filter: blur(80px);
}

.home-hero .ese-container {
    position: relative;
    z-index: 3;
}

.hero-content {
    max-width: 850px;
    /* Remplacement de la bordure jaune par un pillule "Nouveau" */
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background: rgba(255, 214, 0, 0.1);
    border: 1px solid rgba(255, 214, 0, 0.3);
    color: var(--cat-jaune);
    border-radius: 100px;
    font-weight: 600;
    letter-spacing: 0.05em;
    font-size: 0.875rem;
    margin-bottom: 2rem;
    text-transform: uppercase;
}

.hero-title {
    font-size: 5.5rem;
    color: var(--cat-blanc);
    margin-bottom: 1.5rem;
    line-height: 1.05;
    letter-spacing: -0.03em;
}

/* Effet texte dégradé Luxe sur le mot central */
.hero-title .highlight {
    background: linear-gradient(135deg, #ffd600 0%, #ff9900 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 3.5rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
    line-height: 1.6;
    max-width: 700px;
}

.hero-actions {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

/* --- SERVICES SECTION (PILIERS) --- */
.home-services {
    background-color: var(--cat-blanc);
    margin-top: -6vw;
    padding-top: 10rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-top: 5rem;
}

.service-card {
    padding: 3.5rem 2.5rem;
    display: flex;
    flex-direction: column;
    height: 100%;
    background-color: var(--cat-blanc);
    border: 1px solid rgba(9, 9, 11, 0.05); /* Très fine bordure SaaS */
    border-radius: var(--border-radius-lg);
    box-shadow: var(--box-shadow);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ffd600 0%, #ff9900 100%);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--box-shadow-hover);
    border-color: rgba(255, 214, 0, 0.5);
}

.service-card:hover::before {
    opacity: 1;
}

.card-icon {
    color: var(--cat-jaune);
    margin-bottom: 2.5rem;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 214, 0, 0.1);
    border-radius: 16px; /* Squircle icon style SaaS */
}

.card-icon svg {
    width: 32px;
    height: 32px;
}

.service-card .card-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.service-card .card-text {
    color: var(--cat-gris);
    margin-bottom: 1.5rem;
    font-size: 1.125rem;
    line-height: 1.6;
}

.card-sub-services {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem 0;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding-top: 1.5rem;
    flex-grow: 1;
}

.card-sub-services li {
    margin-bottom: 0.75rem;
}

.card-sub-services a {
    color: var(--cat-gris);
    font-size: 0.95rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    transition:
        color 0.2s,
        padding-left 0.2s;
}

.card-sub-services a::before {
    content: "→";
    margin-right: 0.5rem;
    color: var(--cat-jaune);
    font-weight: bold;
}

.card-sub-services a:hover {
    color: var(--cat-noir);
    padding-left: 5px;
}

.mt-auto {
    margin-top: auto;
}

.card-link {
    color: var(--cat-noir);
    font-family: var(--font-primary);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 1px;
    transition:
        color var(--transition-fast),
        transform var(--transition-fast);
}

.card-link:hover {
    color: #ff9900;
    transform: translateX(5px);
}

/* --- ABOUT SECTION & STATS --- */
.home-about {
    background-color: var(--cat-noir);
    color: var(--cat-blanc);
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding: 8rem 0;
    position: relative;
    overflow: hidden;
}

.home-about::after {
    content: "";
    position: absolute;
    bottom: -400px;
    right: -200px;
    width: 800px;
    height: 800px;
    background: radial-gradient(
        circle,
        rgba(255, 214, 0, 0.15) 0%,
        transparent 60%
    );
    filter: blur(100px);
    pointer-events: none;
}

.home-about .section-title {
    color: var(--cat-blanc);
}

.home-about .section-description {
    color: rgba(255, 255, 255, 0.7);
}

.home-about .section-title::after {
    margin-left: 0;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: center;
    position: relative;
    z-index: 2;
}

.about-features {
    list-style: none;
    padding: 0;
    margin-top: 3rem;
}

.about-features li {
    position: relative;
    padding-left: 3rem;
    margin-bottom: 2rem;
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--cat-blanc);
    line-height: 1.6;
}

.about-features li strong {
    color: var(--cat-jaune);
    font-weight: 700;
}

.about-features li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 2px;
    width: 24px;
    height: 24px;
    background: rgba(255, 214, 0, 0.2);
    color: var(--cat-jaune);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
}

/* Stats Glassmorphism */
.about-stats,
.about-stats-static {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.stat-item {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-lg);
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: all var(--transition-normal);
}

.stat-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-5px);
    border-color: rgba(255, 214, 0, 0.3);
}

.stat-item:nth-child(3) {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 2rem;
    justify-content: flex-start;
}

.stat-item:nth-child(3) .stat-number {
    margin-bottom: 0;
}

.stat-number {
    display: block;
    font-size: 4.5rem;
    font-family: var(--font-headings);
    font-weight: 800;
    background: linear-gradient(135deg, #ffd600 0%, #ff9900 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
    margin-bottom: 1rem;
}

.stat-label {
    font-size: 1rem;
    font-family: var(--font-primary);
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- PRODUCTS SECTION (Packs) --- */
.home-products {
    background-color: var(
        --cat-gris-clair
    ); /* Fond très léger gris typique SaaS */
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    margin-top: 5rem;
}

.products-grid-2 {
    grid-template-columns: repeat(2, 1fr);
    max-width: 800px;
    margin: 2.5rem auto 0 auto;
}

.product-item {
    background-color: var(--cat-blanc);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    position: relative;
    box-shadow: var(--box-shadow);
    border: 1px solid rgba(9, 9, 11, 0.05);
    transition: all var(--transition-normal);
}

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

.product-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/3;
}

.product-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(9, 9, 11, 0.8) 0%,
        transparent 60%
    );
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.product-item:hover .product-image img {
    transform: scale(1.05);
}

.product-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2.5rem;
    margin: 0;
    color: var(--cat-blanc);
    font-size: 1.75rem;
    z-index: 2;
}

.product-overlay {
    position: absolute;
    inset: 0;
    background: rgba(9, 9, 11, 0.4);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-normal);
    z-index: 3;
}

.product-item:hover .product-overlay {
    opacity: 1;
}

/* --- CTA SECTION --- */
.home-cta {
    background-color: var(--cat-noir);
    color: var(--cat-blanc);
    padding: 10rem 0;
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    position: relative;
    overflow: hidden;
}

.home-cta::before {
    content: "";
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 200px;
    background: var(--cat-jaune);
    filter: blur(150px);
    opacity: 0.15;
}

.cta-title {
    font-size: 4.5rem;
    color: #ffffff;
    margin-bottom: 2rem;
    letter-spacing: -1px;
}

.cta-description {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 4rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.8;
}

/* --- ZONES D'INTERVENTION (MARQUEE) --- */
.home-villes {
    padding: 8rem 0 4rem 0;
    background-color: var(--cat-noir);
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    overflow: hidden;
}

.home-villes .section-title {
    color: var(--cat-blanc);
}

.villes-marquee-container {
    display: flex;
    overflow: hidden;
    white-space: nowrap;
    width: 100vw;
    max-width: 100vw;
    background: rgba(255, 255, 255, 0.02);
    padding: 2.5rem 0;
    margin-top: 4rem;
    border-top: 1px solid rgba(255, 214, 0, 0.05);
    border-bottom: 1px solid rgba(255, 214, 0, 0.05);
}

.villes-marquee {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: space-around;
    min-width: 100%;
    animation: scroll-villes 40s linear infinite;
    gap: 3rem;
    padding-right: 3rem;
}

.villes-marquee:hover {
    animation-play-state: paused;
}

.villes-marquee span {
    color: var(--cat-jaune);
    font-family: var(--font-headings);
    font-size: 2.5rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: default;
    transition: color var(--transition-normal);
}

.villes-marquee span:hover {
    color: var(--cat-blanc);
}

.villes-marquee span.dot {
    color: rgba(255, 255, 255, 0.1);
    font-size: 1.5rem;
    pointer-events: none;
}

@keyframes scroll-villes {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* Largeur étendue pour la section Nos solutions */
.about-solutions-wide .ese-container {
    max-width: 1400px;
}
