/* --- VARIABLES & RESET --- */
:root {
    --color-bg: #051a26;
    --color-bg-dark: #020d13;
    --color-primary: #EE6352;
    --color-text: #ffffff;
    /* Couleur éclaircie pour passer le contraste WCAG AA sur fond sombre */
    --color-text-muted: #cddbe5; 
    --glass-border: rgba(255, 255, 255, 0.1);
    --font-main: 'Montserrat', sans-serif;
    --font-code: 'Courier Prime', 'Courier New', monospace;
    --border-radius-btn: 6px;
    --transition: all 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
    font-family: var(--font-main);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
}
a { text-decoration: none; color: inherit; transition: var(--transition); }
ul { list-style: none; }

/* --- UTILITIES --- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.subtitle-text { color: var(--color-text-muted); max-width: 600px; margin: 0 auto; text-align: center; }
.small-note { font-size: 0.85rem; opacity: 0.8; display: block; margin-top: 5px; }

.text-gradient {
    font-weight: 500; 
    background: linear-gradient(90deg, #fff, var(--color-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    /* Fallback pour navigateurs anciens */
    color: var(--color-primary); 
}

/* --- NAVBAR --- */
.navbar {
    position: fixed; top: 0; width: 100%; padding: 25px 0;
    background: transparent; border-bottom: 1px solid transparent;
    z-index: 1000; transition: all 0.4s ease;
}
.navbar.scrolled {
    background: rgba(5, 26, 38, 0.98);
    border-bottom: 1px solid var(--glass-border);
    padding: 15px 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
.nav-container { display: flex; justify-content: space-between; align-items: center; }

/* --- LOGO --- */
.logo {
    font-size: 1.8rem; font-weight: 300; letter-spacing: 2px;
    display: flex; align-items: center; text-transform: uppercase; color: #fff;
    transition: var(--transition); white-space: nowrap;
}
.logo span { color: var(--color-primary); }
.logo-icon { font-size: 1.6rem !important; margin: 0 2px; position: relative; top: -1px; }

/* --- LINKS --- */
.nav-links { display: flex; gap: 30px; align-items: center; }
.nav-links a { font-size: 0.9rem; font-weight: 500; text-transform: uppercase; letter-spacing: 1px; }
.nav-links a:not(.btn-contact):hover { color: var(--color-primary); }
.btn-contact {
    border: 1px solid var(--color-primary); padding: 10px 25px;
    border-radius: var(--border-radius-btn); color: var(--color-primary) !important;
    font-weight: 600; transition: var(--transition); white-space: nowrap;
}
.btn-contact:hover { background: var(--color-primary); color: #fff !important; }

/* --- HERO --- */
.hero {
    min-height: 100vh; /* Utilisation de min-height pour éviter les coupures sur petits écrans */
    display: flex; align-items: center; justify-content: center;
    text-align: center; position: relative;
    padding-top: 80px; /* Espace pour la navbar */
    background-color: var(--color-bg);
    background-image: linear-gradient(rgba(238, 99, 82, 0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(238, 99, 82, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    box-shadow: inset 0 0 150px rgba(0,0,0,0.9);
}
.hero-content { position: relative; z-index: 2; max-width: 850px; width: 100%; }
.hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem); /* Taille de police fluide */
    line-height: 1.2; margin-bottom: 25px;
    font-weight: 300; letter-spacing: -0.5px;
}
.hero-subtitle {
    font-size: 1.1rem; color: var(--color-text-muted); margin-bottom: 40px;
    font-weight: 300; max-width: 600px; margin-left: auto; margin-right: auto;
}

/* --- BOUTONS --- */
.hero-buttons { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; }
.btn {
    padding: 14px 30px; border-radius: var(--border-radius-btn); font-weight: 600;
    text-transform: uppercase; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    cursor: pointer; font-size: 0.9rem; letter-spacing: 0.5px; transition: var(--transition);
    min-height: 48px; /* Accessible touch target */
}
.btn-emergency {
    background-color: rgba(238, 99, 82, 0.05); color: var(--color-primary);
    border: 1px solid var(--color-primary);
    box-shadow: 0 0 15px rgba(238, 99, 82, 0.15);
    animation: breathe 4s infinite ease-in-out;
}
.btn-emergency:hover {
    background-color: rgba(238, 99, 82, 0.15);
    box-shadow: 0 0 25px rgba(238, 99, 82, 0.3);
    transform: translateY(-1px);
}
.btn-outline {
    border: 1px solid rgba(255,255,255,0.2); background: transparent; color: #fff;
}
.btn-outline:hover { border-color: #fff; background: rgba(255,255,255,0.05); }

/* --- SECTIONS COMMUNES --- */
.section-header { text-align: center; margin-bottom: 60px; }
.section-header h2 { font-size: 2.2rem; margin-bottom: 15px; font-weight: 300; text-transform: uppercase; letter-spacing: 1px; }
.divider { width: 50px; height: 3px; background: var(--color-primary); margin: 0 auto 20px; }

/* --- TERMINAL --- */
.war-story-section { padding: 100px 0; background: linear-gradient(to bottom, var(--color-bg-dark), var(--color-bg)); }
.terminal-window {
    background: #0c0c0c; border: 1px solid #333; border-radius: 8px;
    max-width: 800px; margin: 0 auto; box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    font-family: var(--font-code); overflow: hidden;
}
.terminal-header {
    background: #1a1a1a; padding: 10px 15px; border-bottom: 1px solid #333;
    display: flex; gap: 8px; align-items: center;
}
.terminal-dot { width: 12px; height: 12px; border-radius: 50%; }
.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }
.terminal-title { font-size: 0.8rem; color: #888; margin-left: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.terminal-body { padding: 25px; color: #d4d4d4; font-size: 0.9rem; overflow-x: auto; } /* Scroll horizontal si besoin */
.terminal-row { margin-bottom: 15px; border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 15px; }
.header-row { border-bottom: 1px dashed #333; color: #888; font-size: 0.8rem; font-weight: bold; }

/* Grid pour le terminal (plus propre que des margins) */
.terminal-row { display: grid; grid-template-columns: 60px 100px 1fr auto; gap: 10px; align-items: baseline; }
.t-details { grid-column: 2 / -1; color: #b0c4d1; font-size: 0.85rem; margin-top: 5px; }
.t-id { color: #666; }
.t-sector { color: #fff; }
.t-threat { font-weight: bold; }
.t-threat.crit { color: #ff5f56; }
.t-threat.high { color: #ffbd2e; }
.t-threat.med { color: #42a5f5; }
.t-success { color: #27c93f; }
.terminal-footer { text-align: right; font-size: 0.8rem; color: #666; margin-top: 20px; border-top: 1px solid #333; padding-top: 10px; }

/* --- TIMELINE --- */
.timeline-section { padding: 100px 0; background: var(--color-bg); }
.timeline-container {
    display: flex; justify-content: space-between; align-items: flex-start;
    position: relative; margin-top: 50px; flex-wrap: wrap; gap: 20px;
}
/* Ligne horizontale desktop */
.timeline-container::before {
    content: ''; position: absolute; top: 25px; left: 0; right: 0;
    height: 2px; background: rgba(255,255,255,0.1); z-index: 0;
}
.timeline-step { position: relative; z-index: 1; width: 18%; text-align: center; }
.step-marker {
    width: 50px; height: 50px; margin: 0 auto 20px;
    background: var(--color-bg); border: 1px solid var(--color-primary);
    color: var(--color-primary); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-family: var(--font-code);
    transition: var(--transition);
}
.timeline-step:hover .step-marker {
    background: var(--color-primary); color: #fff; box-shadow: 0 0 15px rgba(238,99,82,0.4);
}
.step-title { font-size: 1rem; font-weight: 600; margin-bottom: 10px; color: #fff; }
.step-desc { font-size: 0.85rem; color: var(--color-text-muted); line-height: 1.4; }

/* --- PRICING --- */
.pricing-section { padding: 100px 0; background: var(--color-bg-dark); }
.pricing-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px; margin-top: 50px;
}
.pricing-card {
    background: rgba(255, 255, 255, 0.03); border: 1px solid var(--glass-border);
    border-radius: 12px; padding: 40px 30px; transition: var(--transition);
    position: relative; display: flex; flex-direction: column; height: 100%;
}
.pricing-card:hover {
    transform: translateY(-5px); border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
}
.pricing-card.featured {
    background: linear-gradient(145deg, rgba(238, 99, 82, 0.08), rgba(5, 26, 38, 0.8));
    border: 1px solid var(--color-primary);
    box-shadow: 0 0 30px rgba(238, 99, 82, 0.15);
    transform: scale(1.05); z-index: 2;
}
.popular-badge {
    position: absolute; top: -15px; left: 50%; transform: translateX(-50%);
    background: var(--color-primary); color: white;
    padding: 5px 15px; border-radius: 50px; font-size: 0.75rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 1px; box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}
.pricing-header { text-align: center; margin-bottom: 30px; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 20px; }
.pricing-title { font-size: 1.5rem; color: #fff; margin-bottom: 10px; font-weight: 600; }
.pricing-desc { color: var(--color-text-muted); font-size: 0.9rem; font-weight: 300; min-height: 45px; }
.pricing-features { list-style: none; margin-bottom: 30px; flex-grow: 1; }
.pricing-features li {
    display: flex; align-items: flex-start; gap: 10px;
    color: #d0d0d0; margin-bottom: 15px; font-size: 0.95rem; font-weight: 300;
}
.pricing-features li .material-symbols-outlined { color: var(--color-primary); font-size: 1.2rem; flex-shrink: 0; }
.btn-full { width: 100%; text-align: center; }

/* --- SERVICES --- */
.services-section { padding: 120px 0; background: var(--color-bg-dark); }
.grid-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 60px 40px; }
.feature-item { display: flex; align-items: flex-start; gap: 20px; }
.feature-icon {
    min-width: 55px; height: 55px; background: rgba(238, 99, 82, 0.05); color: var(--color-primary);
    display: flex; align-items: center; justify-content: center; border-radius: var(--border-radius-btn);
    border: 1px solid rgba(238, 99, 82, 0.15);
}
.feature-icon span { font-size: 28px !important; }
.feature-content h3 { font-size: 1.1rem; font-weight: 600; color: #fff; margin-bottom: 10px; text-transform: uppercase; letter-spacing: 1px; }
.feature-content p { color: var(--color-text-muted); font-size: 0.95rem; line-height: 1.6; font-weight: 300; }

/* --- FOOTER --- */
footer { padding: 60px 0; background: #01080c; border-top: 1px solid var(--glass-border); text-align: center; }
.footer-logo-fix { justify-content: center; margin-bottom: 25px; }
.footer-links { display: flex; justify-content: center; gap: 30px; margin-bottom: 30px; flex-wrap: wrap; }
.footer-links a { color: var(--color-text-muted); font-size: 0.9rem; }
.footer-links a:hover { color: var(--color-primary); }
.copyright { color: #444; font-size: 0.85rem; }

/* --- BUTTON UP --- */
#backToTop {
    position: fixed; bottom: 30px; right: 30px;
    background: rgba(5, 26, 38, 0.8); backdrop-filter: blur(5px);
    color: var(--color-primary); border: 1px solid var(--color-primary);
    width: 45px; height: 45px; border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    z-index: 999; opacity: 0; visibility: hidden;
    transition: all 0.3s ease; cursor: pointer;
}
#backToTop.show { opacity: 1; visibility: visible; }

/* --- ANIMATIONS --- */
@keyframes breathe {
    0% { box-shadow: 0 0 0 rgba(238, 99, 82, 0.1); border-color: rgba(238, 99, 82, 0.6); }
    50% { box-shadow: 0 0 15px rgba(238, 99, 82, 0.3); border-color: rgba(238, 99, 82, 1); }
    100% { box-shadow: 0 0 0 rgba(238, 99, 82, 0.1); border-color: rgba(238, 99, 82, 0.6); }
}
.console-line {
    font-family: var(--font-code); color: var(--color-primary); font-size: 1rem;
    margin-bottom: 15px; display: inline-block; border-right: 2px solid var(--color-primary);
    white-space: nowrap; overflow: hidden; width: 0;
    animation: typing 3.5s steps(40, end) forwards, blink-caret 0.75s step-end infinite;
}
@keyframes typing { from { width: 0; } to { width: 100%; } }
@keyframes blink-caret { from, to { border-color: transparent; } 50% { border-color: var(--color-primary); } }

/* --- RESPONSIVE MOBILE --- */
@media (max-width: 1024px) {
    .pricing-card.featured { transform: scale(1); }
    .pricing-card.featured:hover { transform: translateY(-5px); }
}

@media (max-width: 768px) {
    .container { padding: 0 20px; }
    .hide-mobile { display: none !important; }
    
    /* Nav & Hero */
    .logo { font-size: 1.4rem; }
    .hero-buttons { flex-direction: column; width: 100%; }
    .btn { width: 100%; }
    .console-line { white-space: normal; animation: none; border: none; width: auto; text-align: center; }

    /* Timeline Mobile Fix */
    .timeline-container { flex-direction: column; padding-left: 0; gap: 0; }
    .timeline-container::before {
        /* Ligne verticale */
        left: 24px; width: 2px; height: 100%; top: 0; right: auto;
    }
    .timeline-step {
        width: 100%; display: flex; align-items: flex-start; gap: 20px;
        margin-bottom: 40px; text-align: left;
    }
    .step-marker { margin: 0; flex-shrink: 0; z-index: 2; background: var(--color-bg); } /* Z-index pour passer au dessus de la ligne */
    
    /* Terminal Mobile Fix */
    .terminal-row { display: block; }
    .terminal-row span { display: inline-block; margin-right: 10px; margin-bottom: 5px; }
    .header-row { display: none; } /* On cache les en-têtes de colonnes sur mobile */
    .t-details { margin-left: 0; padding-left: 10px; border-left: 2px solid #333; margin-top: 10px; }
    
    /* Services & Pricing */
    .grid-features { grid-template-columns: 1fr; }
    .feature-item { flex-direction: column; }
}