:root { 
    --primary: #e91e63; 
    --dark: #2d3436; 
    --border: #dfe6e9; 
    --bg-light: #f0f2f5;
}

body { 
    font-family: 'Inter', sans-serif; 
    margin: 0; 
    background: #fdfdfd; 
    overflow: hidden; /* Empêche le scroll global car la config-panel a son propre scroll */
}

.app-wrapper { 
    display: grid; 
    grid-template-columns: 1fr 450px; 
    height: 100vh; 
}

/* PANNEAU DE GAUCHE : VISUALISATION */
.preview-panel { 
    background: var(--bg-light); 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center; 
    position: relative; 
}

.badge { 
    position: absolute; 
    top: 20px; 
    background: white; 
    padding: 8px 15px; 
    border-radius: 20px; 
    font-size: 11px; 
    font-weight: 700; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.05); 
    color: var(--dark);
}

#canvas-container { 
    width: 100%; 
    height: 400px; 
    display: block; 
}

.zoom-info {
    font-size: 11px;
    color: #b2bec3;
    margin-top: 10px;
}

/* PANNEAU DE DROITE : CONFIGURATION */
.config-panel { 
    background: white; 
    padding: 30px; 
    border-left: 1px solid var(--border); 
    overflow-y: auto; /* Permet de scroller le formulaire si nécessaire */
}

h1 { color: var(--primary); margin: 0; font-size: 24px; }
p { color: #636e72; font-size: 14px; margin-top: 5px; }

h3 { 
    font-size: 11px; 
    text-transform: uppercase; 
    color: #b2bec3; 
    margin-top: 25px; 
    border-bottom: 1px solid #eee; 
    padding-bottom: 5px; 
    letter-spacing: 1px;
}

.flex-row { display: flex; gap: 10px; }
.input-box { margin-top: 15px; flex: 1; }

label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; color: var(--dark); }

select, input { 
    width: 100%; 
    padding: 12px; 
    border: 1px solid var(--border); 
    border-radius: 10px; 
    font-size: 14px; 
    outline: none; 
    box-sizing: border-box; /* Important pour que le padding ne casse pas la largeur */
    transition: border-color 0.2s;
}

select:focus, input:focus {
    border-color: var(--primary);
}

/* CARTES D'EMBALLAGE */
.packaging-options { display: flex; gap: 10px; margin-top: 10px; }
.pack-card { 
    flex: 1; 
    border: 1px solid var(--border); 
    padding: 12px; 
    border-radius: 10px; 
    text-align: center; 
    cursor: pointer; 
    font-size: 13px; 
    transition: all 0.2s ease;
}

.pack-card:hover {
    border-color: var(--primary);
}

.pack-card:has(input:checked) { 
    border-color: var(--primary); 
    background: #fff0f5; 
    color: var(--primary); 
    font-weight: 600; 
}

.pack-card input { display: none; }

/* UPLOAD & CONTACT */
.file-label { 
    display: block; 
    background: #f8f9fa; 
    border: 1px dashed #ccc; 
    padding: 12px; 
    text-align: center; 
    border-radius: 10px; 
    cursor: pointer; 
    font-size: 13px;
}

.contact-bg { 
    background: #fff9fb; 
    padding: 15px; 
    border-radius: 12px; 
    border: 1px solid #fce4ec; 
}

/* FOOTER & PRIX */
.order-footer { 
    margin-top: 30px; 
    border-top: 2px solid #f8f9fa; 
    padding-top: 20px; 
}

.p-row { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 15px; }
.highlight { color: var(--primary); font-size: 20px; }

.btn-primary { 
    background: var(--primary); 
    color: white; 
    border: none; 
    padding: 18px; 
    width: 100%; 
    border-radius: 12px; 
    font-weight: 700; 
    cursor: pointer; 
    font-size: 16px;
    transition: transform 0.2s, background 0.2s;
}

.btn-primary:hover {
    background: #d81b60;
    transform: translateY(-2px);
}

.btn-primary:active {
    transform: translateY(0);
}

/* RESPONSIVE : Passage en une colonne sur mobile */
@media (max-width: 900px) {
    body { overflow-y: auto; }
    .app-wrapper { grid-template-columns: 1fr; height: auto; }
    .config-panel { border-left: none; height: auto; border-top: 1px solid var(--border); }
    #canvas-container { height: 300px; }
}