:root {
    --primary: #6366f1;
    --secondary: #f43f5e;
    --accent: #f59e0b;
    --dark: #1e293b;
    --light: #f8fafc;
}

html {
    scroll-behavior: smooth;
}

body { font-family: 'Poppins', sans-serif; color: var(--dark); overflow-x: hidden; }


#main-container {
    position: relative;
    z-index: 10;
    /* On met le fond des sections suivantes ici pour une transition parfaite */
}

* {
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 300ms;
}

.cursor-dot {
    width: 10px;
    height: 10px;
    background-color: var(--primary);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: difference;
    transform: translate(-50%, -50%);
    transition: transform 0.1s ease;
}

.project-card-logo {
    background-size: contain !important;
    background-repeat: no-repeat;
    background-position: center;
    background-color: white; 
}

@media (max-width: 767px) {
    /* On force l'affichage du panneau d'information */
    .project-card .project-info {
        transform: translateY(0);
        background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, transparent 100%);
    }

    /* On retire l'effet de survol du dégradé, car il est maintenant toujours visible */
    .project-card::before {
        opacity: 0;
    }

    .project-card.project-card-logo {
        /* On remonte le logo (ex: 30% depuis le haut) */
        background-position: center 20%; 
        /* On peut aussi ajuster sa taille pour qu'il ne soit pas trop grand */
    }

}

.dark .project-card-logo {
    background-color: #1a202c;
}

.dark .project-card.project-card-logo {
    background-color: #1a202c; 
}

.cursor-outline {
    width: 30px;
    height: 30px;
    border: 2px solid var(--primary);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9998;
    mix-blend-mode: difference;
    transform: translate(-50%, -50%);
    transition: all 0.2s ease-out;
}

.hover-effect:hover ~ .cursor-outline {
    transform: translate(-50%, -50%) scale(1.5);
    background-color: rgba(99, 102, 241, 0.2);
}

.text-gradient {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

#home {
    min-height: 100vh;
    padding: 0;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* NOUVEAU FOND STYLÉ */
#threejs-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--dark);
    background-image: radial-gradient(ellipse 80% 80% at 50% -20%, rgba(120, 119, 198, 0.3), rgba(255, 255, 255, 0));
    z-index: 1;
}

#home-content-overlay {
    position: relative;
    z-index: 2;
}

/* NOUVEAUX STYLES POUR L'ANIMATION DU TITRE */
.h1-line-mask {
    display: inline-block;
    overflow: hidden;
    padding-bottom: 0.1em;
}
.h1-line {
    display: inline-block;
    transform: translateY(110%);
}

.section {
    min-height: 100vh;
    padding: 6rem 2rem;
    position: relative;
    background-color: var(--light);
}

.card-hover {
    transition: all 0.3s ease;
    transform-style: preserve-3d;
}

.card-hover:hover {
    transform: translateY(-10px) rotateX(5deg);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%); 
    z-index: 3;
}

.bounce-element {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    60% {
        transform: translateY(-10px);
    }
}

.project-card {
    transition: all 0.3s ease;
    background-size: cover;
    background-position: center;
    overflow: hidden;
    position: relative;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover::before {
    opacity: 1;
}

.project-info {
    transform: translateY(100%);
    transition: transform 0.3s ease;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
}

.project-card:hover .project-info {
    transform: translateY(0);
}

.testimonial-card {
    transition: all 0.3s ease;
    transform-style: preserve-3d;
}

.testimonial-card:hover {
    transform: rotateY(10deg);
}

.chat-bubble {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    background-color: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    z-index: 100;
}

.chat-bubble:hover {
    transform: scale(1.1);
    background-color: var(--secondary);
}

.chat-window {
    position: fixed;
    bottom: 5rem;
    right: 2rem;
    width: 350px;
    max-height: 500px;
    background-color: white;
    border-radius: 1rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: scale(0);
    transform-origin: bottom right;
    transition: all 0.3s ease;
    overflow: hidden;
    z-index: 99;
}

.chat-window.active {
    transform: scale(1);
}

.chat-header {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-messages {
    padding: 1rem;
    height: 350px;
    overflow-y: auto;
}

.chat-input {
    display: flex;
    padding: 1rem;
    border-top: 1px solid #e2e8f0;
}

.message {
    margin-bottom: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 1rem;
    max-width: 80%;
}

.bot-message {
    background-color: #f1f5f9;
    align-self: flex-start;
}

.user-message {
    background-color: var(--primary);
    color: white;
    align-self: flex-end;
    margin-left: auto;
}

.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    z-index: 1000;
    transition: width 0.1s ease;
}