
/* Reset */
.nav,
footer,
.circle-bottom img {
    display: none;
}

.wrapper {
    max-width: 1600px;
}

/* Main */
.main-bg-image {
    background-image: url(../images/configurator2-bg1.png);
    background-repeat: repeat-y;
    background-position: top right;
}

.circle-bottom {
    background-image: url(../images/configurator2-bg2.png);
    background-repeat: no-repeat;
    background-position: top right;
}

body:not(.home-page) .main-bg-image-home {
    min-height: calc(100vh);
    height:100%;
}

.main {
    margin: 0 20px;
    min-height: 100vh;
    height:100%;
    display: flex;
    flex-direction: column;
    color: #1e3a8a;
    position: relative;
}

/* Header */
.configurator-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 2px solid #fff;
}

a.back-btn {
    color: #1e3a8a;
}
.configurator-header-left .back-btn-text {
    font-size: 14px;
    font-weight: bold;
    padding-left: 5px;
}

.configurator-header-logo a {
    text-align: center;
}

.configurator-header-logo img {
    width: 120px;
}

.configurator-header-center {
    padding: 1rem;
    text-align: center;
    flex-grow: 1;
}

.configurator-header-center .main-title {
    font-size: 26px;
    font-weight: bold;
}

.configurator-header-center .subtitle {
    font-size: 12px;
}

.configurator-mobile-footer {
    padding:50px;
    text-align: center;
}

@media (min-width: 769px) {
    .configurator-header-right .configurator-info-btn,
    .configurator-header-left .back-btn-ico-mobile,
    .configurator-mobile-footer {
        display: none;
    }
}
.configurator-header-right {
    text-align: center;
}
.configurator-header-right .langauges-ul {
    position: unset;
    min-width: 70px;
}
.configurator-header-right .langauges-ul li {
    display: inline;
}

@media (max-width: 768px) {
    .wrapper {
        padding-top: 0px;
    }

    .configurator-header-left .back-btn-ico-desktop,
    .configurator-header-left .back-btn-text,
    .configurator-header-left .configurator-header-logo,
    .configurator-header-center .subtitle {
        display: none;
    }

    .configurator-header-left .back-btn-ico-mobile,
    .configurator-header-right .configurator-info-btn-ico {
        font-size: 25px;
    }

    .configurator-header-right .configurator-info-btn-ico {
        color: #62C1D1;
    }

    .configurator-header-center .main-title {
        font-size: 20px;
        margin-left: 30px;
        margin-right: 30px;
    }
}

/* Main content */
.main-content {
    flex: 1;
    display: flex;
    gap: 15px;
    margin-top:15px;
}

/* Left panel - Product visualization */
.left-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.left-panel-content {
    background: white;
    border-radius: 12px;
    position: sticky;
    top:20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 0 20px 20px 20px;
    margin-bottom: 30px;
}

.section-title {
    font-size: 20px;
    color: #62C1D1;
    margin-bottom: 20px;
    margin-top: 20px;
    text-align: center;
    font-weight: 600;
}

.product-display {
    width: 100%;
    max-width: 400px;
    height: 700px;
    /* background: #f8f9fa; */
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.product-image {
    width: 200px;
    height: 280px;
    /*background: linear-gradient(135deg, #e2e8f0, #cbd5e1);*/
    border-radius: 100px 100px 20px 20px;
    position: relative;
    opacity: 0.9;
}

.product-image::before {
    content: "";
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 30px;
    background: #94a3b8;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
}

#default-configurator-image {
    width: 200px;
    height: 380px;
    background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
    border-radius: 100px 100px 20px 20px;
    position: relative;
    opacity: 0.9;
    margin: 0 auto;
    margin-top: 80px;
}

#default-configurator-image:before {
    content: "";
    position: absolute;
    top: -10%;
    left: 50%;
    transform: translateX(-50%);
    width: 34%;
    height: 20%;
    background: #94a3b8;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
}

.project-form{
    width: 100%;
    text-align: center;
}

.config-name {
    width: 100%;
    max-width: 400px;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    color: #94a3b8;
    text-align: center;
    background-color: rgba(255, 255, 255, 0.5);
    margin-bottom: 40px;
}

.action-buttons {
    display: flex;
    gap: 15px;
    width: 100%;
}

.action-login-container {
    text-align: center;
    display: none;
}
.action-login-container a {
    display: block;
    padding: 13px 16px;
    color: #1e3a8a;
    font-size: 14px;
    font-weight: 500;
}

.final-actions {
    display: flex;
    gap: 15px;
    width: 100%;
    margin-top: 10px;
}

.final-actions-mobile {
    display: none;
}

.btn {
    flex: 1;
    padding: 13px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-secondary {
    background: #62C1D1;
    color: white;
}

.btn-secondary:hover {
    background: #499BA9;
    color: white;
}

.btn-primary {
    background: #1e3a8a;
    color: white;
}

.btn-primary:hover {
    background: #1e40af;
}

.btn-secondary.btn-no-bg {
    background: none;
    color: #62C1D1;
}

.btn-secondary.btn-no-bg:hover {
    color: #499BA9;
}

.btn-primary.btn-no-bg {
    background: none;
    color: #1e3a8a;
}

.btn-primary.btn-no-bg:hover {
    color: #1e40af;
}

/* Right panel - Configuration */
.right-panel {
    flex: 1;
}

.config-section {
    margin-bottom: 30px;
}

.config-panel {
    background: white;
    border-radius: 12px;
    margin-bottom: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 1px solid #e2e8f0;
}

.config-panel.collapsed {
    max-height: 80px;
}

.config-panel.expanded {
    max-height: none;
}

.config-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    cursor: pointer;
    background: white;
}

.config-panel.collapsed .config-panel-header {
    border-bottom: none;
}

.config-panel-content {
    padding: 20px;
    transition: all 0.3s ease;
}

.config-panel.collapsed .config-panel-content {
    max-height: 0;
    padding: 0 20px;
    overflow: hidden;
}

.config-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.config-title {
    font-size: 20px;
    color: #62C1D1;
    font-weight: 600;
    margin: 0;
}

.filters-btn {
    display: none;
    padding: 0 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    align-items: center;
    gap: 5px;
}

.config-panel-content .filters {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.config-panel-content .filter-group {
    width: calc(33% - 10px);
}

.mobile-filter-panel .filter-group {
    margin-bottom: 20px;
}

.filter-label {
    display: none;
    font-size: 12px;
    color: #999;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.filter-select {
    width: 100%;
    padding: 10px;
    border: 1px solid #1e3a8a;
    border-radius: 6px;
    background: white;
    font-size: 14px;
    color: #1e3a8a;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 10px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
}

.product-grid-container {
    background: linear-gradient(170deg, #F2F5FF, #868DB7);
    padding: 17px 8px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.product-grid-container ::-webkit-scrollbar-thumb {
    background: #fff;
}

.product-grid-container ::-webkit-scrollbar-thumb:hover {
    background: #fff;
}
.product-grid-container ::-webkit-scrollbar-track {
    background: transparent;
}

.product-grid {
    padding: 3px 6px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 80px));
    grid-auto-rows: 80px;
    gap: 8px;
    max-height:230px;
    overflow-y: auto;
    overflow-x: hidden;
    max-width: 100%;
}

.product-item {
    width: 100%;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
}

.product-item:hover {
    background: rgba(255, 255, 255, 0.95);
    /*transform: translateY(-2px);*/
}

.product-item.selected {
    border-color: #1e3a8a;
    background: white;
}

.product-item.selected::after {
    content: "✓";
    position: absolute;
    top: 1px;
    right: 1px;
    width: 18px;
    height: 18px;
    background: #1e3a8a;
    color: white;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    transform-origin: bottom left;
}

.product-item img {
    width: 90%;
    height: 90%;
    object-fit: contain;
    opacity: 0.7;
}

.accessory-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.accessory-title {
    color: #62C1D1;
    font-size: 16px;
}

.view-btn {
    background: #62C1D1;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
}

.view-btn:hover {
    background: #499BA9;
    color: white;
}

.config-panel.expanded .view-btn {
    display: none;
}

.panel-toggle {
    display: none;
}

.resume-section {
    background: white;
    padding: 17px 8px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.resume-section ::-webkit-scrollbar-thumb {
    background: #F2F5FF;
}

.resume-section ::-webkit-scrollbar-thumb:hover {
    background: #F2F5FF;
}
.resume-section ::-webkit-scrollbar-track {
    background: transparent;
}

.resume-section-content {
    padding: 3px 6px;
    /*max-height:230px;*/
    overflow-y: auto;
    overflow-x: hidden;
    max-width: 100%;
}

.resume-title {
    padding: 0px 6px;
    font-size: 18px;
    margin-bottom: 15px;
    font-weight: 600;
}

.resume-item {
    margin-bottom: 15px;
}

.resume-label {
    font-weight: 600;
    margin-bottom: 5px;
}

.resume-text {
    font-size: 14px;
    line-height: 1.4;
}

.final-actions {
    display: flex;
    gap: 15px;
}

.final-actions .btn {
    flex: 1;
}

.final-actions-mentions {
    display: none;
    padding: 10px 20px;
    font-size: 14px;
}
.final-actions-mentions-ico {
    float: left;
    margin-right: 10px;
    margin-bottom: 10px;
    color : #62C1D1;
}

/* Mobile Styles */
@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
        gap: 0;
    }

    .final-actions-mentions {
        /* display: flex; */
    }

    .final-actions-desktop{
        display:none;
    }

    .final-actions-mobile {
        display: flex;
        flex-direction: column;
        gap: 10px;
        padding: 20px;
        border-top: 1px solid #e2e8f0;
        margin: 0 -20px -20px -20px;
    }

    .filters-btn {
        display: flex;
    }

    .config-panel-content .filters{
        display:none;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fit, minmax(70px, 70px));
        grid-auto-rows: 70px;
    }

}

@media (max-width: 480px) {

    .product-grid {
        grid-template-columns: repeat(auto-fit, minmax(70px, 70px));
        grid-auto-rows: 60px;
    }

}



/* Mobile Filter Overlay */
.mobile-filter-overlay {
    position: fixed;
    width: 100%;
    height: 100%;
    overflow: hidden;
    bottom: 0;
    left: 0;
    display: block;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
}

.mobile-filter-overlay.active {
    display: block;
}

.mobile-filter-panel {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 80%;
    max-width: 400px;
    color: #1e3a8a;
    background: #f8f9fa;
    padding: 20px;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.mobile-filter-panel.open {
    transform: translateX(0);
}

.mobile-filter-title {
    font-size: 20px;
}

.mobile-filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e2e8f0;
}

.close-filters {
    background: none;
    border: none;
    font-size: 25px;
    cursor: pointer;
}

.contenants-active-item {
    border: 2px solid #1e3a8a !important;
}

#configurator-container #container-img { z-index:100}
#configurator-container #pump-img { z-index:101}
#configurator-container #accessory1-img { z-index:102}
#configurator-container #accessory2-img { z-index:103}

[data-save-config]:disabled {
    opacity: 0.8;
    cursor: not-allowed;
}

#configurator-container {
    height: 700px;
    overflow: hidden; /* masque ce qui dépasse du container */
    position: relative; /* pour le positionnement absolu des images */
}

.configurator2 .embelia-conf-thumb {
    min-width: 400px;
    height: 700px;    
}

#configurator-container img {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(1.06);
    /* Marge de sécurité pour éviter de couper le contenu */
    margin-top: 19px;  /* marge supérieure minimale */
    margin-bottom: 50px;  /* marge inférieure minimale */    
}

.configurator-commands {
    position: absolute;
    bottom: 40px;
    z-index: 105;
}
