/* =========================================
   1. VARIABLES GLOBALES ET THÈME
   ========================================= */
:root {
    --bg-main: #0a0f18;       /* Fond bleu très sombre (Thème Tech) */
    --text-main: #e2e8f0;     /* Texte gris clair */
    --accent: #00f0ff;        /* Couleur accent (Cyan néon) */
    --nav-bg: rgba(10, 15, 24, 0.85); /* Nav semi-transparente */
}

/* =========================================
   2. RÉINITIALISATION ET STRUCTURE DE BASE
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* =========================================
   3. BARRE DE NAVIGATION
   ========================================= */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--nav-bg);
    padding: 20px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 240, 255, 0.2);
}

.logo { font-size: 24px; font-weight: bold; letter-spacing: 1px; }
.logo span { color: var(--accent); }

.nav-links { display: flex; list-style: none; gap: 30px; }
.nav-links a { color: var(--text-main); text-decoration: none; font-weight: 500; transition: color 0.3s; }
.nav-links a:hover, .nav-links a.active { color: var(--accent); }

/* =========================================
   4. MISE EN PAGE GÉNÉRALE DES SECTIONS
   ========================================= */
.page-content {
    min-height: 100vh;
    padding: 120px 50px 50px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

h1 { font-size: 3.5rem; margin-bottom: 20px; color: var(--text-main); }
h2 { font-size: 2.5rem; margin-bottom: 40px; color: var(--accent); }
p { max-width: 600px; margin-bottom: 30px; font-size: 1.1rem; color: #a0aec0; }

/* =========================================
   5. BOUTONS
   ========================================= */
.btn {
    display: inline-block;
    padding: 12px 30px;
    background: transparent;
    color: var(--accent);
    border: 2px solid var(--accent);
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    text-transform: uppercase;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn:hover {
    background: var(--accent);
    color: var(--bg-main);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.5);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: white;
}

.btn-outline:hover {
    border-color: white;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: none;
    color: white;
}

/* =========================================
   6. PAGE D'ACCUEIL (HÉRO & CARTES)
   ========================================= */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 20px;
    overflow: hidden;
}

.glow-orb {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0, 240, 255, 0.15) 0%, rgba(10, 15, 24, 0) 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
    animation: pulseOrb 6s infinite alternate;
}

@keyframes pulseOrb {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 0.7; }
    100% { transform: translate(-50%, -50%) scale(1.3); opacity: 1; }
}

/* La hauteur minimale est fixée ici pour empêcher le saut */
.hero-content h1 { 
    font-size: 4rem; 
    margin-bottom: 25px; 
    line-height: 1.2; 
    min-height: 160px; 
}
.typewriter { color: var(--accent); }
.cursor { color: var(--accent); font-weight: bold; animation: blinkCursor 0.8s infinite; }

@keyframes blinkCursor {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.hero-buttons { display: flex; gap: 20px; justify-content: center; margin-top: 40px; }

.features-grid {
    display: flex;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
}

.feature-card {
    flex: 1;
    min-width: 300px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 40px;
    border-radius: 12px;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), border-color 0.3s;
    backdrop-filter: blur(5px);
}

.feature-card:hover {
    transform: translateY(-15px);
    border-color: var(--accent);
    background: rgba(0, 240, 255, 0.03);
}

.feature-card .icon { font-size: 3.5rem; margin-bottom: 20px; text-shadow: 0 0 15px rgba(0, 240, 255, 0.3); }
.feature-card h3 { color: white; margin-bottom: 15px; font-size: 1.5rem; }

/* =========================================
   7. PAGE SERVICES
   ========================================= */
.services-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 50px 100px 50px;
    display: flex;
    flex-direction: column;
    gap: 80px;
}

.service-item {
    display: flex;
    align-items: center;
    gap: 50px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 40px;
    transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.service-item:hover {
    border-color: rgba(0, 240, 255, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.service-item.reverse { flex-direction: row-reverse; }

.service-image { flex: 1; border-radius: 8px; overflow: hidden; }
.service-image img { width: 100%; height: auto; display: block; transition: transform 0.5s; }
.service-item:hover .service-image img { transform: scale(1.05); }

.service-text { flex: 1; text-align: left; }
.service-text h3 { font-size: 2rem; color: var(--text-main); margin-bottom: 20px; }
.service-text p { font-size: 1.1rem; color: #a0aec0; margin-bottom: 15px; max-width: 100%; }
.service-text strong { color: var(--accent); }

.achievements {
    margin-top: 20px;
    background: rgba(0, 240, 255, 0.05);
    padding: 20px;
    border-left: 4px solid var(--accent);
    border-radius: 0 8px 8px 0;
}
.achievements h4 { color: white; margin-bottom: 10px; }
.achievements ul { list-style-position: inside; color: #a0aec0; }
.achievements li { margin-bottom: 8px; }

/* =========================================
   8. PAGE CONTACT (Formulaire dynamique)
   ========================================= */
.contact-wrapper {
    display: flex;
    gap: 50px;
    width: 100%;
    max-width: 1000px;
    margin-top: 40px;
    text-align: left;
}

.contact-info-panel { flex: 1; display: flex; flex-direction: column; gap: 30px; }
.info-card {
    background: rgba(255, 255, 255, 0.03);
    border-left: 4px solid var(--accent);
    padding: 30px;
    border-radius: 0 8px 8px 0;
    transition: transform 0.3s, background 0.3s;
}
.info-card:hover { transform: translateX(10px); background: rgba(0, 240, 255, 0.05); }
.info-card .icon { font-size: 2rem; margin-bottom: 15px; }
.info-card h3 { color: white; font-size: 1.2rem; margin-bottom: 5px; }
.info-card a { color: var(--accent); text-decoration: none; font-size: 1.1rem; transition: text-shadow 0.3s; }
.info-card a:hover { text-shadow: 0 0 10px rgba(0, 240, 255, 0.8); }

.contact-form-panel {
    flex: 1.5;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 40px;
    backdrop-filter: blur(10px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
}
.contact-form-panel form { margin: 0; width: 100%; display: flex; flex-direction: column; }

.input-group { position: relative; margin-bottom: 30px; width: 100%; }
.input-group input, .input-group textarea {
    width: 100%;
    padding: 15px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 4px;
    outline: none;
    font-size: 1rem;
    transition: border-color 0.3s;
}
.input-group label {
    position: absolute;
    left: 15px;
    top: 15px;
    color: #a0aec0;
    pointer-events: none;
    transition: 0.3s ease all;
    background: var(--bg-main);
    padding: 0 5px;
}
.input-group input:focus ~ label,
.input-group input:not(:placeholder-shown) ~ label,
.input-group textarea:focus ~ label,
.input-group textarea:not(:placeholder-shown) ~ label {
    top: -10px; left: 10px; font-size: 0.85rem; color: var(--accent);
}
.input-group input:focus, .input-group textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.1);
}

.status-message {
    margin-top: 15px;
    font-weight: bold;
    font-size: 0.9rem;
    opacity: 0;
    transition: opacity 0.5s;
}

/* =========================================
   9. PIED DE PAGE (FOOTER)
   ========================================= */
.site-footer {
    background: linear-gradient(to top, #05080f, var(--bg-main));
    border-top: 1px solid rgba(0, 240, 255, 0.2);
    padding: 80px 50px 20px 50px;
    margin-top: 50px;
    box-shadow: 0 -10px 30px rgba(0, 240, 255, 0.05);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
}

.footer-col { flex: 1; min-width: 250px; }
.footer-col p { font-size: 1rem; color: #a0aec0; margin-top: 15px; margin-bottom: 0; }
.footer-col h4 {
    color: white; font-size: 1.2rem; margin-bottom: 20px;
    position: relative; display: inline-block;
}
.footer-col h4::after {
    content: ''; position: absolute; left: 0; bottom: -8px;
    width: 40px; height: 2px; background-color: var(--accent); transition: width 0.3s;
}
.footer-col:hover h4::after { width: 100%; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 12px; }
.footer-col ul li a, .contact-info a {
    color: #a0aec0; text-decoration: none;
    transition: color 0.3s ease, padding-left 0.3s ease; display: inline-block;
}
.footer-col ul li a:hover { color: var(--accent); padding-left: 8px; }
.contact-info p { display: flex; align-items: center; gap: 10px; }
.contact-info a:hover { color: var(--accent); }
.footer-bottom {
    text-align: center; margin-top: 50px; padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05); font-size: 0.9rem; color: #718096;
}

/* =========================================
   10. ANIMATIONS CSS DE BASE
   ========================================= */
.hidden { opacity: 0; transform: translateY(40px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.show { opacity: 1; transform: translateY(0); }

/* =========================================
   11. RESPONSIVITÉ (CELLULAIRES ET TABLETTES)
   ========================================= */
@media (max-width: 900px) {
    .services-container { padding: 0 20px 50px 20px; }
    .service-item, .service-item.reverse { flex-direction: column; padding: 20px; gap: 30px; }
    .service-text { text-align: center; }
    .achievements { text-align: left; }
    .contact-wrapper { flex-direction: column; }
}

@media (max-width: 768px) {
    nav { flex-direction: column; padding: 15px 20px; gap: 15px; }
    .nav-links { gap: 15px; flex-wrap: wrap; justify-content: center; }
    
    /* La hauteur minimale est ajustée pour les cellulaires */
    .hero-content h1 { font-size: 2.5rem; min-height: 100px; }
    .hero-buttons { flex-direction: column; }
    
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.8rem; }
    .page-content { padding: 140px 20px 50px 20px; }
    
    .site-footer { padding: 60px 20px 20px 20px; }
    .footer-container { flex-direction: column; gap: 40px; }
}

/* =========================================
   12. NOUVELLES SECTIONS (MISSION & ÉTAPES - CORRIGÉ)
   ========================================= */

/* 1. Correction des espaces géants entre les sections */
.section-mission, .section-steps {
    min-height: auto; /* Annule la hauteur de l'écran (100vh) */
    padding-top: 60px;
    padding-bottom: 60px;
    justify-content: flex-start;
}

/* 2. Correction des proportions de la boîte Mission */
.section-mission {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    max-width: 900px;
    margin: 40px auto; /* Centre la boîte */
    padding: 40px; /* Réduit l'espace vide à l'intérieur */
}

.section-mission h2 {
    margin-bottom: 20px; /* Rapproche le titre du texte */
}

.mission-text p {
    font-size: 1.1rem;
    color: var(--text-main);
    margin-bottom: 15px;
    text-align: center;
}

/* 3. Grille des étapes */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    width: 100%;
    max-width: 1200px;
    margin-top: 40px;
}

.step-card {
    background: rgba(255, 255, 255, 0.02);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    text-align: left; /* Aligne proprement tout à gauche */
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.step-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
}

/* 4. Correction du chiffre (il ne chevauchera plus JAMAIS le titre) */
.step-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent);
    opacity: 0.5;
    display: block; /* Pousse le titre vers le bas de façon sécuritaire */
    margin-bottom: 10px;
    line-height: 1;
}

.step-card h3 {
    color: var(--accent);
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.step-card p {
    font-size: 0.95rem;
    color: #a0aec0;
    margin-bottom: 0;
}

/* Ajustements pour les cellulaires */
@media (max-width: 768px) {
    .section-mission { padding: 30px 20px; }
    .section-mission, .section-steps { padding-top: 40px; padding-bottom: 40px; }
}