/* ========== LAYOUT 2 COLONNES (40/60) ========== */
.product-layout {
    display: grid;
    grid-template-columns: 40% 60%;
    gap: 2rem;
    padding: 2rem;
    max-width: 1600px;
    margin: 0 auto;
}

@media (max-width: 1024px) {
    .product-layout {
        grid-template-columns: 1fr;
    }
}

/* ========== COLONNE GAUCHE ========== */
.left-panel {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.product-header {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.product-header h2 {
    margin: 0 0 0.5rem 0;
    font-size: 1.8rem;
}

.product-header .description {
    color: #666;
    margin: 0.5rem 0 1rem 0;
}

.shop-link {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    background: #2ecc71;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s;
}

.shop-link:hover {
    background: #27ae60;
    transform: translateY(-2px);
}

/* ========== ACCORDÉONS PARAMÈTRES ========== */
.parameter-group {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
}

.parameter-group summary {
    padding: 1rem 1.5rem;
    cursor: pointer;
    user-select: none;
    font-weight: 600;
    background: #f8f9fa;
    transition: background 0.3s;
    list-style: none;
}

.parameter-group summary::-webkit-details-marker {
    display: none;
}

.parameter-group summary::before {
    content: '▶';
    display: inline-block;
    margin-right: 0.5rem;
    transition: transform 0.3s;
}

.parameter-group[open] summary::before {
    transform: rotate(90deg);
}

.parameter-group summary:hover {
    background: #e9ecef;
}

.parameter-content {
    padding: 1.5rem;
}

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

.form-group:last-child {
    margin-bottom: 0;
}

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

.form-group input[type="text"],
.form-group input[type="number"],
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #3498db;
}

.field-help {
    display: block;
    margin-top: 0.25rem;
    color: #666;
    font-size: 0.85rem;
}

/* ========== BOUTONS ACTIONS ========== */
.action-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.action-buttons .btn {
    flex: 1;
}

/* ========== PHOTO PRODUIT ========== */
.product-photo {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.product-photo img {
    width: 100%;
    height: auto;
    border-radius: 5px;
}

/* ========== COLONNE DROITE - PREVIEWS ========== */
.right-panel {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.preview-box {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 1.5rem;
}

.preview-box h3 {
    margin: 0 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f0f0f0;
}

#svg-container,
#mesh-container {
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 5px;
    padding: 1rem;
}

#svg-container object {
    max-width: 100%;
    height: auto;
}

/* ========== LOADING & ERROR ========== */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    color: #999;
}

.spinner {
    border: 3px solid #f0f0f0;
    border-top-color: #3498db;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

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

.error {
    color: #e74c3c;
    text-align: center;
}
/* Preview SVG plus compact */
#svg-preview {
    max-height: 300px;
}

#svg-container {
    min-height: 200px;
    max-height: 250px;
}

#svg-container object {
    max-height: 200px;
    object-fit: contain;
}
