/* --- VARIABLES CSS --- */
:root {
    --primary-color: #00f2ff; /* Cyan néon */
    --secondary-color: #7000ff; /* Violet profond */
    --bg-dark: #050505;
    --bg-card: rgba(20, 20, 30, 0.6);
    --text-main: #ffffff;
    --text-muted: #a0a0b0;
    --font-main: 'Space Grotesk', sans-serif;
    --gradient-main: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    --transition-speed: 0.3s;
    --spacing-section: 100px;
}

/* --- RESET & BASE --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.6;
}

a { text-decoration: none; color: inherit; transition: var(--transition-speed); }
ul { list-style: none; }

/* --- ANIMATION FOND (CANVAS) --- */
#neural-network {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.4;
}

/* --- HEADER --- */
header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 12px 18px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    border: 1px solid transparent;
    background-clip: padding-box;
    position: relative;
    box-shadow:
            0 15px 35px rgba(0, 0, 0, 0.4),
            0 0 0 1px rgba(0, 242, 255, 0.1) inset;
    backdrop-filter: blur(15px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.1);
    animation: logo-pulse 4s infinite ease-in-out;
}

.logo::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(0, 242, 255, 0.4), rgba(112, 0, 255, 0.2), rgba(0, 242, 255, 0.1));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    z-index: -1;
}

.logo:hover {
    transform: translateY(-2px);
    box-shadow:
            0 20px 40px rgba(0, 0, 0, 0.5),
            0 0 0 1px rgba(0, 242, 255, 0.2) inset,
            0 0 30px rgba(0, 242, 255, 0.15);
}

.logo .mark {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: radial-gradient(circle at 30% 30%, rgba(0, 242, 255, 0.3), rgba(112, 0, 255, 0.15) 70%, transparent 100%);
    border: 1px solid rgba(0, 242, 255, 0.25);
    box-shadow:
            0 0 30px rgba(0, 242, 255, 0.25),
            0 0 60px rgba(112, 0, 255, 0.1),
            0 0 0 1px rgba(255,255,255,0.08) inset;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
}

.logo .mark::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(transparent, rgba(0, 242, 255, 0.3), transparent 30%);
    animation: rotate 4s linear infinite;
}

.logo .mark svg {
    width: 26px;
    height: 26px;
    fill: none;
    stroke: rgba(255,255,255,0.98);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 0 10px rgba(0, 242, 255, 0.5));
    z-index: 1;
    position: relative;
    transition: all 0.3s ease;
}

.logo:hover .mark {
    transform: rotate(5deg) scale(1.05);
    box-shadow:
            0 0 40px rgba(0, 242, 255, 0.4),
            0 0 80px rgba(112, 0, 255, 0.2),
            0 0 0 1px rgba(255,255,255,0.1) inset;
}

.logo:hover .mark svg {
    stroke: #ffffff;
    filter: drop-shadow(0 0 15px rgba(0, 242, 255, 0.8));
}

.logo .brand {
    display: flex;
    flex-direction: column;
    line-height: 1.05;
    position: relative;
}

.logo .brand-name {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    background: linear-gradient(135deg, #ffffff 0%, var(--primary-color) 50%, #ffffff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% auto;
    animation: text-shine 3s infinite linear;
    text-shadow: 0 0 20px rgba(0, 242, 255, 0.3);
}

.logo .brand-tagline {
    margin-top: 3px;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    font-weight: 500;
    position: relative;
    padding-left: 10px;
}

.logo .brand-tagline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--primary-color);
}

.logo:focus-visible {
    outline: 2px solid rgba(0, 242, 255, 0.8);
    outline-offset: 4px;
}

@keyframes logo-pulse {
    0%, 100% { box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(0, 242, 255, 0.1) inset; }
    50% { box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0, 242, 255, 0.2) inset, 0 0 30px rgba(0, 242, 255, 0.1); }
}

@keyframes rotate {
    100% { transform: rotate(360deg); }
}

@keyframes text-shine {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

nav ul {
    display: flex;
    gap: 30px;
}

nav a {
    font-weight: 500;
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition-speed);
}

nav a:hover::after { width: 100%; }

.btn-contact {
    padding: 10px 25px;
    border: 1px solid var(--primary-color);
    border-radius: 50px;
    color: var(--primary-color);
    font-weight: 600;
}

.btn-contact:hover {
    background: var(--primary-color);
    color: var(--bg-dark);
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.4);
}

/* --- HERO SECTION --- */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 20px;
    position: relative;
}

.hero-content {
    max-width: 800px;
    z-index: 1;
}

.badge {
    display: inline-block;
    padding: 5px 15px;
    background: rgba(0, 242, 255, 0.1);
    border: 1px solid rgba(0, 242, 255, 0.3);
    border-radius: 20px;
    color: var(--primary-color);
    font-size: 0.9rem;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 20px;
    background: linear-gradient(to right, #fff, #a0a0b0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

h1 span {
    color: var(--primary-color);
    -webkit-text-fill-color: var(--primary-color);
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 40px;
}

.cta-group {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.btn-primary {
    padding: 15px 35px;
    background: var(--gradient-main);
    border: none;
    border-radius: 5px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
    transition: transform 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(112, 0, 255, 0.4);
}

/* --- SERVICES SECTION --- */
section {
    padding: var(--spacing-section) 5%;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

/* Shine Title Effect */
.shine-title {
    background: linear-gradient(135deg, #ffffff 0%, var(--primary-color) 50%, #ffffff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% auto;
    animation: text-shine 3s infinite linear;
    text-shadow: 0 0 20px rgba(0, 242, 255, 0.3);
}

.section-header .line {
    width: 60px;
    height: 4px;
    background: var(--gradient-main);
    margin: 0 auto;
}

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

.card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 40px 30px;
    border-radius: 15px;
    transition: var(--transition-speed);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient-main);
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition-speed);
}

.card:hover {
    transform: translateY(-10px);
    background: rgba(30, 30, 45, 0.8);
}

.card:hover::before {
    transform: scaleX(1);
}

.icon-box {
    margin-bottom: 20px;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 242, 255, 0.05);
    width: 70px;
    height: 70px;
    border-radius: 12px;
    transition: var(--transition-speed);
}

.card:hover .icon-box {
    background: var(--primary-color);
}

.card:hover .icon-box svg {
    fill: var(--bg-dark);
}

.icon-box svg {
    width: 36px;
    height: 36px;
    fill: var(--primary-color);
    transition: var(--transition-speed);
}

.card h3 {
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* --- STATS / ABOUT --- */
.stats-container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    background: rgba(255,255,255,0.03);
    padding: 50px;
    border-radius: 20px;
    margin-top: 50px;
    text-align: center;
}

.stat-item h4 {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.stat-item p {
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.8rem;
}

/* --- CONTACT FORM --- */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-info h3 { margin-bottom: 20px; font-size: 1.8rem; }
.contact-info p { margin-bottom: 30px; color: var(--text-muted); }

.info-row {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    gap: 15px;
    color: var(--text-muted);
}

.info-icon {
    width: 24px;
    height: 24px;
    fill: var(--primary-color);
}

.form-group { margin-bottom: 20px; }

input, textarea {
    width: 100%;
    padding: 15px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
    border-radius: 5px;
    font-family: var(--font-main);
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* --- FOOTER --- */
footer {
    border-top: 1px solid rgba(255,255,255,0.05);
    padding: 50px 5%;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* --- IA ASSISTANT STYLES --- */
.ai-assistant {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
}

.ai-assistant-btn {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--gradient-main);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
            0 0 20px rgba(0, 242, 255, 0.5),
            0 5px 30px rgba(112, 0, 255, 0.3);
    transition: all 0.3s ease;
    position: relative;
    animation: float 3s ease-in-out infinite;
}

.ai-assistant-btn:hover {
    transform: scale(1.1);
    box-shadow:
            0 0 30px rgba(0, 242, 255, 0.7),
            0 8px 40px rgba(112, 0, 255, 0.5);
}

.ai-assistant-btn .ai-icon {
    width: 32px;
    height: 32px;
    fill: white;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.5));
}

.pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--primary-color);
    opacity: 0.3;
    animation: pulse 2s infinite;
}

.ai-chat-window {
    position: absolute;
    bottom: 90px;
    right: 0;
    width: 380px;
    background: var(--bg-card);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    border: 1px solid rgba(0, 242, 255, 0.2);
    box-shadow:
            0 20px 60px rgba(0, 0, 0, 0.5),
            0 0 0 1px rgba(0, 242, 255, 0.1) inset;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px) scale(0.9);
    transition: all 0.3s ease;
    pointer-events: none;
}

.ai-chat-window.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

.ai-chat-header {
    padding: 20px;
    background: rgba(0, 0, 0, 0.4);
    border-bottom: 1px solid rgba(0, 242, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ai-header-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.ai-avatar {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: rgba(0, 242, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0, 242, 255, 0.3);
}

.ai-avatar svg {
    width: 28px;
    height: 28px;
    fill: none;
    stroke: var(--primary-color);
    stroke-width: 1.5;
}

.ai-header-text h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    background: linear-gradient(to right, #fff, var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.ai-status {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.ai-close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.8rem;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.ai-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--primary-color);
}

.ai-chat-body {
    height: 350px;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.ai-message {
    max-width: 85%;
    padding: 15px;
    border-radius: 18px;
    position: relative;
}

.ai-bot-message {
    background: rgba(0, 242, 255, 0.1);
    border: 1px solid rgba(0, 242, 255, 0.2);
    align-self: flex-start;
    border-bottom-left-radius: 5px;
}

.ai-user-message {
    background: rgba(112, 0, 255, 0.1);
    border: 1px solid rgba(112, 0, 255, 0.2);
    align-self: flex-end;
    border-bottom-right-radius: 5px;
}

.message-content p {
    margin-bottom: 8px;
    font-size: 0.95rem;
    line-height: 1.4;
}

.message-time {
    font-size: 0.7rem;
    color: var(--text-muted);
    display: block;
    text-align: right;
}

.quick-questions {
    margin-top: 10px;
}

.quick-title {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.quick-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.quick-btn {
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    color: var(--text-main);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.quick-btn:hover {
    background: rgba(0, 242, 255, 0.1);
    border-color: rgba(0, 242, 255, 0.3);
}

.ai-chat-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.ai-input-container {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

#aiUserInput {
    flex: 1;
    padding: 12px 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    color: white;
    font-family: var(--font-main);
}

#aiUserInput:focus {
    outline: none;
    border-color: var(--primary-color);
}

.ai-send-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient-main);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.ai-send-btn:hover {
    transform: scale(1.05);
}

.ai-send-btn svg {
    width: 22px;
    height: 22px;
    fill: white;
}

.ai-disclaimer {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-align: center;
    opacity: 0.7;
}

/* Animations */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.1); opacity: 0.1; }
    100% { transform: scale(1); opacity: 0.3; }
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    .contact-layout { grid-template-columns: 1fr; }
    nav ul { display: none; }
    .logo {
        padding: 10px 14px;
        border-radius: 14px;
        gap: 10px;
    }
    .logo .mark {
        width: 38px;
        height: 38px;
        border-radius: 10px;
    }
    .logo .mark svg {
        width: 22px;
        height: 22px;
    }
    .logo .brand-name {
        font-size: 0.95rem;
        letter-spacing: 0.12em;
    }
    .logo .brand-tagline {
        font-size: 0.7rem;
        padding-left: 8px;
    }
    .logo .brand-tagline::before {
        width: 3px;
        height: 3px;
    }
    .stats-container { gap: 30px; }

    /* Responsive AI Assistant */
    .ai-assistant {
        bottom: 20px;
        right: 20px;
    }

    .ai-assistant-btn {
        width: 60px;
        height: 60px;
    }

    .ai-chat-window {
        width: calc(100vw - 40px);
        right: -10px;
        bottom: 80px;
    }
}