/* ── Studio Polo (prototype) — s'appuie sur les variables et boutons de polo.css ── */
html { background: var(--bg); }
body { min-height: 100vh; }
.studio .btn { white-space: nowrap; }

.studio {
    width: min(1180px, 94%);
    margin: 24px auto 50px;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}

.studio-preview,
.studio-steps {
    background: var(--card);
    border: 1px solid rgba(61, 43, 31, 0.12);
    border-radius: 18px;
    box-shadow: 0 14px 34px rgba(37, 27, 19, 0.08);
    padding: 20px;
}

/* ── Aperçu ── */
.studio-preview {
    position: sticky;
    top: 84px;
}
.studio-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(197, 160, 89, 0.15);
    color: var(--brown);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}
#studioSvg {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 14px;
    background: radial-gradient(circle at 50% 35%, #fff 0%, #ece7e1 100%);
}

/* Aperçu photo (canvas) */
.studio-stage {
    position: relative;
    margin: 10px 0 6px;
    border-radius: 14px;
    overflow: hidden;
}
#studioCanvas {
    display: block;
    width: 100%;
    height: auto;
    background: #cfcfcf;
    transition: opacity .2s ease;
}
.studio-stage.is-loading #studioCanvas { opacity: .55; }
.studio-stage.is-loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, .35) 45%, transparent 80%);
    background-size: 200% 100%;
    animation: stageShimmer 1.2s ease-in-out infinite;
    pointer-events: none;
}
@keyframes stageShimmer { 0% { background-position: 150% 0; } 100% { background-position: -50% 0; } }
.stage-labels {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 8px;
    justify-content: space-around;
    pointer-events: none;
}
.studio-stage.is-photo .stage-labels { display: flex; }
.stage-labels span {
    position: absolute;
    top: 0;
    left: 10px;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .75);
    color: var(--brown);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}
.stage-labels span + span { left: calc(50% + 10px); }
.stage-note {
    margin: 0 0 8px;
    text-align: center;
    font-size: 0.75rem;
    color: rgba(31, 26, 22, 0.6);
}
.mini-photo {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 10px;
    overflow: hidden;
    background: #cfcfcf;
}
.mini-photo img {
    display: block;
    width: 200%;
    height: 100%;
    object-fit: cover;
    object-position: 0 50%;
}
#studioSvg path,
#studioSvg circle {
    transition: fill .35s ease;
}
.view-label {
    font: 600 13px 'Montserrat', sans-serif;
    fill: rgba(61, 43, 31, 0.55);
    text-anchor: middle;
    letter-spacing: 2px;
    text-transform: uppercase;
}
.studio-chips {
    margin: 0 0 12px;
    text-align: center;
    color: var(--brown);
    font-size: 0.85rem;
    font-weight: 600;
}
.studio-price {
    border-top: 1px solid rgba(61, 43, 31, 0.12);
    padding-top: 12px;
}
.studio-price > div {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}
.studio-price > div strong {
    font-size: 1.4rem;
    color: var(--brown);
}
.studio-price ul {
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
    font-size: 0.8rem;
    color: rgba(31, 26, 22, 0.7);
}
.studio-price li {
    display: flex;
    justify-content: space-between;
    padding: 2px 0;
}

/* ── Étapes ── */
.studio-steps h1 {
    margin: 0 0 14px;
    font-family: 'Playfair Display', serif;
    font-size: 1.7rem;
}
.studio-steps h1 em {
    color: var(--gold);
}
.studio-steps h2 {
    margin: 18px 0 10px;
    font-size: 1.05rem;
}
.optional {
    font-weight: 400;
    font-size: 0.85rem;
    color: rgba(31, 26, 22, 0.55);
}
.step-note {
    margin: 6px 0 10px;
    font-size: 0.82rem;
    color: rgba(31, 26, 22, 0.7);
}
.field-label {
    margin: 16px 0 8px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.stepper {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0 0 4px;
}
.stepper::-webkit-scrollbar { display: none; }
.stepper button {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px 6px 6px;
    border: 1px solid rgba(61, 43, 31, 0.15);
    border-radius: 999px;
    background: #fff;
    color: var(--brown);
    font: 600 0.74rem 'Montserrat', sans-serif;
    white-space: nowrap;
    cursor: pointer;
}
.stepper button span {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(61, 43, 31, 0.08);
    font-size: 0.7rem;
}
.stepper .is-current button {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.18);
}
.stepper .is-current button span,
.stepper .is-done button span {
    background: var(--gold);
    color: #fff;
}

/* Cartes d'options */
.opt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}
.opt-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px;
    border: 1.5px solid rgba(61, 43, 31, 0.14);
    border-radius: 14px;
    background: #fff;
    color: var(--ink);
    font-family: 'Montserrat', sans-serif;
    text-align: center;
    cursor: pointer;
    transition: border-color .2s, box-shadow .2s, transform .2s;
}
.opt-card:hover { transform: translateY(-2px); }
.opt-card.is-selected {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.2);
}
.opt-card strong { font-size: 0.9rem; }
.opt-card span { font-size: 0.75rem; color: rgba(31, 26, 22, 0.65); }
.opt-card em { font-style: normal; font-size: 0.75rem; font-weight: 700; color: var(--gold); }
/* suppléments : vert en plus, rouge en moins */
.amount { font-weight: 700; }
.amount.is-plus { color: #1e8e3e; }
.amount.is-minus { color: #d93025; }
.opt-card svg { width: 100%; max-width: 130px; height: auto; }
.fabric-swatch { border-radius: 50%; max-width: 64px !important; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1); }
img.fabric-swatch { display: block; width: 64px; height: 64px; margin: 0 auto; box-shadow: 0 0 0 1px rgba(0, 0, 0, .12), 0 2px 6px rgba(0, 0, 0, .12); }

/* Couleurs */
.color-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 8px;
}
.color-opt {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border: 1.5px solid rgba(61, 43, 31, 0.14);
    border-radius: 12px;
    background: #fff;
    font: 600 0.78rem 'Montserrat', sans-serif;
    color: var(--ink);
    cursor: pointer;
    text-align: left;
}
.color-opt.is-selected {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.2);
}
.color-opt .swatch {
    flex: 0 0 22px;
    height: 22px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.15);
}

/* Logo */
.logo-upload { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.logo-upload .step-note { width: 100%; margin: 0; }
.link-btn {
    border: 0;
    background: none;
    color: var(--gold);
    font: 700 0.78rem 'Montserrat', sans-serif;
    cursor: pointer;
    text-decoration: underline;
}
.segmented {
    display: inline-flex;
    border: 1.5px solid rgba(61, 43, 31, 0.14);
    border-radius: 999px;
    overflow: hidden;
}
.segmented button {
    padding: 8px 16px;
    border: 0;
    background: #fff;
    font: 600 0.8rem 'Montserrat', sans-serif;
    cursor: pointer;
}
.segmented button.is-selected { background: var(--gold); color: #fff; }
.segmented button + button { border-left: 1px solid rgba(61, 43, 31, 0.1); }
.segmented small { font-weight: 400; opacity: .8; }

/* Dos */
.back-box { margin-top: 14px; }
.back-box[hidden] { display: none; }
.back-text {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1.5px solid rgba(61, 43, 31, 0.18);
    border-radius: 12px;
    font: 600 0.95rem 'Montserrat', sans-serif;
    resize: vertical;
}
.back-text:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.2); }
.font-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 8px;
}
.font-opt {
    padding: 10px;
    border: 1.5px solid rgba(61, 43, 31, 0.14);
    border-radius: 12px;
    background: #fff;
    color: var(--ink);
    font-size: 1.05rem;
    cursor: pointer;
}
.font-opt.is-selected {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.2);
}

/* Récap */
.recap { list-style: none; margin: 0 0 14px; padding: 0; }
.recap li {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 10px;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px dashed rgba(61, 43, 31, 0.15);
    font-size: 0.85rem;
}
.recap li span { color: rgba(31, 26, 22, 0.65); }
.recap-qty { margin: 10px 0; }
.recap-qty label { font-weight: 700; font-size: 0.85rem; }
.recap-total { margin: 12px 0; font-size: 1rem; }
.recap-total strong { color: var(--brown); }

.step-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

/* ── Jean ── */
.mannequin { margin: 16px 0 0; text-align: center; }
.mannequin[hidden] { display: none; }
.mannequin img {
    display: block;
    width: 100%;
    max-width: 340px;
    margin: 0 auto;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    object-position: 50% 70%;
    border-radius: 12px;
    background: #e6e6e6;
}
.mannequin figcaption { margin-top: 6px; font-size: 0.8rem; color: rgba(31, 26, 22, 0.65); }
.wash-photo {
    display: block;
    width: 100%;
    aspect-ratio: 3 / 4;
    border-radius: 10px;
    overflow: hidden;
    background: #dcdcdc;
}
.wash-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.opt-card .wash-photo + strong { margin-top: 2px; }
.big-sizes-toggle { display: inline-flex; align-items: center; gap: 8px; margin: 10px 0 4px; font-weight: 700; font-size: 0.85rem; cursor: pointer; }
.big-sizes-toggle[hidden] { display: none; }
#bigSizesGrid[hidden] { display: none; }

/* ── Mobile ── */
@media (max-width: 900px) {
    .studio { grid-template-columns: minmax(0, 1fr); }
    .studio-preview { position: static; padding: 14px; }
    .studio-steps { padding: 16px; }
    .stepper { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
    .opt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .color-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .font-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .segmented { display: flex; }
    .segmented button { flex: 1; padding: 8px 6px; }
}
