/**
 * LMN8 3D Viewer — styles frontend
 */

.lmn8-3d-viewer-wrap {
    width: 100%;
    margin-bottom: 1.5em;
    position: relative;
}

.lmn8-3d-viewer-wrap model-viewer {
    width: 100%;
    height: var(--lmn8-3d-height, 500px);
    background-color: transparent;
    display: block;
}

/* Masquer la barre de progression native (on a notre propre loader) */
.lmn8-3d-viewer-wrap model-viewer::part(default-progress-bar) {
    display: none;
}

/* ── Loader ──────────────────────────────────────────────────────────────── */

.lmn8-3d-loader {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    background: transparent;
    color: #fff;
    font-family: inherit;
}

/* Anneau tournant */
.lmn8-3d-loader__ring {
    position: relative;
    width: 64px;
    height: 64px;
}

.lmn8-3d-loader__ring::before,
.lmn8-3d-loader__ring::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid transparent;
}

/* Anneau de fond fixe */
.lmn8-3d-loader__ring::before {
    border-color: rgba(0, 0, 0, 0.1);
}

/* Anneau animé rouge */
.lmn8-3d-loader__ring::after {
    border-top-color: #e2001a;
    animation: lmn8-spin 0.9s linear infinite;
}

/* Points "3D" au centre */
.lmn8-3d-loader__dots {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.lmn8-3d-loader__dots span {
    display: block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #e2001a;
    animation: lmn8-pulse 1.2s ease-in-out infinite;
}

.lmn8-3d-loader__dots span:nth-child(2) { animation-delay: 0.2s; }
.lmn8-3d-loader__dots span:nth-child(3) { animation-delay: 0.4s; }

/* Texte */
.lmn8-3d-loader__label {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(0, 0, 0, 0.45);
}

/* Barre de progression */
.lmn8-3d-loader__bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background: rgba(0, 0, 0, 0.08);
    transition: width 0.3s ease;
}

@keyframes lmn8-spin {
    to { transform: rotate(360deg); }
}

@keyframes lmn8-pulse {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40%            { transform: scale(1);   opacity: 1;   }
}

/* ── Bouton réinitialiser ────────────────────────────────────────────────── */

.lmn8-3d-reset {
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #e2001a;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, transform 0.15s ease;
    z-index: 10;
}

.lmn8-3d-reset:hover  { background: #b80016; }
.lmn8-3d-reset:active { transform: scale(0.93); }

.lmn8-3d-reset svg {
    width: 18px;
    height: 18px;
    stroke: #fff;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
