/* =========================================
   STYLE PAGE ACCUEIL - FINAL CORRIGÉ
   ========================================= */

/* --- 1. HERO SLIDER --- */
.hero-slider { position: relative; height: 100vh; width: 100%; overflow: hidden; background: #000; }

.slide {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0;
    transition: opacity 1.5s ease-in-out;
    display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center;
    padding: 0 20px; box-sizing: border-box; isolation: isolate; z-index: 0;
}
.slide.active { opacity: 1; z-index: 1; }

.slide-bg {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover; background-position: center; z-index: -1;
    animation: zoomSlow 20s linear infinite alternate;
}
@keyframes zoomSlow { 0% { transform: scale(1); } 100% { transform: scale(1.1); } }

/* CORRECTIF LUMINOSITÉ : Opacité réduite à 0.4 (au lieu de 0.8) */
.slide::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(43, 2, 2, 0.2), rgba(43, 2, 2, 0.5)); 
    z-index: 1; 
}

.slide-particles { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; }
.slide-content { position: relative; z-index: 3; color: var(--white); max-width: 1000px; margin-top: 60px; pointer-events: auto; }

.slide-title {
    font-size: 4rem; font-weight: 900; margin-bottom: 10px; text-transform: uppercase;
    color: var(--white); text-shadow: 0 10px 30px rgba(0,0,0,0.5);
    opacity: 0; transform: translateY(30px);
}
.slide.active .slide-title { animation: fadeUp 1s 0.5s forwards; }

.slide-subtitle { 
    font-size: 1.4rem; color: var(--ttb-gold); margin-bottom: 40px; font-weight: 600; letter-spacing: 2px; 
    opacity: 0; transform: translateY(30px);
}
.slide.active .slide-subtitle { animation: fadeUp 1s 0.7s forwards; }

@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }

.hero-slider .btn-gold { opacity: 0; transform: translateY(30px); }
.slide.active .btn-gold { animation: fadeUp 1s 0.9s forwards; }

.slider-dots-container { position: absolute; bottom: 40px; width: 100%; display: flex; justify-content: center; z-index: 10; }
.slider-dots { display: flex; gap: 15px; }
.dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--ttb-gold); cursor: none; transition: 0.3s; }
.dot.active { background: var(--ttb-gold); transform: scale(1.3); }


/* --- 2. CONTENU ACCUEIL --- */
.section-padding { padding: 100px 0; }

.section-header { text-align: center; margin-bottom: 60px; }
.section-subtitle { color: var(--ttb-gold); font-size: 0.9rem; font-weight: 700; letter-spacing: 3px; text-transform: uppercase; display: block; margin-bottom: 10px; }
.section-title { font-size: 3rem; font-weight: 900; color: #222; margin: 0; text-transform: uppercase; }
.line-gold { width: 60px; height: 5px; background: var(--gold-gradient); margin: 20px auto; }

/* About */
.bg-light { background: #f9f9f9; position: relative; }
.bg-light::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-image: radial-gradient(#ddd 1px, transparent 1px); background-size: 30px 30px; opacity: 0.3; pointer-events: none;
}
.about-wrapper { display: flex; align-items: center; gap: 60px; position: relative; z-index: 1; }
.about-image { flex: 1; position: relative; }
.about-image img { width: 100%; border-radius: 15px; box-shadow: 0 20px 50px rgba(0,0,0,0.2); }
.experience-badge {
    position: absolute; bottom: -20px; right: -20px; background: var(--primary-red);
    color: var(--white); padding: 25px; border-radius: 15px; text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3); z-index: 5;
}
.experience-badge span { display: block; font-size: 2.5rem; font-weight: 900; color: var(--ttb-gold); line-height: 1; }
.about-text { flex: 1; color: var(--text-gray); }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 40px; border-top: 1px solid #ddd; padding-top: 30px; }
.stat-item h3 { font-size: 2.5rem; color: var(--primary-red); margin: 0; font-weight: 900; }


/* --- 3. PARALLAX CTA (CORRECTION GRANDS ÉCRANS) --- */
.parallax-cta {
    background-image: url('../images/parallax-bg.png'); 
    background-attachment: fixed; 
    
    /* ANCRAGE HAUT : L'image colle au haut pour ne pas être coupée */
    background-position: center top; 
    
    background-size: cover; 
    background-repeat: no-repeat;
    background-color: var(--dark-red);
    
    /* HAUTEUR AUGMENTÉE + FLEXBOX */
 
    min-height: 500px; 
    display: flex;
    align-items: center;
    justify-content: center;
    
    position: relative;
}
.parallax-cta::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); z-index: 1; }
.cta-content { position: relative; z-index: 2; color: white; max-width: 800px; margin: 0 auto; }
.cta-content h2 { font-size: 3.5rem; margin-bottom: 20px; text-transform: uppercase; font-weight: 800; line-height: 1.1; }
.cta-content p { font-size: 1.3rem; margin-bottom: 40px; color: #ddd; font-weight: 300; }


/* --- 4. SECTION SERVICES --- */
.bg-dark { background: #0f0f0f; color: var(--white); }
.bg-dark .section-title { color: var(--white); }

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); 
    gap: 40px; 
    row-gap: 70px;
    padding: 20px 0;
}

.service-card {
    background: rgba(255, 255, 255, 0.03); 
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 30px 20px;
    border-radius: 20px; 
    text-align: center;
    transform-style: preserve-3d; 
    perspective: 1000px;
    position: relative; 
    z-index: 1;
    display: flex; flex-direction: column; height: 100%; 
}
.service-card:hover { z-index: 10; }

.service-content { flex: 1; display: flex; flex-direction: column; justify-content: flex-start; transform: translateZ(10px); }
.service-card h3 { font-size: 1.1rem; margin: 15px 0; line-height: 1.4; }
.service-card p { font-size: 0.85rem; color: #ccc; }

.icon-box {
    width: 70px; height: 70px;
    background: var(--white); border-radius: 50%;
    display: flex; align-items: center; justify-content: center; 
    margin: 0 auto 20px; font-size: 1.8rem; color: var(--primary-red); 
    transition: 0.4s; transform: translateZ(20px); 
}
.service-card:hover .icon-box { background: var(--ttb-gold); color: #000; }


/* --- 5. SECTION APP MOBILE (STARTUP) --- */
.app-section {
    padding: 100px 0;
    background: linear-gradient(to right, #050505, #1a0505);
    position: relative; overflow: hidden;
}
/* Cercle décoratif en fond */
.app-section::before {
    content: ''; position: absolute; top: -20%; right: -10%; width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(255, 204, 0, 0.1) 0%, transparent 70%);
    border-radius: 50%; pointer-events: none;
}

.app-wrapper { display: flex; align-items: center; gap: 80px; }
.app-content { flex: 1; }
.app-visual { flex: 1; display: flex; justify-content: center; position: relative; }

.app-badge {
    background: rgba(255, 204, 0, 0.15); color: var(--ttb-gold);
    padding: 8px 20px; border-radius: 30px; font-weight: 700; text-transform: uppercase;
    font-size: 0.8rem; letter-spacing: 2px; border: 1px solid rgba(255, 204, 0, 0.3);
    display: inline-block; margin-bottom: 20px;
}
.app-title { font-size: 3rem; color: var(--white); line-height: 1.2; margin-bottom: 20px; font-weight: 800; }
.text-gold { color: var(--ttb-gold); }
.app-desc { color: #ccc; font-size: 1.1rem; line-height: 1.8; margin-bottom: 30px; }

.app-features { margin-bottom: 40px; }
.app-features li { color: var(--white); margin-bottom: 15px; font-size: 1.05rem; display: flex; align-items: center; gap: 15px; }
.app-features i { color: var(--ttb-gold); font-size: 1.2rem; }

.app-buttons { display: flex; gap: 20px; margin-bottom: 20px; }
.btn-store {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 25px; background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2); border-radius: 10px;
    color: #fff; font-family: 'Montserrat', sans-serif; font-weight: 600;
    transition: 0.3s; cursor: not-allowed; opacity: 0.7;
}
.btn-store i { font-size: 1.5rem; }
.btn-store:hover { background: rgba(255,255,255,0.2); border-color: var(--white); opacity: 1; }
.coming-soon { font-size: 0.85rem; color: #666; font-style: italic; }

/* Mockup Téléphone */
.phone-mockup {
    width: 300px; height: 680px;
    background: #000; border-radius: 40px;
    border: 8px solid #333;
    box-shadow: 0 30px 80px rgba(0,0,0,0.8);
    position: relative; z-index: 2;
    overflow: hidden;
    transform: rotate(-5deg); /* Légère inclinaison stylée */
}
.phone-mockup img { 
    width: 100%; height: 100%; object-fit: fill; 
    position: absolute; top: 0; left: 0;
    opacity: 0; transition: opacity 0.5s ease-in-out;
}
.phone-mockup img.active { opacity: 1; }

.app-glow {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 120%; height: 50%; background: var(--ttb-gold);
    filter: blur(80px); opacity: 0.2; z-index: -1; animation: pulseGlow 4s infinite alternate;
}
@keyframes pulseGlow { 0% { opacity: 0.1; } 100% { opacity: 0.3; } }


/* --- BACKGROUNDS IMAGES --- */
#slide1 .slide-bg { background-image: url('../images/camions.png'); }
#slide2 .slide-bg { background-image: url('../images/chantier.png'); }
#slide3 .slide-bg { background-image: url('../images/datacenter.png'); }
#slide4 .slide-bg { background-image: url('../images/app-slide.png'); }


/* =========================================
   WIDGET DG FLOTTANT (STYLE)
   ========================================= */
.dg-widget {
    position: fixed; bottom: 40px; right: 40px;
    z-index: 9999;
    display: flex; flex-direction: column; align-items: flex-end;
}
.dg-avatar-container { width: 70px; height: 70px; position: relative; cursor: pointer; transition: 0.3s; }
.dg-avatar-container:hover { transform: scale(1.1); }
.dg-img-wrapper { width: 100%; height: 100%; border-radius: 50%; border: 3px solid var(--ttb-gold); overflow: hidden; background: #000; box-shadow: 0 10px 25px rgba(0,0,0,0.5); position: relative; z-index: 2; }
.dg-img-wrapper img { width: 100%; height: 100%; object-fit: cover; }
.dg-status-dot { width: 12px; height: 12px; background: #00ff88; border: 2px solid #000; border-radius: 50%; position: absolute; bottom: 2px; right: 2px; z-index: 3; }
.dg-pulse, .dg-pulse-2 { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 100%; height: 100%; border-radius: 50%; border: 1px solid var(--ttb-gold); opacity: 0; z-index: 1; }
.dg-pulse { animation: pulseWave 2s infinite; }
.dg-pulse-2 { animation: pulseWave 2s infinite 0.6s; }
@keyframes pulseWave { 0% { width: 100%; height: 100%; opacity: 0.8; } 100% { width: 250%; height: 250%; opacity: 0; } }

.dg-card {
    position: absolute; bottom: 90px; right: 0; width: 300px;
    background: rgba(20, 20, 20, 0.95); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--ttb-gold); border-radius: 20px 20px 5px 20px; 
    padding: 25px; color: var(--white); box-shadow: 0 20px 50px rgba(0,0,0,0.6);
    opacity: 0; visibility: hidden; transform: translateY(20px) scale(0.9); transform-origin: bottom right; transition: all 0.4s;
}
.dg-widget.active .dg-card { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.dg-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 10px; }
.dg-header h3 { font-size: 0.9rem; color: var(--ttb-gold); margin: 0; text-transform: uppercase; }
.dg-close { background: none; border: none; color: #fff; cursor: pointer; font-size: 1.1rem; transition: 0.3s; }
.dg-close:hover { color: var(--primary-red); transform: rotate(90deg); }
.dg-quote { font-style: italic; font-size: 0.9rem; line-height: 1.5; color: #ccc; margin-bottom: 20px; border-left: 2px solid var(--ttb-gold); padding-left: 15px; }
.dg-signature strong { display: block; color: var(--white); font-size: 1rem; }
.dg-signature span { color: var(--text-gray); font-size: 0.8rem; }


/* =========================================
   RESPONSIVE
   ========================================= */

@media (max-width: 1200px) {
    .services-grid { grid-template-columns: repeat(2, 1fr); gap: 30px; row-gap: 80px; }
}

@media (max-width: 1024px) {
    .stats-grid { grid-template-columns: 1fr; gap: 30px; }
    .about-wrapper { flex-direction: column; }
    .about-image { width: 100%; margin-bottom: 30px; }
    .slide-title { font-size: 2.2rem; }
    .hero-slider { height: 60vh; min-height: 500px; } /* Hauteur réduite sur Tablette */

    .app-wrapper { flex-direction: column; text-align: center; gap: 50px; }
    .app-features li { justify-content: center; }
    .app-buttons { justify-content: center; }
    
    /* MOBILE PARALLAX FIX: Pas de fixed sur mobile */
    .parallax-cta { background-attachment: scroll; padding: 100px 0; min-height: auto; }
    .cta-content h2 { font-size: 2.2rem; }
}

@media (max-width: 768px) {
    .dg-widget { bottom: 15px; right: 15px; align-items: flex-end; max-width: 100%; }
    .dg-avatar-container { width: 55px; height: 55px; }
    .dg-card { width: 260px; max-width: 80vw; right: 0; bottom: 75px; margin-right: 0; }
    .dg-quote { font-size: 0.8rem; }

    /* --- SLIDER ACCUEIL MOBILE --- */
    .hero-slider { height: 55vh; min-height: 320px; }
    .slide-title { font-size: 1.6rem; margin-bottom: 6px; line-height: 1.2; }
    .slide-subtitle { font-size: 0.85rem; margin-bottom: 20px; letter-spacing: 1px; }
    .slide-content { margin-top: 0; padding: 0 15px; }
    .btn-gold { padding: 10px 25px; font-size: 0.82rem; }
    .slider-dots-container { bottom: 15px; }

    /* --- SECTIONS --- */
    .section-padding { padding: 60px 0; }
    .section-title { font-size: 2rem; }
    .section-subtitle { font-size: 0.8rem; letter-spacing: 2px; }
    .line-gold { margin: 15px auto; }

    /* --- ABOUT --- */
    .experience-badge { position: static; margin: 20px auto 0; display: table; border-radius: 10px; }
    .stats-grid { grid-template-columns: repeat(3, 1fr); gap: 15px; border-top: 1px solid #eee; }
    .stat-item h3 { font-size: 2rem; }
    .stat-item p { font-size: 0.8rem; }

    /* --- CTA PARALLAX --- */
    .cta-content h2 { font-size: 1.8rem; }
    .cta-content p { font-size: 1rem; margin-bottom: 25px; }

    /* --- APP SECTION --- */
    .app-title { font-size: 2rem; }
    .app-desc { font-size: 0.95rem; }
    .phone-mockup { width: 220px; height: 490px; }
    .app-buttons { flex-wrap: wrap; gap: 12px; }
    .btn-store { padding: 10px 18px; }
}

@media (max-width: 600px) {
    .services-grid { grid-template-columns: 1fr; row-gap: 30px; padding-bottom: 30px; }
    .service-card { height: auto; }
}

/* =========================================
   RESPONSIVE PETIT MOBILE (≤480px)
   ========================================= */
@media (max-width: 480px) {
    /* SLIDER */
    .hero-slider { height: 60vh; min-height: 300px; }
    .slide-title { font-size: 1.25rem; letter-spacing: 0; margin-bottom: 5px; }
    .slide-subtitle { font-size: 0.75rem; margin-bottom: 12px; letter-spacing: 0.5px; }
    .slide-content { padding: 0 12px; }
    .btn-gold { padding: 9px 20px; font-size: 0.78rem; }
    .slider-dots-container { bottom: 10px; }
    .dot { width: 8px; height: 8px; }

    /* SECTIONS */
    .section-padding { padding: 50px 0; }
    .section-title { font-size: 1.6rem; line-height: 1.2; }
    .section-subtitle { font-size: 0.72rem; letter-spacing: 1.5px; }
    .section-header { margin-bottom: 35px; }

    /* ABOUT */
    .about-text h2 { font-size: 1.5rem; }
    .stats-grid { grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
    .stat-item h3 { font-size: 1.6rem; }
    .stat-item p { font-size: 0.7rem; }

    /* CTA PARALLAX */
    .parallax-cta { padding: 60px 0; }
    .cta-content h2 { font-size: 1.4rem; line-height: 1.3; }
    .cta-content p { font-size: 0.88rem; margin-bottom: 20px; }

    /* APP SECTION */
    .app-section { padding: 60px 0; }
    .app-wrapper { gap: 30px; }
    .app-title { font-size: 1.6rem; line-height: 1.3; }
    .app-desc { font-size: 0.88rem; margin-bottom: 20px; }
    .app-badge { font-size: 0.7rem; padding: 6px 14px; }
    .app-features li { font-size: 0.88rem; }
    .app-buttons { flex-direction: column; align-items: center; gap: 10px; }
    .btn-store { width: 100%; justify-content: center; }
    .phone-mockup { width: 180px; height: 410px; border-width: 6px; border-radius: 28px; }
    .app-glow { filter: blur(50px); }
}

/* =========================================
   RESPONSIVE TRÈS PETIT (≤375px — iPhone SE)
   ========================================= */
@media (max-width: 375px) {
    .slide-title { font-size: 1.1rem; }
    .section-title { font-size: 1.4rem; }
    .stats-grid { gap: 8px; }
    .stat-item h3 { font-size: 1.4rem; }
    .phone-mockup { width: 150px; height: 340px; }
    .cta-content h2 { font-size: 1.25rem; }
    .app-title { font-size: 1.4rem; }
}