/* doc-project | projet/assets/css/motor-gallery-modal.css | styles dedies a la sur-modale galerie et fiche technique moteur avec ouverture depuis les boutons En savoir plus, y compris en mode fiche technique seule sans image, zone de selection V2 non bouton, boutons de details visibles, badges prix V2 et legacy, miniatures, image principale en contain, overlay sombre, accessibilite clavier et rendu responsive premium. */
.pcv2-motor-card {
    display: flex !important;
    flex-direction: column;
    height: auto !important;
    min-height: 100%;
    overflow: visible !important;
}

.pcv2-motor-card > .pcv2-choice-card__button {
    flex: 1 1 auto;
    width: 100%;
    cursor: pointer;
}

.pcv2-motor-card__select-zone:focus-visible {
    outline: 3px solid rgba(138, 90, 43, 0.32);
    outline-offset: 4px;
}

.pcv2-motor-card__price-badge,
.motor-card__price-badge {
    align-self: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 38px;
    margin: 14px auto 10px;
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    color: #24170f;
    font-size: 1.08rem;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.02em;
    box-shadow: 0 8px 18px rgba(36, 23, 15, 0.12);
}

.pcv2-motor-card.pcv2-is-selected .pcv2-motor-card__price-badge,
.motor-card.is-selected .motor-card__price-badge {
    background: #f7e4c7;
    color: #24170f;
}

.pcv2-motor-card__details,
.motor-card__details-button {
    width: calc(100% - 24px);
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    margin: 12px 12px 12px;
    justify-content: center;
    text-align: center;
    position: relative;
    z-index: 2;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto;
}

.motor-card__details-button {
    width: 100%;
    margin: 12px 0 0;
}

.pcv2-motor-card__zoom,
.motor-card__zoom-button {
    display: none !important;
}

.motor-gallery-modal[hidden] {
    display: none;
}

.motor-gallery-modal {
    position: fixed;
    inset: 0;
    z-index: 1150;
    display: grid;
    place-items: center;
    padding: 24px;
}

.motor-gallery-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(17, 13, 10, 0.82);
}

.motor-gallery-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(960px, 100%);
    height: min(90vh, 960px);
    max-height: min(90vh, 960px);
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow: auto;
    padding: 24px;
    color: var(--text, #1f1a17);
}

.motor-gallery-modal__close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 999px;
    background: #f4ede3;
    color: var(--accent-dark);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.motor-gallery-modal__header {
    flex: 0 0 auto;
    padding-right: 52px;
}

.motor-gallery-modal__header .eyebrow,
.motor-gallery-modal__header h2,
.motor-gallery-modal__header p,
#motor-gallery-title {
    color: var(--text, #1f1a17);
}

.motor-gallery-modal__subtitle {
    margin: 0;
    color: var(--muted);
}

.motor-gallery-modal__thumbs {
    flex: 0 0 auto;
    display: flex;
    gap: 10px;
    margin: 0;
    padding: 2px 2px 8px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.motor-gallery-modal__thumbs[hidden] {
    display: none;
}

.motor-gallery-modal__stage {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
}

.motor-gallery-modal__stage[hidden] {
    display: none !important;
}

.motor-gallery-modal__stage-media {
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: #eadfce;
}

.motor-gallery-modal__thumb {
    appearance: none;
    flex: 0 0 96px;
    display: block;
    width: 96px;
    padding: 0;
    border: 1px solid rgba(138, 90, 43, 0.18);
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    cursor: pointer;
}

.motor-gallery-modal__thumb:hover,
.motor-gallery-modal__thumb:focus-visible {
    border-color: rgba(138, 90, 43, 0.4);
    box-shadow: 0 0 0 3px rgba(138, 90, 43, 0.12);
    outline: none;
}

.motor-gallery-modal__thumb.is-active {
    border-color: rgba(138, 90, 43, 0.56);
    box-shadow: 0 0 0 3px rgba(138, 90, 43, 0.14);
}

.motor-gallery-modal__thumb-media {
    aspect-ratio: 4 / 3;
    min-height: 88px;
    background: #efe6da;
}

.motor-gallery-modal__thumb img {
    width: 100%;
    height: 100%;
}

#motor-gallery-caption {
    flex: 0 0 auto;
    color: var(--muted);
    text-align: center;
}

.motor-gallery-modal__technical {
    flex: 0 0 auto;
    display: grid;
    gap: 12px;
    padding: 18px;
    border: 1px solid rgba(138, 90, 43, 0.16);
    border-radius: 18px;
    background: rgba(255, 252, 247, 0.92);
    color: var(--text, #1f1a17);
}

.motor-gallery-modal__technical[hidden] {
    display: none;
}

.motor-gallery-modal__technical-title,
.motor-gallery-modal__technical-subtitle,
.motor-gallery-modal__technical p,
.motor-gallery-modal__technical li,
.motor-gallery-modal__technical dt,
.motor-gallery-modal__technical dd {
    color: var(--text, #1f1a17);
}

.motor-gallery-modal__technical-title {
    margin: 0;
    font-size: 1.22rem;
}

.motor-gallery-modal__technical-subtitle {
    margin: 6px 0 0;
    font-size: 1rem;
}

.motor-gallery-modal__technical-intro,
.motor-gallery-modal__technical-notes {
    margin: 0;
    color: var(--muted);
}

.motor-gallery-modal__technical-table {
    display: grid;
    gap: 8px;
    margin: 0;
}

.motor-gallery-modal__technical-row {
    display: grid;
    grid-template-columns: minmax(120px, 0.42fr) minmax(0, 1fr);
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #fff;
}

.motor-gallery-modal__technical-row dt {
    font-weight: 800;
}

.motor-gallery-modal__technical-row dd {
    margin: 0;
}

.motor-gallery-modal__technical-list {
    display: grid;
    gap: 6px;
    margin: 0;
    padding-left: 20px;
}

@media (max-width: 720px) {
    .motor-gallery-modal {
        padding: 12px;
    }

    .motor-gallery-modal__dialog {
        padding: 18px;
    }

    .motor-gallery-modal__thumb {
        flex-basis: 84px;
        width: 84px;
    }

    .motor-gallery-modal__technical-row {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .pcv2-motor-card__details {
        width: calc(100% - 18px);
        margin-right: 9px;
        margin-left: 9px;
    }
}