:root {
    --primary: #3498db;
    --primary-dark: #2980b9;
    --secondary: #2ecc71;
    --dark: #2c3e50;
    --light: #ecf0f1;
    --border: #bdc3c7;
    --shadow: rgba(0, 0, 0, 0.1);
    --radius: 8px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    line-height: 1.6;
    color: var(--dark);
    /* Fond bleu léger au lieu du violet */
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    min-height: 100vh;
}

nav {
    background: white;
    box-shadow: 0 2px 10px var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
}

nav a {
    display: block;
    padding: 1.2rem 2rem;
    color: var(--dark);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
}

nav a:hover, nav a.active {
    background: var(--light);
    border-bottom-color: var(--primary);
}

.container {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.content-wrapper {
    background: white;
    border-radius: var(--radius);
    box-shadow: 0 10px 40px var(--shadow);
    overflow: hidden;
}

.hero {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    color: #666;
    margin: 0 auto 2rem;
    max-width: 600px;
}

.two-column-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 2rem;
}

@media (max-width: 992px) {
    .two-column-layout {
        grid-template-columns: 1fr;
    }
}

.form-container {
    padding: 2rem;
    background: #f8f9fa;
    border-radius: var(--radius);
}

.form-header h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

.product-link {
    display: inline-block;
    margin-bottom: 1.5rem;
    padding: 0.5rem 1rem;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: var(--radius);
    transition: all 0.3s;
}

.product-link:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-group input[type="text"],
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
}

.checkbox-group {
    display: flex;
    align-items: center;
}

.checkbox-group input {
    margin-right: 0.5rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

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

.btn-primary:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-group {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.preview-container {
    padding: 2rem;
}

.preview-header h3 {
    margin-bottom: 1rem;
}

.svg-preview {
    background: #f8f9fa;
    border-radius: var(--radius);
    padding: 2rem;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.model-preview {
    background: #f8f9fa;
    border-radius: var(--radius);
    min-height: 500px;
    margin-top: 1rem;
}

.model-preview iframe {
    width: 100%;
    height: 100%;
    min-height: 500px;
    border: none;
}

.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
}

.spinner {
    border: 3px solid var(--light);
    border-top-color: var(--primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin-right: 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

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

.card {
    padding: 2rem;
    text-align: center;
    border: 2px solid var(--light);
    border-radius: var(--radius);
    transition: all 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--shadow);
    border-color: var(--primary);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

footer {
    text-align: center;
    padding: 2rem;
    color: white;
    margin-top: 4rem;
}

footer a {
    color: white;
    text-decoration: none;
}
