/* =================================================================
   CRAFTFLOW.BE - CSS OPTIMISÉ POUR PRODUCTION
   Automatisation • Conception 3D • Création Technique
   ================================================================= */

/* --- VARIABLES & RESET --- */
:root {
    --primary: #FF6B35;     /* Orange cuivré */
    --secondary: #004E89;   /* Bleu profond */
    --accent: #F7C59F;      /* Beige chaud */
    --bg: #1A1A2E;          /* Sombre */
    --bg-light: #252542;
    --text: #ffffff;
    --text-muted: #cccccc;
    --glass: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-tech: 'Space Grotesk', monospace, sans-serif;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.2);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* --- TYPOGRAPHY --- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-tech);
    line-height: 1.2;
    font-weight: 700;
}

h1 { 
    font-size: clamp(2.5rem, 7vw, 6rem); 
    font-weight: 700;
    letter-spacing: -0.02em;
}

h2 { 
    font-size: clamp(1.8rem, 4vw, 3.5rem); 
    margin-bottom: 2rem; 
    color: var(--accent);
    letter-spacing: -0.01em;
}

h3 { 
    font-size: clamp(1.25rem, 2.5vw, 1.75rem); 
    color: var(--primary); 
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-muted);
}

strong {
    color: var(--text);
    font-weight: 600;
}

.highlight { 
    color: var(--primary);
    font-weight: 700;
}

/* --- LAYOUT UTILS --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 6rem 0;
    position: relative;
    z-index: 2;
}

@media (max-width: 768px) {
    section { padding: 4rem 0; }
    .container { padding: 0 1.5rem; }
}

/* --- NAVIGATION --- */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 0;
    z-index: 100;
    transition: all var(--transition);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid transparent;
}

nav.scrolled {
    background: rgba(26, 26, 46, 0.9);
    border-bottom: 1px solid var(--glass-border);
    padding: 1rem 0;
    box-shadow: var(--shadow-md);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-tech);
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--text);
    transition: var(--transition);
}

.logo:hover {
    transform: scale(1.05);
}

.logo span { 
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
}

.nav-links li {
    position: relative;
}

.nav-links a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: var(--transition);
    font-size: 0.95rem;
}

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

.nav-links a:hover {
    color: var(--primary);
}

.nav-links a:hover::after { 
    width: 100%; 
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0.5rem;
    z-index: 101;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
    transition: var(--transition);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* --- BUTTONS --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.9rem 2rem;
    border: 2px solid var(--primary);
    background: transparent;
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    border-radius: 6px;
    font-family: var(--font-main);
    font-size: 0.95rem;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--primary);
    transition: left 0.4s ease;
    z-index: -1;
}

.btn:hover::before {
    left: 0;
}

.btn:hover {
    color: white;
    box-shadow: 0 0 25px rgba(255, 107, 53, 0.5);
    transform: translateY(-2px);
}

.btn-filled {
    background: var(--primary);
    color: white;
}

.btn-filled::before {
    background: transparent;
}

.btn-filled:hover {
    background: transparent;
    color: var(--primary);
}

/* --- HERO SECTION --- */
#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 0;
    opacity: 0.5;
    pointer-events: none;
}

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 80px;
}

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

.hero-subtitle {
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    color: var(--accent);
    margin: 0 0 1.5rem 0;
    font-weight: 400;
    letter-spacing: 3px;
    text-transform: uppercase;
    opacity: 0.9;
}

.hero-description {
    margin-top: 2rem;
    font-size: clamp(1rem, 2vw, 1.2rem);
    max-width: 600px;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2.5rem;
    flex-wrap: wrap;
}

.scroll-hint {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
    opacity: 0.6;
    cursor: pointer;
}

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

/* --- ABOUT SECTION --- */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.stat-card {
    background: var(--glass);
    padding: 2rem 1.5rem;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    transition: all var(--transition);
    text-align: center;
}

.stat-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(255, 107, 53, 0.2);
}

.stat-number {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    color: var(--primary);
    font-family: var(--font-tech);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-card div:last-child {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* --- SERVICES SECTION --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.service-card {
    background: linear-gradient(145deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.01) 100%);
    padding: 2.5rem;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--secondary);
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border-color: var(--primary);
}

.service-card:hover::before {
    background: var(--primary);
    height: 6px;
}

.service-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    display: block;
    line-height: 1;
}

.service-card h3 {
    margin-bottom: 1rem;
    color: white;
}

.service-card > p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.service-list {
    list-style: none;
    margin-top: 1.5rem;
}

.service-list li {
    margin-bottom: 0.7rem;
    padding-left: 1.8rem;
    position: relative;
    font-size: 0.9rem;
    color: #ddd;
    line-height: 1.5;
}

.service-list li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-size: 1.2rem;
    font-weight: bold;
}

/* --- PORTFOLIO SECTION --- */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.project-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    height: 350px;
    cursor: pointer;
    transition: var(--transition);
}

.project-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
    filter: grayscale(30%) brightness(0.8);
}

.project-card:hover .project-img {
    transform: scale(1.15);
    filter: grayscale(0%) brightness(1);
}

.project-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2rem;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.7) 70%, transparent 100%);
    transform: translateY(30px);
    opacity: 0;
    transition: all 0.5s ease;
}

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

.project-overlay h3 {
    color: white;
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
}

.project-tag {
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 500;
    display: block;
    margin-bottom: 1rem;
}

.project-link {
    color: white;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    font-size: 0.95rem;
}

.project-link:hover {
    color: var(--primary);
    gap: 0.8rem;
}

/* Placeholder pour images manquantes */
.img-placeholder-1 { background: linear-gradient(135deg, #2b2b45 0%, #004E89 100%); }
.img-placeholder-2 { background: linear-gradient(135deg, #1a1a2e 0%, #FF6B35 100%); }
.img-placeholder-3 { background: linear-gradient(135deg, #2b2b45 0%, #F7C59F 100%); }

/* --- TÉMOIGNAGES SECTION --- */
.testimonials-section {
    background: linear-gradient(180deg, var(--bg) 0%, var(--bg-light) 100%);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.testimonial-card {
    background: var(--glass);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    transition: all var(--transition);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.testimonial-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    border-color: var(--accent);
}

.testimonial-stars {
    color: var(--primary);
    font-size: 1.2rem;
    margin-bottom: 1rem;
    letter-spacing: 3px;
}

.testimonial-text {
    font-style: italic;
    line-height: 1.7;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--glass-border);
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
}

.author-name {
    font-weight: 600;
    color: white;
    margin-bottom: 0.2rem;
}

.author-position {
    font-size: 0.85rem;
    color: var(--accent);
}

/* --- BLOG SECTION --- */
.blog-section {
    background: var(--bg);
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.blog-card {
    background: var(--glass);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    transition: all var(--transition);
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    border-color: var(--primary);
}

.blog-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: var(--transition);
}

.blog-card:hover .blog-img {
    transform: scale(1.1);
}

.blog-content {
    padding: 1.5rem;
}

.blog-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

.blog-category {
    background: var(--primary);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-weight: 600;
}

.blog-date {
    color: var(--text-muted);
}

.blog-content h3 {
    color: white;
    margin-bottom: 0.8rem;
    font-size: 1.2rem;
}

.blog-content p {
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.blog-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.blog-link:hover {
    gap: 0.8rem;
    color: var(--accent);
}

/* --- CONTACT SECTION --- */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 4rem;
    background: rgba(255,255,255,0.03);
    padding: 3rem;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.contact-info h3 {
    color: white;
    margin-bottom: 1.5rem;
}

.contact-info-item {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
}

.contact-icon {
    width: 55px;
    height: 55px;
    background: var(--secondary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1.2rem;
    color: white;
    flex-shrink: 0;
    transition: var(--transition);
}

.contact-info-item:hover .contact-icon {
    background: var(--primary);
    transform: scale(1.1);
}

.info-label {
    font-size: 0.85rem;
    color: var(--accent);
    margin-bottom: 0.3rem;
}

.info-value {
    color: white;
    font-size: 1.05rem;
    text-decoration: none;
    transition: var(--transition);
}

a.info-value:hover {
    color: var(--primary);
}

/* Contact Form */
.contact-form {
    position: relative;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.6rem;
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 500;
}

.form-input, 
.form-textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(26, 26, 46, 0.9);
    border: 2px solid var(--glass-border);
    color: white;
    border-radius: 8px;
    font-family: var(--font-main);
    font-size: 0.95rem;
    transition: all var(--transition);
}

.form-input:focus, 
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.1);
    background: rgba(26, 26, 46, 1);
}

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

.form-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    font-weight: 500;
    text-align: center;
}

.form-message.success {
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid #4CAF50;
    color: #4CAF50;
}

.form-message.error {
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid #F44336;
    color: #F44336;
}

/* --- FOOTER --- */
footer {
    padding: 3rem 0 2rem;
    border-top: 1px solid var(--glass-border);
    background: linear-gradient(180deg, var(--bg) 0%, #0f0f1e 100%);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-brand p {
    line-height: 1.7;
    font-size: 0.9rem;
}

.footer-links h4 {
    color: var(--accent);
    font-size: 1rem;
    margin-bottom: 1rem;
    font-family: var(--font-main);
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.7rem;
}

.footer-links a {
    color: #999;
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary);
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
    color: #666;
    font-size: 0.9rem;
}

/* --- LOADER --- */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    transition: opacity 0.5s ease;
}

.loader-content {
    text-align: center;
}

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 968px) {
    .about-grid,
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
    
    .portfolio-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-links {
        position: fixed;
        top: 70px;
        right: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: rgba(26, 26, 46, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2rem;
        transition: right 0.4s ease;
        border-left: 1px solid var(--glass-border);
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .nav-links a {
        font-size: 1.2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .hero-buttons .btn {
        width: 100%;
        justify-content: center;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .services-grid,
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-brand p {
        margin: 0 auto;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    section {
        padding: 3rem 0;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    .contact-wrapper {
        padding: 2rem 1.5rem;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    
    .project-card {
        height: 280px;
    }
}

/* --- ACCESSIBILITY --- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles pour accessibilité */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

/* --- PRINT STYLES --- */
@media print {
    #canvas-container,
    nav,
    .scroll-hint,
    footer {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
}