/* ===== CONFIGURATION ===== */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
    --background: #080810;
    --card: #12121f;
    --purple: #8b5cf6;
    --purple-light: #a78bfa;
    --text: #ffffff;
    --muted: #a1a1b5;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--background);
    color: var(--text);
    font-family: 'DM Sans', sans-serif;
    overflow-x: hidden;
}

h1, h2, h3 {
    font-family: 'Outfit', sans-serif;
}

/* ===== NAVIGATION ===== */

.navbar {
    width: 100%;
    height: 95px;
    padding: 0 8%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(8, 8, 16, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    padding: 0;
}

.logo img {
    height: 80px;
    width: auto;
    max-width: 300px;
    object-fit: contain;
}

.navbar nav {
    display: flex;
    align-items: center;
    gap: 35px;
}

.navbar nav a {
    text-decoration: none;
    color: #ddd;
    font-size: 14px;
    font-weight: 600;
    transition: 0.3s;
}

.navbar nav a:hover {
    color: var(--purple-light);
}

.navbar .nav-button {
    background: var(--purple);
    color: white;
    padding: 12px 22px;
    border-radius: 9px;
}

.navbar .nav-button:hover {
    background: #7043e8;
    color: white;
}

/* ===== ACCUEIL ===== */

.hero {
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 100px 8%;
    position: relative;
    overflow: hidden;
}

/* Lumière violette derrière le titre */

.hero::before {
    content: "";
    position: absolute;
    width: 700px;
    height: 500px;
    background: radial-gradient(
        ellipse,
        rgba(124, 58, 237, 0.25),
        transparent 70%
    );
    top: 5%;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 950px;
    animation: fadeUp 1s ease;
}

.badge {
    display: inline-block;
    color: var(--purple-light);
    border: 1px solid rgba(139, 92, 246, 0.35);
    background: rgba(139, 92, 246, 0.08);
    padding: 11px 22px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 35px;
}

.hero h1 {
    font-size: clamp(42px, 6vw, 82px);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -2px;
    margin-bottom: 30px;
}

.hero h1 span {
    display: block;
    background: linear-gradient(
        90deg,
        #a78bfa,
        #7c3aed,
        #c4b5fd
    );
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

.hero p {
    max-width: 650px;
    margin: 0 auto 40px;
    font-size: 18px;
    color: var(--muted);
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 18px;
}

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

.btn-primary,
.btn-secondary {
    display: inline-block;
    padding: 16px 28px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    transition: 0.3s ease;
}

.btn-primary {
    color: white;
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    box-shadow: 0 8px 30px rgba(139, 92, 246, 0.2);
}

.btn-primary:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(139, 92, 246, 0.4);
}

.btn-secondary {
    color: white;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.03);
}

.btn-secondary:hover {
    border-color: var(--purple);
    background: rgba(139, 92, 246, 0.1);
    transform: translateY(-4px);
}

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

.section {
    padding: 110px 8%;
    text-align: center;
    scroll-margin-top: 95px;
}

.section h2 {
    font-size: clamp(30px, 4vw, 48px);
    font-weight: 700;
    margin-bottom: 20px;
}

.section-description {
    color: var(--muted);
    font-size: 17px;
    margin-bottom: 60px;
}

/* ===== CARTES ===== */

.cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 30px;
    max-width: 1050px;
    margin: auto;
}

.card {
    background: linear-gradient(
        145deg,
        #171725,
        #10101b
    );
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 22px;
    padding: 45px;
    text-align: left;
    position: relative;
    transition: 0.4s;
}

.card:hover {
    transform: translateY(-8px);
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.card h3 {
    font-size: 27px;
    margin-bottom: 20px;
}

.price {
    font-size: 52px;
    font-weight: 800;
    color: white;
    margin-bottom: 5px;
}

.card p {
    color: var(--muted);
    margin-bottom: 30px;
}

.card ul {
    list-style: none;
    margin-bottom: 35px;
}

.card li {
    padding: 12px 0;
    color: #ddd;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.card .btn-primary {
    text-align: center;
    width: 100%;
}

.featured {
    border: 1px solid var(--purple);
    box-shadow: 0 0 45px rgba(139, 92, 246, 0.08);
}

.popular {
    display: inline-block;
    background: var(--purple);
    color: white;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    padding: 9px 15px;
    border-radius: 30px;
    margin-bottom: 20px;
}

/* ===== RÉALISATIONS ===== */

#realisations {
    background: #0c0c16;
}

.project {
    min-height: 230px;
}

.project .btn-secondary {
    margin-top: 10px;
}

/* ===== CONTACT ===== */

.contact {
    background: radial-gradient(
        ellipse at center,
        rgba(109, 40, 217, 0.15),
        transparent 70%
    );
}

.contact p {
    color: var(--muted);
    margin-bottom: 35px;
    font-size: 18px;
}

/* ===== FOOTER ===== */

footer {
    padding: 35px 8%;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

/* ===== ANIMATIONS ===== */

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(35px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== VERSION MOBILE ===== */

@media (max-width: 768px) {

    .navbar {
        height: auto;
        min-height: 85px;
        padding: 15px 5%;
        flex-direction: column;
        gap: 18px;
    }

    .logo img {
        height: 45px;
    }

    .navbar nav {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 15px;
    }

    .navbar nav a {
        font-size: 12px;
    }

    .navbar .nav-button {
        padding: 9px 13px;
    }

    .hero {
        min-height: 75vh;
        padding: 90px 6%;
    }

    .hero h1 {
        letter-spacing: -1px;
    }

    .hero p {
        font-size: 16px;
    }

    .section {
        padding: 75px 6%;
        scroll-margin-top: 150px;
    }

    .cards {
        grid-template-columns: 1fr;
    }

    .card {
        padding: 30px;
    }

    .price {
        font-size: 44px;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .hero-buttons a {
        width: 100%;
        max-width: 300px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* SÉPARATION DES CONTACTS */

.contact-separator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    max-width: 350px;
    margin: 35px auto 25px;
}

.contact-separator::before,
.contact-separator::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(139, 92, 246, 0.5)
    );
}

.contact-separator::after {
    transform: rotate(180deg);
}

.contact-separator span {
    color: #a78bfa;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 3px;
}

/* ESPACEMENT DU NUMÉRO */

.contact-phone {
    margin-top: 0;
}

/* =====================================
   PAGE DEVIS - ASSISTANT IA
===================================== */

.devis-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.devis-main {
    flex: 1;
    width: 100%;
    padding: 55px 6% 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    background:
        radial-gradient(
            ellipse at 50% 20%,
            rgba(139, 92, 246, 0.13),
            transparent 65%
        );
}

.devis-heading {
    text-align: center;
    margin-bottom: 30px;
}

.devis-heading .badge {
    margin-bottom: 20px;
}

.devis-heading h1 {
    font-size: clamp(32px, 4vw, 48px);
    margin-bottom: 12px;
}

.devis-heading h1 span {
    color: #a78bfa;
}

.devis-heading p {
    color: #a1a1b5;
    font-size: 15px;
    line-height: 1.7;
}

/* FENÊTRE DE DISCUSSION */

.chat-container {
    width: 100%;
    max-width: 950px;
    height: 570px;
    display: flex;
    flex-direction: column;
    background: #11111d;
    border: 1px solid rgba(139, 92, 246, 0.25);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 70px rgba(0, 0, 0, 0.3);
}

/* EN-TÊTE DU CHAT */

.chat-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px 25px;
    background: #171725;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.chat-avatar {
    width: 45px;
    height: 45px;
    border-radius: 14px;
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
}

.chat-header-info {
    flex: 1;
}

.chat-header-info h2 {
    font-size: 16px;
    margin-bottom: 5px;
}

.chat-header-info span {
    color: #a1a1b5;
    font-size: 12px;
}

.chat-status {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 12px rgba(34, 197, 94, 0.5);
}

/* MESSAGES */

.chat-messages {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.chat-message {
    display: flex;
    max-width: 80%;
}

.chat-message.bot {
    align-self: flex-start;
}

.chat-message.user {
    align-self: flex-end;
}

.message-content {
    padding: 15px 20px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.7;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.chat-message.bot .message-content {
    background: #202033;
    color: #f1f1f5;
    border-bottom-left-radius: 4px;
}

.chat-message.user .message-content {
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    color: white;
    border-bottom-right-radius: 4px;
}

/* ZONE DE SAISIE */

.chat-input-area {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: #171725;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.chat-input-area input {
    flex: 1;
    min-width: 0;
    background: #10101b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px 20px;
    color: white;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: 0.3s;
}

.chat-input-area input:focus {
    border-color: #8b5cf6;
}

.chat-input-area button {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    color: white;
    font-size: 20px;
    cursor: pointer;
    transition: 0.3s;
}

.chat-input-area button:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(139, 92, 246, 0.3);
}

.chat-disclaimer {
    margin-top: 18px;
    color: #77778e;
    font-size: 12px;
    text-align: center;
}

/* VERSION MOBILE */

@media (max-width: 768px) {

    .devis-main {
        padding: 35px 4% 25px;
    }

    .devis-heading {
        margin-bottom: 25px;
    }

    .devis-heading p {
        font-size: 14px;
    }

    .chat-container {
        height: 65vh;
        min-height: 400px;
    }

    .chat-header {
        padding: 15px;
    }

    .chat-header-info h2 {
        font-size: 13px;
    }

    .chat-messages {
        padding: 15px;
    }

    .chat-message {
        max-width: 92%;
    }

    .chat-input-area {
        padding: 12px;
        gap: 10px;
    }

    .chat-input-area input {
        padding: 14px;
    }
}