body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #f4f4f4;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

h1 {
    text-align: center;
    color: #333;
}

.configurator {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.options, .preview {
    flex: 1;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.options {
    max-height: 700px;
    overflow-y: auto;
}

.option-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.accordion {
    margin-bottom: 15px;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.accordion-header {
    background-color: #f5f5f5;
    padding: 15px;
    cursor: pointer;
    font-weight: bold;
    border-left: 4px solid #3498db;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    transition: background-color 0.3s ease;
    position: sticky;
    top: 0;
    z-index: 10;
}

.accordion-header:hover {
    background-color: #e9e9e9;
}

.accordion-header::after {
    content: '+';
    font-size: 18px;
    transition: transform 0.3s ease;
}

.accordion-header.active {
    background-color: #e9e9e9;
}

.accordion-header.active::after {
    content: '−';
    transform: rotate(0deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background-color: #fff;
    padding: 0 15px;
}

.accordion-content.active {
    max-height: none;
    padding: 15px;
    border-top: 1px solid #eee;
    overflow-y: visible;
}

input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 12px;
    border-radius: 10px;
    outline: none;
    margin: 10px 0;
    cursor: pointer;
    background: linear-gradient(to right, #3498db var(--progress), #ddd var(--progress));
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 40px;
    height: 40px;
    background: url('/assets/img/curseur_scie.png') no-repeat center;
    background-size: contain;
    cursor: pointer;
    margin-top: -14px;
}

input[type="range"]::-moz-range-thumb {
    width: 30px;
    height: 30px;
    background: url('/assets/img/curseur_scie.png') no-repeat center;
    background-size: contain;
    cursor: pointer;
    border: none;
    transform: translateY(-50%);
}

input[type="range"]::-webkit-slider-runnable-track {
    height: 8px;
    border-radius: 5px;
}

input[type="range"]::-moz-range-track {
    height: 8px;
    border-radius: 5px;
}

select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

#canvas-container {
    width: 100%;
    height: 100%;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.summary {
    margin-top: 20px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 5px;
    border-left: 4px solid #3498db;
}

.summary h3 {
    margin-top: 0;
    color: #333;
}

.summary p {
    margin: 5px 0;
    font-size: 14px;
}

.ar-button {
    background-color: #007bff;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    margin: 10px 0;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    width: 100%;
    transition: background-color 0.3s ease;
}

.ar-button:hover {
    background-color: #0056b3;
}

#validate-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 20px;
    transition: background-color 0.3s ease;
}

#validate-btn:hover {
    background-color: #218838;
}

@media (max-width: 768px) {
    .configurator {
        flex-direction: column;
    }

    .options, .preview {
        width: 100%;
    }

    .options {
        max-height: none;
    }

    #canvas-container {
        height: 300px;
    }

    h1 {
        font-size: 1.5em;
    }

    h2, h3 {
        font-size: 1.2em;
    }

    label {
        font-size: 0.9em;
    }

    input[type="range"], select {
        font-size: 0.9em;
    }
/* ===========================================
   NOUVEAUX STYLES POUR LES CATÉGORIES DE MOTIFS
   À ajouter à la fin du fichier styles.css
   =========================================== */

/* Styles pour les boutons de catégories */
.category-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.category-button {
    padding: 12px 20px;
    border: 2px solid #ddd;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    flex: 1;
    min-width: 120px;
    text-align: center;
    font-size: 14px;
    color: #333;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.category-button:hover {
    border-color: #3498db;
    background: #f8f9fa;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.category-button.active {
    background: #3498db;
    color: white;
    border-color: #3498db;
    box-shadow: 0 2px 8px rgba(52,152,219,0.3);
    transform: translateY(-1px);
}

.category-button.active:hover {
    background: #2980b9;
    border-color: #2980b9;
}

/* Styles pour l'aperçu des motifs */
.motif-previews {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 15px;
    margin-top: 20px;
    max-height: 450px;
    overflow-y: auto;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fafafa;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

/* Scrollbar personnalisée pour les aperçus */
.motif-previews::-webkit-scrollbar {
    width: 8px;
}

.motif-previews::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.motif-previews::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.motif-previews::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

.motif-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    min-height: 130px;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.motif-preview:hover {
    border-color: #3498db;
    box-shadow: 0 4px 12px rgba(52,152,219,0.2);
    transform: translateY(-3px);
}

.motif-preview.selected {
    border-color: #3498db;
    background: #f0f8ff;
    box-shadow: 0 0 0 3px rgba(52,152,219,0.2);
    transform: translateY(-2px);
}

.motif-preview img {
    width: 85px;
    height: 85px;
    object-fit: contain;
    margin-bottom: 12px;
    border-radius: 4px;
    transition: transform 0.2s ease;
}

.motif-preview:hover img {
    transform: scale(1.05);
}

.motif-label {
    font-size: 13px;
    text-align: center;
    font-weight: 500;
    color: #333;
    line-height: 1.3;
    margin-top: auto;
}

.motif-preview.selected .motif-label {
    color: #3498db;
    font-weight: 600;
}

.error-text {
    font-size: 12px;
    color: #999;
    text-align: center;
    font-style: italic;
    padding: 20px;
    background: #f8f8f8;
    border-radius: 4px;
    border: 1px dashed #ddd;
}

/* Indicateur de chargement */
.loading-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #666;
    font-style: italic;
}

.loading-indicator::before {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .category-buttons {
        justify-content: center;
        gap: 8px;
    }
    
    .category-button {
        min-width: 100px;
        padding: 10px 15px;
        font-size: 13px;
        flex: none;
    }
    
    .motif-previews {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 12px;
        padding: 15px;
        max-height: 350px;
    }
    
    .motif-preview {
        padding: 12px;
        min-height: 110px;
    }
    
    .motif-preview img {
        width: 70px;
        height: 70px;
    }
    
    .motif-label {
        font-size: 12px;
    }
}




@media (max-width: 480px) {
    .category-buttons {
        gap: 5px;
    }
    
    .category-button {
        min-width: 80px;
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .motif-previews {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
        gap: 10px;
        padding: 10px;
    }
    
    .motif-preview {
        padding: 10px;
        min-height: 95px;
    }
    
    .motif-preview img {
        width: 60px;
        height: 60px;
    }
    
    .motif-label {
        font-size: 11px;
    }
}

/* Animation d'apparition des motifs */
.motif-preview {
    opacity: 0;
    animation: fadeInUp 0.3s ease forwards;
}

.motif-preview:nth-child(1) { animation-delay: 0.1s; }
.motif-preview:nth-child(2) { animation-delay: 0.2s; }
.motif-preview:nth-child(3) { animation-delay: 0.3s; }
.motif-preview:nth-child(4) { animation-delay: 0.4s; }
.motif-preview:nth-child(5) { animation-delay: 0.5s; }
.motif-preview:nth-child(n+6) { animation-delay: 0.6s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Style pour améliorer l'accordéon avec les nouveaux éléments */
.accordion-content.scrollable-content {
    max-height: 600px;
    overflow-y: auto;
}

.accordion-content.scrollable-content.active {
    max-height: 600px;
}

/* Amélioration du style des h3 dans les groupes d'options */
.option-group h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
    border-bottom: 2px solid #3498db;
    padding-bottom: 8px;
}
/* Bouton de devis sexy */
.devis-button,
#devis-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    border: none !important;
    padding: 15px 30px !important;
    border-radius: 50px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    margin-top: 20px !important;
    width: 100% !important;
    position: relative !important;
    overflow: hidden !important;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3) !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    animation: pulse 2s infinite !important;
}

.devis-button::before,
#devis-button::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: -100% !important;
    width: 100% !important;
    height: 100% !important;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent) !important;
    transition: all 0.5s !important;
}

.devis-button:hover,
#devis-button:hover {
    transform: translateY(-3px) scale(1.02) !important;
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.4) !important;
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%) !important;
}

.devis-button:hover::before,
#devis-button:hover::before {
    left: 100% !important;
}

.devis-button:active,
#devis-button:active {
    transform: translateY(-1px) scale(0.98) !important;
    box-shadow: 0 5px 15px rgba(80, 106, 220, 0.4) !important;
}

/* Animation de pulsation */
@keyframes pulse {
    0% { box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3); }
    50% { box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5); }
    100% { box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3); }
}

.devis-button {
    animation: pulse 2s infinite;
}

}
/* Bouton AR avec le même style que le bouton devis */
.ar-button {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
    color: white !important;
    border: none !important;
    padding: 15px 30px !important;
    border-radius: 50px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    margin: 10px 0 !important;
    width: 100% !important;
    position: relative !important;
    overflow: hidden !important;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.3) !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    animation: pulseGreen 2s infinite !important;
}

.ar-button::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: -100% !important;
    width: 100% !important;
    height: 100% !important;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent) !important;
    transition: all 0.5s !important;
}

.ar-button:hover {
    transform: translateY(-3px) scale(1.02) !important;
    box-shadow: 0 15px 35px rgba(40, 167, 69, 0.4) !important;
    background: linear-gradient(135deg, #20c997 0%, #28a745 100%) !important;
}

.ar-button:hover::before {
    left: 100% !important;
}

.ar-button:active {
    transform: translateY(-1px) scale(0.98) !important;
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4) !important;
}

/* Animation de pulsation verte pour l'AR */
@keyframes pulseGreen {
    0% { box-shadow: 0 8px 25px rgba(40, 167, 69, 0.3); }
    50% { box-shadow: 0 8px 25px rgba(40, 167, 69, 0.5); }
    100% { box-shadow: 0 8px 25px rgba(40, 167, 69, 0.3); }
}