/* Styles pour la page de détail produit */

/* Styles pour l'interface Recto/Verso */
.face-tabs {
    display: flex;
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 20px;
}

.face-tab {
    padding: 10px 20px;
    cursor: pointer;
    font-weight: 500;
    position: relative;
    transition: all 0.3s ease;
}

.face-tab.active {
    color: #FFD166;
}

.face-tab.active:after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #FFD166;
}

.face-content {
    display: none;
    padding: 15px;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    margin-bottom: 20px;
}

.face-content.active {
    display: block;
}

.face-title {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.1rem;
    color: #555;
    font-weight: 600;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

/* Styles pour les éléments de contenu */
.content-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px;
    border: 1px solid #eee;
    border-radius: 4px;
    background-color: #f9f9f9;
}

.content-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #e9ecef;
    border-radius: 4px;
    margin-right: 10px;
    font-size: 1.2rem;
    color: #555;
}

.content-input {
    flex-grow: 1;
}

.content-actions {
    display: flex;
    gap: 5px;
}

.edit-btn, .delete-btn {
    width: 30px;
    height: 30px;
    border: none;
    background-color: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.edit-btn:hover {
    background-color: #e9ecef;
}

.delete-btn:hover {
    background-color: #ffebee;
    color: #f44336;
}

/* Styles pour l'upload d'image compact */
.image-upload-compact {
    position: relative;
    width: 100%;
    border: 1px dashed #ccc;
    border-radius: 4px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.image-upload-compact:hover {
    border-color: #FFD166;
    background-color: #f0f7fc;
}

.upload-placeholder-compact {
    color: #777;
    font-size: 0.9rem;
}

.preview-image {
    max-width: 100%;
    max-height: 150px;
    margin-top: 8px;
    border-radius: 4px;
    object-fit: contain;
}

/* Bouton d'ajout de contenu */
.add-content-btn {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background-color: transparent;
    border: 1px dashed #ccc;
    border-radius: 4px;
    color: #777;
    cursor: pointer;
    font-size: 0.9rem;
    margin-top: 10px;
    transition: all 0.2s ease;
}

.add-content-btn:hover {
    border-color: #FFD166;
    color: #FFD166;
    background-color: #f0f7fc;
}

.add-content-btn:before {
    content: '+';
    margin-right: 5px;
    font-size: 1.1rem;
}


/* Layout principal */
.product-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 3rem;
}

.preview-container {
    flex: 1;
    min-width: 300px;
    position: relative;
}

.customization-container {
    flex: 1;
    min-width: 300px;
}

/* Styles pour la prévisualisation 3D */
.render-container {
    position: relative;
    height: 400px;
    background-color: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1rem;
}

#renderCanvas {
    width: 100%;
    height: 100%;
    touch-action: none;
}

.loading-overlay-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #FFD166;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    margin-top: 10px;
    font-size: 16px;
    color: #333;
}

/* Onglets de prévisualisation */
.preview-nav {
    display: flex;
    margin-bottom: 1rem;
}

.preview-tab {
    padding: 0.5rem 1rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.preview-tab.active {
    border-bottom: 2px solid #FFD166;
    font-weight: bold;
}

/* Contrôles de prévisualisation */
.preview-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.preview-control-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.preview-control-btn:hover {
    background-color: #e9ecef;
}

/* Stepper */
.stepper-container-custom {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
}

.stepper-header {
    display: flex;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.stepper-step {
    flex: 1;
    padding: 1rem 0.5rem;
    text-align: center;
    position: relative;
    cursor: pointer;
}



.step-number {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #e9ecef;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.5rem;
    position: relative;
    z-index: 2;
}

.stepper-step.active .step-number {
    background-color: #FFD166;
    color: white;
}

.stepper-step.completed .step-number {
    background-color: #28a745;
    color: white;
}

.step-label {
    font-size: 0.875rem;
    color: #6c757d;
}

.stepper-step.active .step-label {
    color: #FFD166;
    font-weight: bold;
}

.stepper-content {
    padding: 1.5rem;
}

.step-content {
    display: none;
}

.step-content.active {
    display: block;
}

.step-description {
    color: #6c757d;
    margin-bottom: 1.5rem;
}

.step-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 1.5rem;
}

/* Zone de drag & drop pour les images */
.image-upload-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.image-upload-zone {
    flex: 1;
    min-width: 200px;
    height: 200px;
    border: 2px dashed #ced4da;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.image-upload-zone:hover {
    border-color: #FFD166;
}

.image-upload-zone.dragover {
    border-color: #FFD166;
    background-color: rgba(52, 152, 219, 0.1);
}

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1rem;
}

.upload-placeholder i {
    font-size: 2.5rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.upload-placeholder p {
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.upload-hint {
    font-size: 0.875rem;
    color: #6c757d;
}

.preview-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}

.remove-image {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.8);
    border: 1px solid #dc3545;
    color: #dc3545;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 0;
    z-index: 5;
}

/* Formulaires de texte */
.text-input-container {
    margin-bottom: 1.5rem;
}

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

/* Sélection de couleurs */
.color-selection-container {
    margin-bottom: 1.5rem;
}

.color-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.color-option {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.color-option:hover {
    transform: scale(1.1);
}

.color-option.selected {
    border-color: #FFD166;
    box-shadow: 0 0 0 2px white, 0 0 0 4px #FFD166;
}

/* Sélection de position */
.position-selection-container {
    margin-bottom: 1.5rem;
}

.position-options {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.5rem;
}

.position-option {
    flex: 1;
    min-width: 120px;
    max-width: 150px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.position-option:hover {
    border-color: #FFD166;
}

.position-option.selected {
    border-color: #FFD166;
    background-color: rgba(52, 152, 219, 0.1);
}

.position-option img,
.position-placeholder {
    width: 100%;
    height: 100px;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    border-radius: 4px;
    font-weight: bold;
    color: #6c757d;
}

.position-placeholder.recto {
    background-color: #e3f2fd;
    color: #0d6efd;
}

.position-placeholder.verso {
    background-color: #f8d7da;
    color: #dc3545;
}

.position-placeholder.paysage {
    background-color: #d1e7dd;
    color: #198754;
}

/* Résumé de commande */
.order-summary {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.summary-item.total {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
    font-weight: bold;
    font-size: 1.1rem;
}

/* Styles pour la quantité simplifiés */
#quantity {
    max-width: 60px;
    text-align: center;
}

.add-notification {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #4CAF50;
    color: white;
    padding: 12px 24px;
    border-radius: 30px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
}

/* Notification */
#notification-area {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.notification {
    background-color: white;
    border-left: 4px solid #FFD166;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 1rem;
    margin-bottom: 0.5rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.notification.success {
    border-left-color: #28a745;
}

.notification.error {
    border-left-color: #dc3545;
}

.notification-icon {
    margin-right: 0.5rem;
    font-size: 1.2rem;
}

.notification.success .notification-icon {
    color: #28a745;
}

.notification.error .notification-icon {
    color: #dc3545;
}

/* Avantages produit */
.product-advantages {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin: 2rem 0;
    padding: 1.5rem 0;
    background-color: #f9f9f9;
    border-radius: 8px;
}

.advantage-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 1rem;
}

.advantage-item i {
    font-size: 1.8rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.advantage-item span {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

/* Styles pour les swatches de couleur */
.color-swatch {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin-right: 5px;
    vertical-align: middle;
}

/* Styles pour les boutons de quantitu00e9 */
#quantity {
    max-width: 60px;
}

/* Styles pour les aperu00e7us d'images */
.img-thumbnail {
    object-fit: contain;
}

/* Responsive */
@media (max-width: 768px) {
    .product-container {
        flex-direction: column;
    }
    
    .preview-container,
    .customization-container {
        width: 100%;
    }
    
    .render-container {
        height: 300px;
    }
    
    .stepper-header {
        overflow-x: auto;
    }
    
    .stepper-step {
        min-width: 100px;
    }
    
    /* Styles responsifs pour la personnalisation */
    .form-check {
        margin-bottom: 10px;
    }
    
    .btn-group {
        display: flex;
        flex-wrap: wrap;
    }
    
    .btn-group .btn {
        flex: 1;
        min-width: 80px;
    }
}
