/* === CSS Variables === */
:root {
    --primary: #8b5a2b; /* Warm wood color */
    --primary-light: #a67b5b;
    --primary-dark: #654321;
    --accent: #d35400;
    --text-main: #2c3e50;
    --text-light: #7f8c8d;
    --bg-main: #fcf9f5; /* Off-white / light wood paper */
    --bg-panel: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.4);
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 20px 40px rgba(139, 90, 43, 0.15);
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --font-sans: 'Outfit', sans-serif;
    --font-serif: 'Playfair Display', serif;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* === Reset & Base === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* === Typography === */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--primary-dark);
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    width: 60%;
    height: 3px;
    background: var(--primary);
    bottom: -10px;
    left: 20%;
    border-radius: 2px;
}

.section-header p {
    color: var(--text-light);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* === Navigation === */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 1000;
    transition: var(--transition);
}

.navbar.scrolled {
    padding: 1rem 5%;
    box-shadow: var(--shadow-sm);
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.logo i {
    color: var(--accent);
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-main);
    transition: var(--transition);
    position: relative;
}

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

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

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

/* === Buttons === */
.btn-primary, .btn-secondary, .btn-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 15px rgba(139, 90, 43, 0.3);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 90, 43, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

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

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

/* === Hero Section === */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 0 5%;
    padding-top: 80px;
    gap: 4rem;
    position: relative;
    overflow: hidden;
}

/* Subtly textured background element */
.hero::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(139, 90, 43, 0.1) 0%, rgba(252, 249, 245, 0) 70%);
    border-radius: 50%;
    z-index: -1;
}

.hero-content {
    flex: 1;
    max-width: 600px;
    animation: slideUp 0.8s ease forwards;
}

.hero h1 {
    font-size: 4.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.hero h1 span {
    color: var(--primary);
    font-style: italic;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 2.5rem;
}

.hero-actions {
    display: flex;
    gap: 1.5rem;
}

.hero-visual {
    flex: 1;
    position: relative;
    animation: fadeIn 1.2s ease forwards;
}

.hero-img {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    object-fit: cover;
    height: 600px;
    width: 100%;
}

.wood-texture-glass {
    position: absolute;
    bottom: -20px;
    left: -40px;
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 1.5rem 2rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 600;
    color: var(--primary-dark);
    z-index: 2;
    animation: float 6s ease-in-out infinite;
}

.wood-texture-glass i {
    font-size: 2rem;
    color: var(--accent);
}

/* === Services Section === */
.services {
    padding: 6rem 5%;
    background: white;
}

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

.service-card {
    background: var(--bg-main);
    padding: 2.5rem 2rem;
    border-radius: var(--radius-md);
    text-align: center;
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.03);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
    background: white;
}

.service-card i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.service-card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    font-family: var(--font-sans);
}

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

/* === Inspirations Section === */
.inspirations {
    padding: 6rem 5%;
}

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

.gallery-item {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    height: 400px;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2rem;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
    transform: translateY(20px);
    opacity: 0;
    transition: var(--transition);
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
    opacity: 1;
}

.gallery-overlay h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    font-family: var(--font-sans);
}

.gallery-overlay p {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* === Editor & Quote Section === */
.devis-section {
    padding: 6rem 5%;
    background: var(--primary-dark);
    color: white;
    position: relative;
}

/* Wood pattern overlay */
.devis-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: url('data:image/svg+xml;utf8,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><path d="M10 10c20 0 40 20 60 10s30-20 30-10" stroke="rgba(255,255,255,0.03)" stroke-width="2" fill="none"/></svg>');
    background-size: 200px;
    opacity: 0.5;
    z-index: 0;
}

.devis-container {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
}

.devis-header {
    text-align: center;
    margin-bottom: 3rem;
}

.devis-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: white;
}

.devis-header p {
    color: rgba(255,255,255,0.8);
    font-size: 1.1rem;
}

.editor-layout {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 3rem;
    background: white;
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    color: var(--text-main);
}

/* Upload Area */
.editor-visual {
    display: flex;
    flex-direction: column;
}

.upload-area {
    flex: 1;
    border: 2px dashed #cbd5e1;
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: #f8fafc;
}

.upload-area:hover, .upload-area.dragover {
    border-color: var(--primary);
    background: #fff8f0;
}

.upload-area i {
    font-size: 3.5rem;
    color: var(--primary-light);
    margin-bottom: 1rem;
}

.upload-area p {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.upload-area span {
    color: var(--primary);
    text-decoration: underline;
}

.upload-area .formats {
    display: block;
    font-size: 0.8rem;
    color: var(--text-light);
    text-decoration: none;
    margin-top: 1rem;
}

/* Preview Area */
.preview-area {
    flex: 1;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #f8fafc;
}

.preview-header {
    background: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 600;
    font-size: 0.9rem;
}

#remove-file {
    background: none;
    border: none;
    color: #e74c3c;
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition);
}

#remove-file:hover {
    transform: scale(1.1);
}

.preview-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.preview-content img {
    max-width: 100%;
    max-height: 300px;
    object-fit: contain;
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.1));
}

.dxf-placeholder {
    text-align: center;
    color: var(--primary);
}
.dxf-placeholder i {
    font-size: 4rem;
    margin-bottom: 1rem;
}

/* Form Styles */
.editor-controls form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-row .form-group {
    flex: 1;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-main);
}

input[type="text"], input[type="number"], input[type="email"], input[type="tel"], textarea, select {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 1rem;
    transition: var(--transition);
    background: white;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(139, 90, 43, 0.1);
}

/* Custom Select */
.custom-select select {
    appearance: none;
    cursor: pointer;
}
.custom-select {
    position: relative;
}
.custom-select::after {
    content: '\f107';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--text-light);
}

/* Thickness Selector */
.thickness-selector {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.radio-btn {
    position: relative;
    cursor: pointer;
}

.radio-btn input {
    position: absolute;
    opacity: 0;
}

.radio-btn span {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: var(--transition);
}

.radio-btn input:checked + span {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Client Type Selector */
.client-type-selector {
    display: flex;
    gap: 1rem;
}

.radio-card {
    flex: 1;
    cursor: pointer;
}

.radio-card input {
    display: none;
}

.card-content {
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-sm);
    padding: 1rem;
    text-align: center;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.card-content i {
    font-size: 1.5rem;
    color: var(--text-light);
}

.radio-card input:checked + .card-content {
    border-color: var(--primary);
    background: #fff8f0;
}

.radio-card input:checked + .card-content i,
.radio-card input:checked + .card-content span {
    color: var(--primary);
    font-weight: 600;
}

.separator {
    border: 0;
    height: 1px;
    background: #e2e8f0;
    margin: 1rem 0;
}

.btn-submit {
    width: 100%;
    margin-top: 1rem;
    background: var(--primary);
    color: white;
    border: none;
    padding: 1rem;
    font-size: 1.1rem;
}

.btn-submit:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(139, 90, 43, 0.3);
}

/* === Profile Section === */
.profil {
    padding: 6rem 5%;
    background: white;
}

.profil-container {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 4rem;
}

.profil-image {
    flex: 1;
    position: relative;
}

.profil-image img {
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    object-fit: cover;
    aspect-ratio: 4/5;
}

.profil-badge {
    position: absolute;
    bottom: 20px;
    right: 0;
    background: var(--accent);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: var(--shadow-sm);
    transform: translateX(20px);
}

.profil-content {
    flex: 1.2;
}

.profil-content h2 {
    font-size: 2.5rem;
    color: var(--primary-dark);
    margin-bottom: 0.2rem;
}

.profil-content .role {
    font-family: var(--font-sans);
    color: var(--primary);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    font-weight: 400;
}

.profil-content p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

.profil-stats {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat .number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-dark);
    font-family: var(--font-serif);
}

.stat .label {
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* === Footer === */
footer {
    background: #1a1a1a;
    color: white;
    padding: 4rem 5% 2rem;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    gap: 4rem;
    margin-bottom: 3rem;
    max-width: 1200px;
    margin: 0 auto 3rem;
}

.footer-col {
    flex: 1;
    min-width: 250px;
}

.footer-col h4 {
    font-family: var(--font-sans);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: white;
}

.footer-col h4 span {
    color: var(--primary);
}

.footer-col p {
    color: #a0a0a0;
    margin-bottom: 0.5rem;
}

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

/* === Animations === */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

/* === Responsive === */
@media (max-width: 992px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 120px;
    }
    
    .hero-content {
        max-width: 100%;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .wood-texture-glass {
        left: 50%;
        transform: translateX(-50%);
        bottom: 20px;
        animation: float-center 6s ease-in-out infinite;
    }

    .editor-layout {
        grid-template-columns: 1fr;
    }
    
    .profil-container {
        flex-direction: column;
    }
    
    .profil-badge {
        transform: translateX(0);
        right: 10%;
    }
}

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

@media (max-width: 768px) {
    .hero h1 {
        font-size: 3rem;
    }
    
    .nav-links {
        display: none; /* In a real app, add a hamburger menu */
    }
    
    .form-row {
        flex-direction: column;
    }
}
