/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #191919;
    min-height: 100vh;
    color: #ffffff;
}

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

/* En-tête */
.header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Layout principal */
.main-content {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 30px;
    height: calc(100vh - 200px);
}

/* Panneau de contrôles */
.controls-panel {
    background: #403a3a;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    overflow-y: auto;
    max-height: 100%;
}

.control-group {
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 1px solid #e5e7eb;
}

.control-group:last-child {
    border-bottom: none;
}

.control-group h3 {
    color: #FFFFFF;
    margin-bottom: 15px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.control-group h3 i {
    color: #6366f1;
}

/* Formulaires */
.form-group {
    margin-bottom: 15px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #ffffff;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

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

small {
    color: #ffffff;
    font-size: 14px;
    margin-top: 5px;
    display: block;
}

/* Boutons de couleur */
.color-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.color-btn {
    padding: 10px;
    border: 2px solid #151313fc;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.color-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.color-btn.active {
    border-color: #fbbf24;
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.3);
}

/* Checkbox personnalisé */
.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 500;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    margin-right: 10px;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background-color: #6366f1;
    border-color: #6366f1;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    font-size: 12px;
}

/* Boutons */
.btn {
    width: 100%;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
}

.btn-secondary {
    background: linear-gradient(135deg, #6b7280, #9ca3af);
    color: white;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Informations sur les dimensions */
.dimensions-info {
    background: #f3f4f6;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
	color: black;
}

.dimensions-info div {
    margin-bottom: 5px;
    font-size: 14px;
}

.export-info {
    background: #f9fafb;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
}

/* Panneau de visualisation */
.viewer-panel {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.viewer-header {
    background: linear-gradient(135deg, #e7920a, #f6935c);
    color: white;
    padding: 20px;
}

.viewer-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
}

.viewer-container {
    flex: 1;
    position: relative;
    background: linear-gradient(to bottom, #f0f9ff, #e0e7ff);
}

#three-container {
    width: 100%;
    height: 100%;
}

/* Contrôles d'aide */
.controls-help {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 15px;
    border-radius: 10px;
    font-size: 12px;
    color: #6b7280;
}

.controls-help div {
    margin-bottom: 3px;
}

.model-status {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: #ff6800;
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
        height: auto;
    }
    
    .controls-panel {
        max-height: none;
    }
    
    .viewer-container {
        height: 500px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .color-buttons {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.control-group {
    animation: fadeIn 0.5s ease-out;
}

/* Scrollbar personnalisé */
.controls-panel::-webkit-scrollbar {
    width: 6px;
}

.controls-panel::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.controls-panel::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.controls-panel::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}
#popupBoxes{
     display:none; 
	 position:fixed; 
	 top:10%; left:50%; 
     transform:translateX(-50%); 
	 background:#fff; 
	 border-radius:5px solid rgba(255,105,0,1);
     z-index:1000; 
	 padding:30px; 
	 min-width:350px;
	 color:#ffffff;
}
.myButton {
	box-shadow: 0px 1px 0px 0px #fff6af;
	background:linear-gradient(to bottom, #ffec64 5%, #ffab23 100%);
	background-color:#ffec64;
	border-radius:6px;
	border:1px solid #ffaa22;
	display:inline-block;
	cursor:pointer;
	color:#333333;
	font-family:Arial;
	font-size:16px;
	font-weight:bold;
	padding:8px 24px;
	text-decoration:none;
	text-shadow:0px 1px 0px #ffee66;
}
.myButton:hover {
	background:linear-gradient(to bottom, #ffab23 5%, #ffec64 100%);
	background-color:#ffab23;
}
.myButton:active {
	position:relative;
	top:1px;
}
