/* ── Vitrine Polo : aperçu + galerie + barre couleurs (s'appuie sur polo.css) ── */
.showcase {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    align-items: start;
}

/* Choix du modèle, en haut de la page */
.showcase-models { grid-column: 1 / -1; display: grid; gap: 8px; min-width: 0; }
.showcase-models[hidden] { display: none; }

/* Galerie */
.gallery { display: grid; gap: 10px; }
.gallery-stage {
    position: relative;
    aspect-ratio: 4 / 5;
    border-radius: 12px;
    overflow: hidden;
    background: #cfcfcf;
    touch-action: pan-y;
}
.gallery-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    opacity: 0;
    transition: opacity .6s ease;
}
.gallery-img.is-active { opacity: 1; z-index: 1; }
/* Entrée : glisse légèrement depuis le côté + léger zoom arrière, puis lent zoom avant (effet Ken Burns) */
.gallery-img.is-entering { animation: galleryEnter .7s cubic-bezier(.2, .7, .2, 1), galleryDrift 9s ease-out .7s forwards; }
@keyframes galleryEnter {
    from { transform: translateX(var(--from, 6%)) scale(1.06); filter: blur(4px); }
    to   { transform: none; filter: none; }
}
@keyframes galleryDrift { to { transform: scale(1.05); } }

.gallery-caption,
.gallery-counter {
    position: absolute;
    z-index: 2;
    bottom: 12px;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .82);
    color: var(--brown);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.gallery-caption { left: 12px; }
.gallery-counter { right: 12px; }
.gallery-nav {
    position: absolute;
    z-index: 2;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .85);
    color: var(--brown);
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .12);
    transition: background .2s, transform .2s;
}
.gallery-nav:hover { background: #fff; transform: translateY(-50%) scale(1.08); }
.gallery-nav.prev { left: 10px; }
.gallery-nav.next { right: 10px; }
.gallery-nav[hidden] { display: none; }

.gallery-thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.gallery-thumbs button {
    width: 64px;
    aspect-ratio: 4 / 5;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 9px;
    overflow: hidden;
    background: #cfcfcf;
    cursor: pointer;
    opacity: .6;
    transition: opacity .2s, border-color .2s;
}
.gallery-thumbs button:hover { opacity: .9; }
.gallery-thumbs button.is-active { opacity: 1; border-color: var(--gold); }
.gallery-thumbs img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.gallery-note { margin: 0; font-size: 0.78rem; color: rgba(31, 26, 22, 0.6); }

/* Barre du bas : couleurs + personnalisation */
.showcase-bar {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    padding: 14px 18px;
    border-top: 1px solid rgba(61, 43, 31, 0.12);
    background: var(--card);
    /* barre toujours accessible en bas de l'écran */
    position: sticky;
    bottom: 0;
    z-index: 15;
    margin: 0 -18px -18px;
    border-radius: 0 0 18px 18px;
    box-shadow: 0 -8px 20px rgba(37, 27, 19, 0.08);
}
.showcase-colors { display: grid; gap: 8px; min-width: 0; }
.showcase-label { font-size: 0.8rem; font-weight: 600; }
.showcase-label strong { color: var(--brown); }
.showcase .color-dot { transition: transform .2s; }
.showcase .color-dot:hover { transform: scale(1.12); }
.showcase-cta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.showcase-price { font-size: 0.85rem; }
.showcase-price strong { color: var(--brown); font-size: 1.05rem; }
.btn-customize {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 22px;
    text-decoration: none;
    white-space: nowrap;
}

/* ── Vitrine par modèle (jean) : une seule photo portée, changée par la liste des modèles ── */
.model-showcase {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
}
.model-stage {
    position: relative;
    aspect-ratio: 2 / 3;             /* format des photos portées : silhouette entière */
    width: min(100%, calc(80vh * 2 / 3));   /* toute la hauteur visible, sans déborder de la colonne */
    margin: 0 auto;
    border-radius: 14px;
    overflow: hidden;
    background: #d9d9d9;
    touch-action: pan-y;
}
.model-stage .gallery-img { object-position: center top; }
.model-info { display: grid; gap: 18px; min-width: 0; }
.model-info > * { min-width: 0; }   /* la liste défilante des modèles ne doit pas élargir la page sur mobile */
.model-info h1 { margin: 0; font-family: 'Playfair Display', serif; font-size: 2rem; color: var(--brown); }
.model-info p { margin: 0; line-height: 1.7; }
.model-list { display: flex; flex-wrap: wrap; gap: 8px; }
.model-chip {
    padding: 9px 16px;
    border-radius: 999px;
    border: 1px solid rgba(61, 43, 31, 0.2);
    background: #fff;
    font: 600 0.82rem 'Montserrat', sans-serif;
    color: var(--brown);
    cursor: pointer;
    transition: border-color .2s, background .2s, transform .2s;
}
.model-chip:hover { transform: translateY(-1px); }
.model-chip.active { border-color: var(--gold); background: rgba(197, 160, 89, 0.14); box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.18); }

/* ── Mobile ── */
@media (max-width: 900px) {
    .model-showcase { grid-template-columns: minmax(0, 1fr); }
    .model-stage { width: 100%; }
    .model-list { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
    .model-chip { flex: 0 0 auto; }
    .showcase { grid-template-columns: minmax(0, 1fr); }
    .gallery-thumbs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
    .gallery-thumbs button { flex: 0 0 56px; width: 56px; }
    .showcase-colors { width: 100%; }
    .showcase-cta { width: 100%; justify-content: space-between; }
    .btn-customize { flex: 1; justify-content: center; }
}
