/* =============================================
   VARIABLES & RESET
============================================= */

:root {
    /* Couleurs principales */
    --color-primary: #1E1E1E;
    --color-accent: #FF6600;
    --color-accent-light: #FF8C42;
    --color-white: #FFFFFF;
    --color-light: #F8F9FA;
    --color-gray: #6C757D;
    --color-dark: #343A40;
    
    /* Typographie */
    --font-heading: 'Montserrat', 'Inter', sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Espacements */
    --space-xl: 8rem;
    
    /* Bordures */
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-full: 50%;
    
    /* Shadows */
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.1);
    
    /* Transitions */
    --transition-normal: 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-primary);
    background-color: var(--color-white);
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* =============================================
   TYPOGRAPHIE
============================================= */

h1, h2, h3 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 3.5rem; font-weight: 800; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.75rem; }

p {
    margin-bottom: 1.5rem;
    color: var(--color-gray);
}

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color var(--transition-normal);
}

a:hover {
    color: var(--color-accent-light);
}

.text-accent {
    color: var(--color-accent);
}

.text-center {
    text-align: center;
}

.section-title {
    position: relative;
    margin-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background-color: var(--color-accent);
}

.text-center .section-title::after {
    left: 50%;
    transform: translateX(-50%);
}

.section-subtitle {
    font-size: 1.125rem;
    max-width: 700px;
    margin: 0 auto 3rem;
}

/* =============================================
   BOUTONS
============================================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 28px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    border-radius: var(--radius-md);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition-normal);
    text-align: center;
    white-space: nowrap;
}

.btn-primary {
    background-color: var(--color-accent);
    color: var(--color-white);
    border-color: var(--color-accent);
}

.btn-primary:hover {
    background-color: var(--color-accent-light);
    border-color: var(--color-accent-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background-color: transparent;
    color: var(--color-accent);
    border-color: var(--color-accent);
}

.btn-outline:hover {
    background-color: var(--color-accent);
    color: var(--color-white);
    transform: translateY(-2px);
}

.btn-light {
    background-color: var(--color-white);
    color: var(--color-primary);
    border-color: var(--color-white);
}

.btn-light:hover {
    background-color: transparent;
    color: var(--color-white);
    transform: translateY(-2px);
}

.btn-text {
    background: transparent;
    color: var(--color-accent);
    padding: 8px 0;
    font-weight: 600;
}

.btn-text:hover {
    color: var(--color-accent-light);
    transform: translateX(5px);
}

.btn-large {
    padding: 16px 36px;
    font-size: 1.125rem;
}

/* =============================================
   SECTIONS
============================================= */

.section {
    padding: var(--space-xl) 0;
}

.section-light { background-color: var(--color-light); }
.section-dark { background-color: var(--color-white); }

/* =============================================
   HERO SECTION
============================================= */

.hero {
    padding: 120px 0 80px;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: var(--color-white);
    position: relative;
    overflow: hidden; /* Important pour que le robot ne dépasse pas du site */
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 40%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 102, 0, 0.1) 100%);
}

.hero .container {
    position: relative;
    z-index: 2;
    /* La mise en page Flex se fait dans les Media Queries pour Desktop */
}

.hero-content {
    /* Sera géré par le flexbox */
}

/* --- STYLE DU CONTENEUR IMAGE --- */
.hero-visual {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    
    display: flex;
    justify-content: center;
    align-items: flex-end; /* Colle le robot en bas */
    overflow: visible; /* CRUCIAL : Laisse le robot dépasser de sa boite */
}

/* --- STYLE DE L'IMAGE (LE ROBOT) --- */
.hero-img-custom {
    box-shadow: none !important;
    border-radius: 0 !important;
    border: none !important;
    display: block;
    height: auto;
    max-width: none !important; /* On supprime toute limite */
    
    /* Animation d'apparition fluide */
    animation: fadeScale 1s ease-out;
}

@keyframes fadeScale {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

/* CORRECTION POUR QUE LE TEXTE NE SAUTE PLUS */
.hero-title {
    font-size: 3.5rem;
    line-height: 1.3;
    margin-bottom: 1.5rem;
    min-height: 220px; 
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.hero-title-line {
    display: block;
}

/* Machine à écrire */
.type-effect {
    display: inline-block;
    white-space: nowrap;
    vertical-align: bottom;
}

.type-effect::after {
    content: '|';
    animation: blink 1s infinite;
    color: #FFFFFF;
    margin-left: 5px;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2.5rem;
    max-width: 600px;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.hero-stats {
    display: flex;
    gap: 40px;
    margin-top: 60px;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--color-accent);
    line-height: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 5px;
}

/* =============================================
   TECH STACK (Logos)
============================================= */
.tech-stack-container {
    background-color: #111111;
    padding: 30px 0;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    z-index: 50;
    border-top: 1px solid rgba(255,255,255,0.1);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.tech-track {
    display: inline-block;
    animation: scroll 30s linear infinite;
}

.tech-track:hover {
    animation-play-state: paused;
}

.tech-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin: 0 50px;
    color: #FFFFFF;
    font-size: 1.5rem;
    font-weight: 600;
}

.tech-logo i {
    font-size: 2rem;
    color: #FF6600;
}

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

/* =============================================
   SERVICES PREVIEW
============================================= */

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.service-card {
    background-color: var(--color-white);
    border-radius: var(--radius-lg);
    padding: 40px 30px;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-accent-light);
}

.service-img-wrapper {
    width: 100%;
    height: 200px; 
    margin-bottom: 20px;
    border-radius: 10px;
    overflow: hidden; 
}

.service-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    transition: transform 0.5s ease;
}

.service-card:hover .service-img-wrapper img {
    transform: scale(1.1);
}

.service-title {
    margin-bottom: 15px;
    color: var(--color-primary);
}

.service-description {
    margin-bottom: 25px;
    flex-grow: 1;
}

.service-features {
    list-style: none;
    margin-bottom: 25px;
}

.service-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    color: var(--color-gray);
}

.service-features i {
    color: var(--color-accent);
}

/* =============================================
   PROCESS SECTION
============================================= */

.process-steps {
    max-width: 800px;
    margin: 0 auto;
}

.process-step {
    display: flex;
    align-items: flex-start;
    gap: 30px;
    margin-bottom: 40px;
    position: relative;
}

.process-step:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 35px;
    top: 70px;
    bottom: -40px;
    width: 2px;
    background-color: rgba(255, 102, 0, 0.2);
}

.step-number {
    flex-shrink: 0;
    width: 70px;
    height: 70px;
    background-color: var(--color-accent);
    color: var(--color-white);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    box-shadow: var(--shadow-md);
}

.step-content { padding-top: 10px; }
.step-content h3 { margin-bottom: 10px; color: var(--color-primary); }
.step-content p { color: var(--color-gray); }

/* =============================================
   CTA SECTION
============================================= */

.cta-section {
    padding: 100px 0;
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-light) 100%);
    color: var(--color-white);
    text-align: center;
}

.cta-content h2 {
    font-size: 2.75rem;
    margin-bottom: 1rem;
    color: var(--color-white);
}

.cta-content p {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* =============================================
   RESPONSIVE DESIGN (C'EST ICI QUE TOUT SE JOUE)
============================================= */

/* --- VERSION ORDINATEUR (Desktop > 992px) --- */
@media (min-width: 992px) {
    /* Le conteneur principal qui englobe texte + image */
    .hero .container {
        display: flex;
        align-items: center; 
        justify-content: space-between; 
        height: 100%; 
    }

    /* La partie texte prend environ la moitié de la place */
    .hero-content {
        flex: 1;
        padding-right: 20px; 
        z-index: 2; /* Texte passe DEVANT le robot */
    }

    /* La partie image prend l'autre moitié */
    .hero-visual {
        flex: 1;
        position: relative;
    }

    /* ===============================================
       LE SECRET DU ROBOT GÉANT SUR PC
       =============================================== */
    .hero-img-custom {
        /* On force l'image à être beaucoup plus large que sa colonne (135%) */
        width: 135%; 
        
        /* On le décale vers la droite pour qu'il sorte du cadre */
        /* Jouez avec cette valeur si le robot est trop à droite ou gauche */
        margin-right: -15%; 
        
        /* On s'assure qu'il n'y a pas de limite */
        max-width: none !important; 
    }
}

/* --- VERSION TABLETTE (max 991px) --- */
@media (max-width: 991px) {
    .hero .container {
        flex-direction: column; /* On empile texte et image */
        text-align: center;
    }
    
    .hero-title {
        align-items: center; /* Centre le titre */
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .hero-visual {
        margin-top: 50px;
        width: 100%;
    }
    
    /* Sur tablette, on remet le robot à une taille normale */
    .hero-img-custom {
        width: 80%; /* Un peu plus petit pour l'esthétique */
        max-width: 500px;
        margin: 0 auto; /* Centré */
    }
}

/* --- VERSION MOBILE (max 768px) --- */
@media (max-width: 768px) {
    .section { padding: 80px 0; }
    .hero { padding: 100px 0 60px; }
    
    .hero-title {
        font-size: 2.25rem;
        min-height: auto;
        margin-bottom: 20px;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .services-grid { grid-template-columns: 1fr; }
    
    .hero-stats {
        flex-direction: column;
        gap: 30px;
        margin-top: 40px;
    }
    
    /* Le robot sur mobile */
    .hero-img-custom {
        width: 100%;
        max-width: 100%;
        margin-right: 0;
    }
}

@media (max-width: 576px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    .btn-large { padding: 14px 28px; font-size: 1rem; }
    .stat-number { font-size: 2.5rem; }
}