:root {
    --primary-color: #FF6600; /* Orange du logo */
    --hover-color: #FF8800;
    --dark-bg: #101014;       /* Fond très sombre */
    --card-bg: #1a1a24;
    --text-main: #f0f0f0;
    --text-muted: #a0a0b0;
    --gradient-orange: linear-gradient(135deg, #FF6600 0%, #ff8c00 100%);
    --font-heading: 'Exo 2', sans-serif;
    --font-body: system-ui, -apple-system, sans-serif;
    --border-color: #333340;
}

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

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

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
}

.text-orange {
    color: var(--primary-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: rgba(16, 16, 20, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo a {
    text-decoration: none;
    color: var(--text-main);
}

.logo h1 {
    font-size: 28px;
    font-style: italic; /* correspond à la typographie du logo */
    letter-spacing: -0.5px;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

.main-nav a {
    text-decoration: none;
    color: var(--text-main);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 15px;
    transition: color 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.main-nav a:hover, .main-nav a.active {
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: radial-gradient(circle at center, #1b1b24 0%, #101014 70%);
    padding-top: 80px; /* Offset for header */
    position: relative; /* Pour positionner l'arrière-plan animé */
    overflow: hidden;
}

/* Animation SVG Arrière-plan */
.hero-bg-animation {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    opacity: 0.2; /* Très subtil en fond */
    z-index: 0; /* Derrière le texte */
    pointer-events: none;
}

.cube-drawing {
    width: 100%;
    height: 100%;
}

/* Configuration de l'animation de dessin (Stroke Dash) */
.draw-line {
    stroke-dasharray: 400;
    stroke-dashoffset: 400;
    animation: drawPath 4s cubic-bezier(0.4, 0.0, 0.2, 1) forwards infinite alternate;
}

/* Décalage des animations pour créer un effet de construction */
.draw-line-1 { animation-delay: 0s; }
.draw-line-2 { animation-delay: 0.5s; }
.draw-line-3 { animation-delay: 1s; }
.draw-line-4 { animation-delay: 1.2s; }
.draw-line-5 { animation-delay: 1.4s; }

/* Remplissage de la face supérieure */
.cube-fill {
    animation: fillColor 4s ease-in-out 2s forwards infinite alternate;
}

@keyframes drawPath {
    0% { stroke-dashoffset: 400; }
    40%, 100% { stroke-dashoffset: 0; }
}

@keyframes drawPathOrange {
    0% { stroke-dashoffset: 400; opacity: 0; }
    10% { opacity: 1; }
    50%, 100% { stroke-dashoffset: 0; opacity: 1; }
}

@keyframes fillColor {
    0%, 20% { fill: rgba(255, 102, 0, 0); }
    100% { fill: rgba(255, 102, 0, 0.8); } /* Orange plus prononcé */
}

/* Le texte doit passer au-dessus de l'animation */
.hero-inner {
    position: relative;
    z-index: 10;
}

.hero h2 {
    font-size: 64px;
    margin-bottom: 20px;
    background: linear-gradient(180deg, #FFFFFF 0%, #AAAAAA 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero .tagline {
    font-family: var(--font-heading);
    font-size: 24px;
    color: var(--primary-color);
    letter-spacing: 4px; /* Espacement comme sur le logo */
    margin-bottom: 30px;
    text-transform: uppercase;
    font-weight: 600;
}

.hero-desc {
    font-size: 18px;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 40px auto;
}

/* Buttons */
.action-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 35px;
    border-radius: 4px;
    text-decoration: none;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.btn-primary {
    background: var(--gradient-orange);
    color: #fff;
    box-shadow: 0 4px 15px rgba(255, 102, 0, 0.2);
    border: 1px solid transparent;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 102, 0, 0.4);
    background: linear-gradient(135deg, #ff7a22 0%, #ffa23a 100%);
}

.btn-outline {
    background: rgba(255,255,255,0.02);
    color: var(--text-main);
    border: 1px solid rgba(255,255,255,0.1);
}

.btn-outline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(255,102,0,0.05);
}

/* Services */
.services {
    padding: 120px 0;
    background: #0d0d12;
    border-top: 1px solid rgba(255,255,255,0.02);
}

.section-title {
    text-align: center;
    font-size: 42px;
    margin-bottom: 60px;
    color: #fff;
}

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

.service-card {
    background: var(--card-bg);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 12px;
    padding: 40px 30px;
    text-align: center;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    cursor: default;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,102,0,0.3);
}

.service-icon {
    font-size: 48px;
    margin-bottom: 25px;
    display: inline-block;
}

.service-card h3 {
    font-size: 22px;
    margin-bottom: 15px;
    color: #fff;
}

.service-card p {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.7;
}

/* Projects */
.projects {
    padding: 120px 0;
    background: #101014; /* Fond alterné sombre */
}

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

.project-card {
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: var(--card-bg);
}

.project-image {
    width: 100%;
    height: 350px;
    background-size: cover;
    background-position: center;
    transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.project-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(16, 16, 20, 0.95) 0%, rgba(16, 16, 20, 0.5) 60%, transparent 100%);
    padding: 30px 20px 20px;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.project-card:hover .project-image {
    transform: scale(1.08); /* Effet zoom subtil au survol */
}

.project-card:hover .project-overlay {
    transform: translateY(0);
    opacity: 1;
}

.project-overlay h3 {
    color: #fff;
    font-size: 20px;
    margin-bottom: 5px;
}

.project-overlay p {
    color: var(--primary-color);
    font-size: 14px;
    font-weight: 500;
}

/* Carousel Styles */
.carousel-container {
    width: 100%;
    height: 350px;
    position: relative;
    background-color: #0b0b0e; /* Fond sombre pour encadrer les images non pleines */
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0;
    transition: opacity 0.8s ease-in-out, transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.carousel-slide.active {
    opacity: 1;
}

.project-card.has-carousel:hover .carousel-slide.active {
    transform: scale(1.08);
}

.carousel-indicators {
    position: absolute;
    bottom: 80px; /* Au-dessus de l'encart texte */
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 8px;
    z-index: 5;
    opacity: 0;
    transition: opacity 0.4s ease;
    padding-bottom: 20px;
    background: linear-gradient(to top, rgba(16, 16, 20, 0.8) 0%, transparent 100%);
}

.project-card.has-carousel:hover .carousel-indicators {
    opacity: 1;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
}

.dot.active {
    background: var(--primary-color);
    transform: scale(1.3);
}

/* Contact Section */
.contact {
    padding: 120px 0;
    background: #0d0d12;
    border-top: 1px solid rgba(255,255,255,0.02);
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 50px;
}

.contact-info h3 {
    font-size: 28px;
    margin-bottom: 20px;
    color: #fff;
}

.contact-info > p {
    color: var(--text-muted);
    font-size: 16px;
    margin-bottom: 40px;
    line-height: 1.8;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 30px;
}

.info-icon {
    font-size: 24px;
    background: rgba(255, 102, 0, 0.1);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--primary-color);
}

.info-item h4 {
    font-size: 18px;
    color: #fff;
    margin-bottom: 5px;
}

.info-item p {
    color: var(--text-muted);
    font-size: 15px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 14px;
    color: #fff;
    font-family: var(--font-heading);
    font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 15px;
    color: #fff;
    font-family: var(--font-body);
    font-size: 15px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.submit-btn {
    width: 100%;
    margin-top: 10px;
    cursor: pointer;
}

/* Footer */
.footer {
    background: #08080a;
    padding: 60px 0 30px;
    border-top: 1px solid rgba(255,255,255,0.05);
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.footer-brand h2 {
    font-size: 24px;
    font-style: italic;
    margin-bottom: 5px;
    color: #fff;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 15px;
    margin-bottom: 0;
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 10px 0;
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease, transform 0.3s ease;
    padding: 8px 16px;
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 30px;
    background: rgba(255,255,255,0.02);
}

.social-link:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    background: rgba(255,102,0,0.05);
}

.footer-links p {
    font-size: 13px;
    color: #666;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.05);
    width: 100%;
}

/* Animations */
.slide-up {
    animation: slideUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    opacity: 0;
    transform: translateY(30px);
}

.slide-up-delay {
    animation: slideUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.15s forwards;
    opacity: 0;
    transform: translateY(30px);
}

.slide-up-delay-2 {
    animation: slideUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.3s forwards;
    opacity: 0;
    transform: translateY(30px);
}

.slide-up-delay-3 {
    animation: slideUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.45s forwards;
    opacity: 0;
    transform: translateY(30px);
}

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

/* Responsive */
@media (max-width: 768px) {
    .hero h2 {
        font-size: 42px;
    }
    .hero .tagline {
        font-size: 18px;
        letter-spacing: 2px;
    }
    .header-content {
        flex-direction: column;
        height: auto;
        padding: 15px 0;
    }
    .main-nav ul {
        margin-top: 15px;
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
    
    .contact-wrapper {
        grid-template-columns: 1fr;
        padding: 30px 20px;
    }
}
