model-viewer {
    width: 100%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
	border: 1px solid #D3D3D3;
    border-radius: 9px;
    background-color: white;
    --progress-bar-color: rgb(255, 136, 0);
}

/* ---- Forcer le ratio 16:9 via le conteneur ---- */
.produk3d-model-viewer-container {
    position: relative; /* Déjà défini, à conserver */
    width: 100%;
    padding-top: 56.25%;
    overflow: hidden;     /* Pour éviter que le model-viewer dépasse */
}

/* ---- Positionner le model-viewer dans le conteneur ---- */
.produk3d-model-viewer-container model-viewer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Conservez ou réintégrez ici les autres styles souhaités */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border-radius: 9px;
    background-color: white;
    --progress-bar-color: rgb(141, 197, 63);
	overflow: hidden;
}

.model-viewer-hover-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 15%;
    background: linear-gradient(to top, rgba(0,0,0,0) 0%, rgba(0,0,0,0.1) 90%);
    pointer-events: none;
    transition: opacity 0.3s ease-in-out;
    will-change: opacity;
    opacity: 0;
    border-radius: 8px;
}


model-viewer::part(canvas) {
    outline: none;
    box-shadow: none;
}

model-viewer:focus {
    outline: none;
    box-shadow: none;
}

#start-animation {
    z-index: 200;
}

.progress-bar {
    position: relative;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: transparent;
    z-index: 99;
}

.circular {
    position: fixed;
    width: 130px;
    height: 130px;
    padding: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    background: linear-gradient(0deg, rgb(255, 255, 255) 33%, rgb(141, 197, 63) 100%);
    animation: spin .8s linear 0s infinite;
}

.circular-core {
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

@keyframes spin {
    from {
      transform: rotate(0);
    }
    to{
      transform: rotate(359deg);
    }
}

.update-bar {
    display: none;
}

#button-load {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: auto !important;
    height: auto !important;
    max-width: 120px;
    max-height: 120px;
    border: 2px solid black;
    border-radius: 50%;
    display: flex;
    text-align: center;
    justify-content: center;
    align-items: center;
    background-color: rgb(255, 255, 255);
    color: #8DC53F;
    font-weight: bold;
    cursor: pointer;
    z-index: 100;
}

#button-load:hover {
    background: #fff;
    box-shadow: 0px 2px 20px 10px #8DC53F;
    color: #000;
}

/*
#button-load-bake {
    background-repeat: no-repeat;
    background-size: 24px 24px;
    background-position: 6% 50%;
    background-color: #000;
    color: white;
    cursor: pointer;
    border-radius: 6px;
    display: inline-block;
    padding: 10px 18px 9px 40px;
    font-weight: 500;
    box-shadow: 0 0 8px rgba(0,0,0,.2), 0 0 4px rgba(0,0,0,.25);
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate3d(-50%, -50%, 0);
    z-index: 100;
}*/

#start-animation {
    z-index: 200; /* Assurer un z-index supérieur pour la fonctionnalité */
}

#button-load.hidden {
    display: none;
}

.controls {
	/* FAIT DISPARAITRE LE BAR DE CONTROLE */
    visibility: hidden !important; 
	opacity: 0 !important;
	/* FAIT DISPARAITRE LE BAR DE CONTROLE */
	position: absolute;
    bottom: 0 !important;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    padding: 10px 0;
    border-radius: 0 0 12px 12px;
    transition: opacity 0.4s ease-in-out;
    opacity: 0;
    pointer-events: none;
}

.selector {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 10px;
    transform: translateY(-10px);
    width: 16rem;
    max-height: 200px;
    overflow-y: auto;
    background-color: white;
    border: 1px solid #ccc;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 1;
    border-radius: 5px;
    overflow-y: auto;
}


.selector-wrapper {
    position: relative;
    display: inline-block;
}

.selector-wrapper .svg-button {
    cursor: pointer;
}

.selector-wrapper.active .selector {
    display: block;
}

.selector-wrapper:hover .selector {
    opacity: 1;
    pointer-events: auto;
    color: black;
}

.selector-wrapper.active select {
    display: block; 
}

.svg-controls.right {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    flex-direction: column;
    z-index: 10;
}

.svg-button {
    width: 35px;
    height: 35px;
    margin: 0 14px;
    border: none;
	background-color: transparent;
    cursor: pointer;
	background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    outline: none;
    box-shadow: none;
}

.svg-button.part-selector-icon {
	display: none;
    /* background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 187.5 187.5'%3E%3Ccircle cx='93.75' cy='93.75' r='80' fill='none' stroke='%23FFFFFF' stroke-width='10'/%3E%3Cpath d='M93.75 13.75 A80 80 0 0 1 173.75 93.75 L93.75 93.75 Z' fill='%23FFFFFF'/%3E%3C/svg%3E"); */
}

.svg-button.variant-selector-icon {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 187.5 187.5'%3E%3Crect x='43.75' y='43.75' width='100' height='100' fill='none' stroke='%23FFFFFF' stroke-width='10' transform='rotate(45 93.75 93.75)'/%3E%3Crect x='58.75' y='58.75' width='70' height='70' fill='none' stroke='%23FFFFFF' stroke-width='8' transform='rotate(45 93.75 93.75)'/%3E%3Crect x='73.75' y='73.75' width='40' height='40' fill='none' stroke='%23FFFFFF' stroke-width='6' transform='rotate(45 93.75 93.75)'/%3E%3C/svg%3E");
}

.svg-button.texture-selector {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' version='1.0' viewBox='0 0 187.5 187.5'%3E%3Cdefs%3E%3CclipPath id='a'%3E%3Cpath d='M7 7h178.21v178.059H7Zm0 0'/%3E%3C/clipPath%3E%3C/defs%3E%3Cg clip-path='url(%23a)'%3E%3Cpath fill='%23FFFFFF' d='M85.91 8.258C45.543 13.102 12.441 45.395 7.598 86.566 1.949 139.848 43.93 185.06 96.402 185.06c4.848 0 9.692-.805 13.727-2.422 20.183-5.653 29.062-30.676 16.953-48.438-6.457-8.883.809-21.797 12.11-21.797h29.87c8.88 0 16.149-7.265 16.149-16.148 0-52.477-45.211-94.457-99.3-87.996Zm10.492 160.656c-8.879 0-16.144-7.266-16.144-16.148 0-8.88 7.265-16.145 16.144-16.145 8.883 0 16.149 7.266 16.149 16.145 0 8.882-7.266 16.148-16.149 16.148ZM148.88 88.18c-6.457 0-12.11-5.649-12.11-12.11 0-6.457 5.653-12.11 12.11-12.11 6.46 0 12.11 5.653 12.11 12.11 0 6.461-5.65 12.11-12.11 12.11Zm-32.293-32.293c-6.457 0-12.11-5.649-12.11-12.11 0-6.457 5.653-12.109 12.11-12.109 6.46 0 12.11 5.652 12.11 12.11 0 6.46-5.65 12.109-12.11 12.109Zm-40.363 0c-6.461 0-12.11-5.649-12.11-12.11 0-6.457 5.649-12.109 12.11-12.109 6.457 0 12.109 5.652 12.109 12.11 0 6.46-5.652 12.109-12.11 12.109ZM43.93 80.109c-6.461 0-12.11-5.652-12.11-12.109 0-6.46 5.649-12.113 12.11-12.113 6.457 0 12.11 5.652 12.11 12.113 0 6.457-5.653 12.11-12.11 12.11Zm-8.075 40.364c-6.457 0-12.109-5.649-12.109-12.11 0-6.457 5.652-12.11 12.11-12.11 6.456 0 12.109 5.653 12.109 12.11 0 6.461-5.653 12.11-12.11 12.11Zm0 0'/%3E%3C/g%3E%3C/svg%3E");
}

.svg-button.lighting-selector {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='250' height='250' version='1.0' viewBox='0 0 187.5 187.5'%3E%3Cdefs%3E%3CclipPath id='a'%3E%3Cpath d='M11.746 13.844h163.816V177.66H11.746Zm0 0'/%3E%3C/clipPath%3E%3C/defs%3E%3Cg clip-path='url(%23a)'%3E%3Cpath fill='%23FFFFFF' d='M156.238 13.426H30.23c-.62 0-1.238.031-1.851.094-.617.058-1.23.152-1.836.273a17.78 17.78 0 0 0-1.797.453c-.594.18-1.176.387-1.746.625-.57.238-1.129.5-1.676.793a18.596 18.596 0 0 0-3.078 2.059 18.923 18.923 0 0 0-6.918 14.605v126.008c0 .621.031 1.238.094 1.851.058.618.152 1.227.273 1.836.121.606.27 1.207.453 1.797.18.594.387 1.176.625 1.746.235.57.5 1.13.793 1.676a18.817 18.817 0 0 0 3.305 4.453 18.922 18.922 0 0 0 13.36 5.543h126.007c.621 0 1.239-.031 1.852-.093a18.89 18.89 0 0 0 3.633-.727c.593-.18 1.175-.387 1.746-.625.57-.238 1.129-.5 1.676-.793a18.817 18.817 0 0 0 4.453-3.305 18.922 18.922 0 0 0 5.543-13.36V32.329a19.255 19.255 0 0 0-.367-3.688 18.89 18.89 0 0 0-.454-1.796 18.191 18.191 0 0 0-.625-1.746 19.28 19.28 0 0 0-.793-1.676 18.596 18.596 0 0 0-2.058-3.078 18.922 18.922 0 0 0-14.606-6.918ZM23.93 32.328a6.2 6.2 0 0 1 .48-2.41c.16-.383.352-.746.582-1.09.23-.344.492-.66.785-.953.293-.293.61-.555.953-.785a6.342 6.342 0 0 1 2.27-.942 6.2 6.2 0 0 1 1.23-.12h126.008a6.2 6.2 0 0 1 2.41.48c.383.16.747.351 1.09.582.344.23.66.492.953.785.293.293.555.61.786.953.226.344.421.707.582 1.09.156.383.277.773.359 1.18a6.2 6.2 0 0 1 .121 1.23v65.035c-.27-.207-.586-.336-.86-.527a34.735 34.735 0 0 0-2.327-1.43 33.93 33.93 0 0 0-2.442-1.226c-.832-.371-1.68-.711-2.539-1.016-.86-.3-1.73-.566-2.613-.797a32.727 32.727 0 0 0-2.668-.57 31.928 31.928 0 0 0-2.711-.344c-.91-.078-1.82-.117-2.73-.117-.91.004-1.82.043-2.731.117-.906.078-1.813.195-2.707.352a32.01 32.01 0 0 0-7.82 2.395 32.862 32.862 0 0 0-4.766 2.66 31.845 31.845 0 0 0-2.195 1.624c-.711.57-1.395 1.172-2.055 1.805l-16.8 16.8a16.569 16.569 0 0 1-2.454 1.938 16.413 16.413 0 0 1-5.773 2.316 16.288 16.288 0 0 1-6.223 0 16.374 16.374 0 0 1-2.996-.882 16.384 16.384 0 0 1-2.777-1.434 16.774 16.774 0 0 1-2.454-1.937 31.76 31.76 0 0 0-2.3-2.047 31.733 31.733 0 0 0-5.148-3.375c-.91-.48-1.84-.914-2.794-1.3-.949-.388-1.918-.731-2.906-1.024a30.324 30.324 0 0 0-2.988-.739 31.025 31.025 0 0 0-3.051-.445 31.112 31.112 0 0 0-6.152 0c-1.024.098-2.04.246-3.051.445a30.324 30.324 0 0 0-2.988.739c-.989.293-1.958.636-2.907 1.023-.953.387-1.883.82-2.793 1.301a31.733 31.733 0 0 0-5.148 3.375 31.76 31.76 0 0 0-2.3 2.047L23.93 130.53Zm0 0'/%3E%3C/g%3E%3Cpath fill='%23FFFFFF' d='M99.535 61.73c0 .754-.039 1.512-.113 2.262a22.807 22.807 0 0 1-.883 4.442 22.76 22.76 0 0 1-2.898 6.129 22.682 22.682 0 0 1-1.352 1.824 22.846 22.846 0 0 1-1.52 1.68 23.764 23.764 0 0 1-1.68 1.519c-.585.48-1.19.93-1.823 1.352a23.412 23.412 0 0 1-3.992 2.137 23.087 23.087 0 0 1-6.579 1.644c-.75.074-1.507.113-2.261.113-.758 0-1.512-.039-2.266-.113a22.807 22.807 0 0 1-4.441-.883 23.087 23.087 0 0 1-2.133-.762 23.412 23.412 0 0 1-3.996-2.136 23.595 23.595 0 0 1-3.5-2.872 23.82 23.82 0 0 1-1.524-1.68 23.66 23.66 0 0 1-1.351-1.823 23.842 23.842 0 0 1-1.164-1.942 23.378 23.378 0 0 1-1.735-4.187 23.5 23.5 0 0 1-.55-2.2 23.01 23.01 0 0 1-.441-4.504 23.09 23.09 0 0 1 .44-4.507 23.5 23.5 0 0 1 .551-2.2 23.305 23.305 0 0 1 2.898-6.129 22.984 22.984 0 0 1 2.875-3.5 22.983 22.983 0 0 1 5.446-4.039 23.378 23.378 0 0 1 4.184-1.734 22.807 22.807 0 0 1 6.707-.992 23.01 23.01 0 0 1 10.89 2.726c.664.356 1.313.747 1.942 1.165a22.927 22.927 0 0 1 5.023 4.554 23.302 23.302 0 0 1 2.52 3.766c.355.668.68 1.348.968 2.047a23.162 23.162 0 0 1 1.313 4.336c.148.742.258 1.488.332 2.242.074.754.113 1.508.113 2.265Zm0 0'/%3E%3C/svg%3E");
}

.svg-button.enlarge {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='250' height='250' version='1.0' viewBox='0 0 187.5 187.5'%3E%3Cdefs%3E%3CclipPath id='a'%3E%3Cpath d='M13.875 13.875h159.324v159.324H13.875Zm0 0'/%3E%3C/clipPath%3E%3C/defs%3E%3Cg clip-path='url(%23a)'%3E%3Cpath fill='%23fff' d='M31.566 13.875c-4.617 0-9.328 1.691-12.664 5.027-3.336 3.336-5.027 8.047-5.027 12.664v35.391h17.691v-35.39h35.391V13.874Zm88.47 0v17.691h35.39v35.391h17.691v-35.39c0-4.618-1.691-9.329-5.027-12.665-3.336-3.336-8.047-5.027-12.664-5.027ZM13.874 120.035v35.39c0 4.618 1.691 9.329 5.027 12.665 3.336 3.336 8.047 5.027 12.664 5.027h35.391v-17.691h-35.39v-35.39Zm141.55 0v35.39h-35.39v17.692h35.39c4.618 0 9.329-1.691 12.665-5.027 3.336-3.336 5.027-8.047 5.027-12.664v-35.39Zm0 0'/%3E%3C/g%3E%3C/svg%3E");
}

.svg-button.reduce {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='250' height='250' version='1.0' viewBox='0 0 187.5 187.5'%3E%3Cdefs%3E%3CclipPath id='a'%3E%3Cpath d='M13.457 13.457H79V79H13.457Zm0 0'/%3E%3C/clipPath%3E%3CclipPath id='b'%3E%3Cpath d='M108 13.457h65.531V79H108Zm0 0'/%3E%3C/clipPath%3E%3CclipPath id='c'%3E%3Cpath d='M108 108h65.531v65.531H108Zm0 0'/%3E%3C/clipPath%3E%3CclipPath id='d'%3E%3Cpath d='M13.457 108H79v65.531H13.457Zm0 0'/%3E%3C/clipPath%3E%3C/defs%3E%3Cg clip-path='url(%23a)'%3E%3Cpath fill='%23fff' d='M59.621 13.445v46.176H13.445v18.473h64.649V13.445Zm0 0'/%3E%3C/g%3E%3Cg clip-path='url(%23b)'%3E%3Cpath fill='%23fff' d='M173.531 59.621h-46.18V13.445h-18.468v64.649h64.648Zm0 0'/%3E%3C/g%3E%3Cg clip-path='url(%23c)'%3E%3Cpath fill='%23fff' d='M127.352 173.531v-46.18h46.18v-18.468h-64.65v64.648Zm0 0'/%3E%3C/g%3E%3Cg clip-path='url(%23d)'%3E%3Cpath fill='%23fff' d='M13.445 127.352h46.176v46.18h18.473v-64.65H13.445Zm0 0'/%3E%3C/g%3E%3C/svg%3E");
}


.svg-button.play {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' id='Calque_1' viewBox='0 0 50 50'%3E%3Cdefs%3E%3CclipPath id='clippath'%3E%3Cpath d='M26.39 13.8h19.34v32.89H26.39z' class='cls-2'/%3E%3C/clipPath%3E%3CclipPath id='clippath-1'%3E%3Cpath d='M4.23 13.8h19.25v32.89H4.23z' class='cls-2'/%3E%3C/clipPath%3E%3Cstyle%3E.cls-1%7Bfill:%23fff;fill-rule:evenodd%7D.cls-2%7Bfill:none%7D%3C/style%3E%3C/defs%3E%3Cpath d='m24.81 3.31 18.84 8.3-18.84 8.3-18.54-8.3 18.54-8.3Z' class='cls-1'/%3E%3Cpath d='M45.73 14.06v23.82l-19.25 8.55V22.61l19.25-8.55Z' class='cls-1' style='clip-path:url(%23clippath)'/%3E%3Cpath d='m4.23 14.07 19.25 8.62v23.74L4.23 37.88V14.07Z' class='cls-1' style='clip-path:url(%23clippath-1)'/%3E%3C/svg%3E");
}

.svg-button.pause {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' id='Calque_1' viewBox='0 0 50 50'%3E%3Cdefs%3E%3CclipPath id='clippath'%3E%3Cpath d='M23.29 11.7h21.66v35.25H23.29z' class='cls-2'/%3E%3C/clipPath%3E%3CclipPath id='clippath-1'%3E%3Cpath d='M5.05 11.7h21.46v35.25H5.05z' class='cls-2'/%3E%3C/clipPath%3E%3CclipPath id='clippath-2'%3E%3Cpath d='M5.05 3.05h39.9v20.36H5.05z' class='cls-2'/%3E%3C/clipPath%3E%3Cstyle%3E.cls-1%7Bfill:%23fff;fill-rule:evenodd%7D.cls-2%7Bfill:none%7D%3C/style%3E%3C/defs%3E%3Cpath d='M44.76 13.23c0-.52-.27-1.01-.71-1.29-.44-.28-1-.31-1.47-.09l-18.31 8.56c-.54.25-.88.79-.88 1.38v23.54c0 .52.27 1.01.71 1.29.44.28.99.32 1.47.09l18.31-8.56c.54-.25.88-.79.88-1.38V13.23Zm-3.05 2.4V35.8l-15.26 7.13V22.76l15.26-7.13Z' class='cls-1' style='clip-path:url(%23clippath)'/%3E%3Cpath d='M7.26 11.85c-.47-.22-1.03-.19-1.47.09-.44.28-.71.76-.71 1.29v23.54c0 .59.34 1.13.88 1.38l18.31 8.56c.47.22 1.03.19 1.47-.09.44-.28.71-.77.71-1.29V21.79c0-.59-.34-1.13-.88-1.38L7.26 11.85Zm.88 3.78 15.26 7.13v20.17L8.14 35.8V15.63Z' class='cls-1' style='clip-path:url(%23clippath-1)'/%3E%3Cpath d='M25.42 3.29a1.53 1.53 0 0 0-1.29 0L5.96 11.85c-.53.25-.87.79-.87 1.38s.34 1.13.87 1.38l18.17 8.56c.41.19.88.2 1.29 0l18.46-8.56c.54-.25.88-.79.88-1.38s-.34-1.13-.88-1.38L25.42 3.29Zm-.63 3.07 14.83 6.88-14.83 6.87-14.59-6.87 14.59-6.88Z' class='cls-1' style='clip-path:url(%23clippath-2)'/%3E%3C/svg%3E");
}

/*
.svg-button.play {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='250' height='250' version='1.0' viewBox='0 0 187.5 187.5'%3E%3Cdefs%3E%3CclipPath id='a'%3E%3Cpath d='M21.79 12h143.616v163H21.79Zm0 0'/%3E%3C/clipPath%3E%3C/defs%3E%3Cg clip-path='url(%23a)'%3E%3Cpath fill='%23fff' d='M160.293 84.906 37.031 13.746a10.096 10.096 0 0 0-10.11 0 10.091 10.091 0 0 0-5.054 8.75v142.34c0 3.613 1.926 6.95 5.055 8.754a9.996 9.996 0 0 0 5.055 1.355c1.746 0 3.488-.457 5.054-1.355l123.262-71.164a10.092 10.092 0 0 0 5.05-8.754c0-3.613-1.921-6.953-5.05-8.766Zm0 0'/%3E%3C/g%3E%3C/svg%3E");
}

.svg-button.pause {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='250' height='250' version='1.0' viewBox='0 0 187.5 187.5'%3E%3Cdefs%3E%3CclipPath id='a'%3E%3Cpath d='M39.48 12.418H76v162.316H39.48Zm0 0'/%3E%3C/clipPath%3E%3CclipPath id='b'%3E%3Cpath d='M111 12.418h36.191v162.316H111Zm0 0'/%3E%3C/clipPath%3E%3C/defs%3E%3Cg clip-path='url(%23a)'%3E%3Cpath fill='%23fff' d='M39.48 21.469a9.004 9.004 0 0 1 9.004-9.004h18.004a9.004 9.004 0 0 1 9.004 9.004v144.054c0 4.973-4.031 9-9.004 9H48.484c-4.972 0-9.004-4.027-9.004-9Zm0 0'/%3E%3C/g%3E%3Cg clip-path='url(%23b)'%3E%3Cpath fill='%23fff' d='M111.508 21.469c0-4.973 4.031-9.004 9-9.004h18.008a9.004 9.004 0 0 1 9.004 9.004v144.054c0 4.973-4.032 9-9.004 9h-18.008a9 9 0 0 1-9-9Zm0 0'/%3E%3C/g%3E%3C/svg%3E");
}

*/
/* Réinitialise l’apparence des boutons SVG dans le container */
.produk3d-model-viewer-container button.svg-button {
  -webkit-appearance: none;
  appearance: none;
  background-color: transparent !important;
  border: none;
  outline: none;
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
}

/* En hover, aucun fond ni bord ne doit apparaître, uniquement l’animation (définie par @keyframes pulse) */
.produk3d-model-viewer-container button.svg-button:hover {
  background-color: transparent !important;
  border: none;
  box-shadow: none !important;
}

/* Dans le mode fullscreen, le bouton de réduction (reduce) doit être bien positionné et cliquable */
:fullscreen .svg-controls .svg-button.reduce {
  z-index: 1000; /* Assurez-vous qu'il est au-dessus des autres éléments */
}

.svg-button:hover {
    animation: pulse 0.5s ease-in-out 1;
}
model-viewer:hover + .controls,
.controls:hover {
    opacity: 1;
    pointer-events: auto;
}

#animation-control {
    display: none !important;
}


.controls button:hover,
.controls select:hover {
    background-color: #0056b3;
    color: #fff;
}

.option {
    cursor: pointer;
    padding-left: 5px;
}

.option:hover {
    background-color: #bbbbbb;
}

.produk3d-viewer-fullscreen {
    padding: 10px;
    background-color: #fff;
    border: 2px solid #0056b3;
    color: #0056b3;
    border-radius: 17px;
    cursor: pointer;
    display: block;
}

.produk3d-viewer-fullscreen:hover {
    background-color: #0056b3;
    color: #fff;
}

/* Styles par défaut : masquer le bouton */
.ar-button {
    display: none;
}

/* Styles pour les appareils mobiles : afficher le bouton */
@media only screen and (max-width: 767px) {
    .ar-button {
        display: block;
        background-color: white;
        border-radius: 4px;
        border: none;
        position: absolute;
        top: 20px;
        right: 16px;
    }
}

/*overlay */

.overlay-controls {
    position: absolute;
    bottom: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 0;
    border-radius: 0 0 12px 12px;
    transition: opacity 0.3s ease-in-out;
    opacity: 0;
}

.disabled {
    background-color: #f0f0f0;
    color: #ccc;
    cursor: not-allowed;
}

button.animation-active {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='250' height='250' version='1.0' viewBox='0 0 187.5 187.5'%3E%3Cdefs%3E%3CclipPath id='a'%3E%3Cpath d='M21.79 12h143.616v163H21.79Zm0 0'/%3E%3C/clipPath%3E%3C/defs%3E%3Cg clip-path='url(%23a)'%3E%3Cpath fill='%23fff' d='M160.293 84.906 37.031 13.746a10.096 10.096 0 0 0-10.11 0 10.091 10.091 0 0 0-5.054 8.75v142.34c0 3.613 1.926 6.95 5.055 8.754a9.996 9.996 0 0 0 5.055 1.355c1.746 0 3.488-.457 5.054-1.355l123.262-71.164a10.092 10.092 0 0 0 5.05-8.754c0-3.613-1.921-6.953-5.05-8.766Zm0 0'/%3E%3C/g%3E%3C/svg%3E");
    color: #fff;
    outline: none;
    box-shadow: none;
}

#start-animation {
    display: none;
}
.controls label {
    display: block;
    margin: 10px 0;
	color: white;
}

.background-toggle {
    visibility: hidden !important; /* FAIT DISPARAITRE LE BOUTON BACKGROUND */
	opacity: 0 !important; /* FAIT DISPARAITRE LE BOUTON BACKGROUND */
	position: absolute;
    color:white;
    top: 15px;
    left: 15px;
    background: rgba(255, 255, 255, 0.1); 
    padding: 5px 10px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    z-index: 20;
}

.background-toggle label {
    padding-left: 2px;
}

.background-toggle:hover {
    background: rgba(255, 255, 255, 0.5); 
    color:black!important;
}


.background-toggle input[type="checkbox"] {
    margin-right: 4px;
    background: rgba(255, 255, 255, 0.4);
    outline: none;
    box-shadow: none; 
}

#loader {
    display:none;
    border: 16px solid #f3f3f3; 
    border-top: 16px solid #3498db; 
    border-radius: 50%;
    width: 120px;
    height: 120px;
    animation: spin 2s linear infinite;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9000;
}


/* Hotspot */


model-viewer::part(hotspot) {
  position: relative;
  z-index: 2;
}

model-viewer::part(dot) {
  position: relative;
  z-index: 1;
}

.dot {
  display: none;
}



model-viewer button.hotspot {
  z-index: 2;
}

model-viewer button.anno-dot {
  z-index: 1;
}
/*
.hotspot {
  display: block;
  background-color: #ffffff;
  width: 28px;
  height: 28px;
  border-radius: 17px;
  border: 1px solid #D3D3D3;
  box-sizing: border-box;
  pointer-events: auto;
}
*/
animation-p3d animation {
    box-shadow: rgba(0, 0, 0, 0.25) 0px 2px 4px 0px;
    transform: scale(1);
}

.hotspot {
    opacity: 1;
	color:white;
	font-weight:600;
    box-sizing: border-box;
    position: relative;
    display: flex;
    flex-direction: column;
    -webkit-box-pack: center;
    justify-content: center;
    -webkit-box-align: center;
    align-items: center;
    transition: opacity 0.3s;
    padding: 0px;
    border: medium solid #D3D3D3;
    border-radius: 50%;
    cursor: pointer;
    animation: 0.8s ease 0s 1 normal forwards running animation-brga1k;
    box-shadow: rgba(0, 0, 0, 0.25) 0px 2px 4px;
    background-color: rgba(178, 216, 125, 0.6);
    width: 24px;
    height: 24px;
}
.hotspot:hover {
  background-color: #8DC53F;
}

.hotspot:active {
  background-color: #8DC53F;
}
model-viewer button.anno-dot {
	display:none;
}


@media (max-width: 767px) {
	.hotspot {
		font-weight: 500;
		font-size: 10px;
		border: 1px solid #D3D3D3;
		background-color: rgba(178, 216, 125, 0.8);
		width: 10px;
		height: 10px;
	}
}

/*
model-viewer button.anno-dot {
  all: unset;
  appearance: none;
  box-sizing: border-box;
  position: relative;
  pointer-events: auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #fff;
  z-index: 0;
}



model-viewer button.anno-dot::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background-color: #000;
  pointer-events: none;
}

model-viewer::part(hotspot).anno-dot::after {
  content: '';
  position: absolute;
  inset: 0;
  margin: auto;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: #000;
  pointer-events: none;
}

*/
model-viewer button.opt-spot {
  opacity: 0.0;
  background-color: rgba(1, 1, 1, 0.0)
  transform: translate(-50%, -50%);
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  pointer-events: none;

}

model-viewer button.opt-spot::after {
  opacity: 0.0;
  background-color: rgba(1, 1, 1, 0.0)
  transform: translate(-50%, -50%);
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  pointer-events: none;

}


.annotation {
  background-color: #ffffff;
  color: #000000;
  position: absolute;
  transform: translate(10px, 10px);
  border-radius: 10px;
  padding: 20px;
}

.lineContainer {
  pointer-events: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.line {
  stroke: #8dc63f;
  stroke-width: 2;
  stroke-dasharray: 4;
}

#annotations-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

:not(:defined)>* {
  display: none;
}




/*fullscreen */
:fullscreen model-viewer {
    z-index: 1;
}

:fullscreen model-viewer::part(canvas) {
    z-index: 1;
}


:fullscreen .controls {
    position: fixed;
    bottom: 20px;
    padding: 20px 0;
    left: 50%;
    transform: translateX(-50%);
	z-index: 2000;
}

:fullscreen .selector {
    transform: translateY(-20px);
    font-size: 17px;
    padding: 5px 0;
}


:fullscreen model-viewer{   
    background-color: white;
}


:fullscreen .svg-button {
    width: 50px;
    height: 50px;
    margin: 0 22px;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}


@media (min-width: 769px) and (max-width: 1024px) {
    .controls {
        flex-direction: row;
    }

    :fullscreen select {
        font-size: 21px;
    }

    .produk3d-viewer-fullscreen, .close-fullscreen-btn {
        border-radius: 8px;
    }
}

@media (max-width: 768px) {
    /*.produk3d-model-viewer-container {
        padding: 0 5px; 
    }
    */
    model-viewer {
        box-shadow: none;
        border: none;
    }

    .controls {
        padding: 13px 0;
    }

    .selector {
        transform: translateY(-12px);
        font-size: 16px;
        padding: 5px 0;
    } 
	#lighting-selector .selector {
		width: 14rem;
	}
    #color-selector .selector {
		width: 20rem;
	}	
    .svg-controls.right {
        top: 15px;
        right: 1px;
    }

    .svg-button:hover {
        animation: none;
    }
    
    .svg-button {
        width: 30px;
        height: 30px;
    }
    .background-toggle {
        top: 13px;
        left: 13px;
        background: none;
        font-size: 15px;
    }
    :fullscreen model-viewer{
        border-radius: 0px;
    }

    :fullscreen select {
        margin: 0px;
        font-size: 19px;
    }
    :fullscreen .controls {
        border-radius: 0px;
    }  
    :fullscreen .svg-button {
        width: 32px;
        height: 32px;
    }
}