/* Lots de la boutique (prix fixe pour plusieurs articles) : cartes de lot (liste des lots, lots d'une catégorie sous les
   résultats, autres lots de la fiche), fiche d'un lot, bouton « Ajouter tous les décors » de la page d'une map.
   Identité commune : cuir + or et l'icône « boîte » ; les illustrations des articles du lot à la suite (« ×N »), jamais la
   photo du lot hors de sa fiche. Étiquettes sur fond cuir : palette d'origine en mode sombre (theme-sombre.css). */

/* ---------- Carte d'un lot ---------- */
.lots-grille {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
    gap: 1rem;
}

.lot-carte {
    position: relative;
    border: 2px solid var(--or);
    border-radius: var(--radius-card);
    background: var(--beige-clair);
    box-shadow: 0 2px 8px rgba(61, 38, 23, 0.1);
    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease;
}

.lot-carte:hover,
.lot-carte:focus-within {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(61, 38, 23, 0.18);
}

.lot-carte--epuise {
    opacity: 0.65;
    border-color: var(--beige-fonce);
}

.lot-carte-lien {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    gap: 0.6rem;
    height: 100%;
    padding: 0.75rem 0.85rem 0.85rem;
    color: var(--encre);
    text-decoration: none;
}

.lot-carte-tete {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.lot-carte-type {
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: 0.3rem;
    padding: 0.15rem 0.55rem;
    border-radius: var(--radius-small);
    background: var(--brun-cuir);
    color: var(--or-clair);
    font-family: 'Grandstander', cursive;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.lot-carte-compte {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    color: var(--brun-cuir-clair);
    font-size: 0.8rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lot-carte-pourcentage {
    flex: none;
    padding: 0.1rem 0.45rem;
    border-radius: var(--radius-small);
    background: #2f7a43;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 800;
}

/* Illustrations des articles à la suite (6 au plus, « +N » au-delà) */
.lot-carte-frise {
    display: flex;
    gap: 6px;
    min-width: 0;
}

/* Case carrée qui rétrécit avec la carte : l'image est posée dedans (absolue), sa taille réelle n'agrandit jamais la case */
.lot-carte-article {
    position: relative;
    display: grid;
    flex: 0 1 56px;
    place-items: center;
    min-width: 0;
    min-height: 0;
    aspect-ratio: 1;
    border-radius: 8px;
    background: var(--beige);
}

.lot-carte-article img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 3px;
    object-fit: contain;
}

.lot-carte-plus {
    background: var(--brun-cuir);
    color: var(--or-clair);
    font-family: 'Grandstander', cursive;
    font-weight: 700;
}

.lot-carte-nom {
    display: -webkit-box;
    overflow: hidden;
    font-family: 'Grandstander', cursive;
    font-weight: 700;
    line-height: 1.25;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.lot-carte-pied {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.2rem 0.5rem;
    margin-top: auto;
}

.lot-carte-prix {
    font-family: 'Grandstander', cursive;
    font-size: 1.15rem;
}

.lot-carte-valeur {
    color: var(--brun-cuir-clair);
    font-size: 0.85rem;
}

.lot-carte-economie {
    color: #2f7a43;
    font-size: 0.82rem;
    font-weight: 800;
}

/* ---------- Lots d'une catégorie, sous les résultats de la boutique ---------- */
.lot-section {
    margin: 2.5rem 0 1rem;
    padding-top: 1.5rem;
    border-top: 2px dashed var(--beige-fonce);
}

.lot-section-tete {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: baseline;
    gap: 0.2rem 1rem;
    margin-bottom: 1rem;
}

.lot-section-tete h2 {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    font-size: 1.35rem;
}

.lot-section-tete h2 svg {
    color: var(--rouille);
}

.lot-section-tete p {
    grid-column: 1;
    margin: 0;
    color: var(--brun-cuir-clair);
    font-size: 0.9rem;
}

.lot-section-tous {
    grid-row: 1 / span 2;
    grid-column: 2;
    align-self: center;
    font-weight: 700;
    white-space: nowrap;
}

@media (max-width: 600px) {
    .lot-section-tete {
        grid-template-columns: 1fr;
    }

    .lot-section-tous {
        grid-row: auto;
        grid-column: 1;
    }
}

/* Entrée « Lots » de la bande des catégories */
.catalogue-categorie-image--lots {
    display: grid;
    place-items: center;
    background: var(--brun-cuir);
    color: var(--or-clair);
}

/* ---------- Liste des lots ---------- */
.lots-section {
    margin-top: 1.75rem;
}

.lots-section h2 a {
    color: inherit;
    text-decoration: none;
}

.lots-section h2 a:hover,
.lots-section h2 a:focus-visible {
    color: var(--rouille);
    text-decoration: underline;
}

/* ---------- Fiche d'un lot ---------- */
/* Fiche resserrée sur ordinateur : visuel à gauche, achat à droite */
.lot-page {
    max-width: 1080px;
    padding-bottom: 2rem;
}

.lot-hero {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: 1.5rem 2.25rem;
    margin-top: 0.5rem;
}

@media (max-width: 860px) {
    .lot-hero {
        grid-template-columns: 1fr;
    }
}

.lot-hero-visuel {
    position: relative;
    display: grid;
    align-content: start;
    gap: 0.6rem;
}

.lot-hero-photo {
    padding: 0;
    /* Même cadre en pointillés que les photos des articles seuls (.article-galerie-piste) */
    border: 2px dashed var(--or-terne);
    border-radius: 10px;
    background: var(--fond-dalles);
    cursor: zoom-in;
    overflow: hidden;
}

.lot-hero-photo img {
    display: block;
    width: 100%;
    max-height: 520px;
    object-fit: contain;
}

/* Photos du lot recadrées en carré selon Publication › Cadrage du back-office (photo-cadree de components.css) */
.lot-hero-photo:has(img.photo-cadree) {
    display: block;
    width: 100%;
    max-width: 520px;
    aspect-ratio: 1;
}

.lot-hero-photo img.photo-cadree {
    width: 100%;
    height: 100%;
    max-height: none;
    aspect-ratio: 1;
    object-fit: cover;
}

.lot-hero-photo img.photo-cadree--entiere {
    object-fit: contain;
}

.lot-hero-vignettes img.photo-cadree--entiere {
    object-fit: contain;
}

.lot-hero-vignettes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.lot-hero-vignettes button {
    padding: 0;
    border: 1px solid var(--beige-fonce);
    border-radius: 8px;
    background: var(--beige);
    cursor: zoom-in;
    overflow: hidden;
}

.lot-hero-vignettes button.is-active {
    border-color: var(--or);
    box-shadow: 0 0 0 2px var(--or);
}

.lot-hero-vignettes img {
    display: block;
    width: 64px;
    height: 64px;
    object-fit: cover;
}

/* Sans photo du lot : illustrations de ses articles en grille (4 par ligne au plus) */
.lot-hero-articles {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    padding: 0.8rem;
    border: 2px dashed var(--or-terne);
    border-radius: 10px;
    background: var(--fond-dalles);
}

.lot-hero-articles--1 {
    grid-template-columns: minmax(0, 1fr);
}

.lot-hero-articles--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.lot-hero-articles--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.lot-hero-articles .lot-carte-article {
    background: var(--beige-clair);
}

.lot-hero-articles .lot-carte-plus {
    background: var(--brun-cuir);
    font-size: 1.3rem;
}

.lot-hero-achat {
    display: grid;
    align-content: start;
    gap: 0.75rem;
}

.lot-badge {
    display: inline-flex;
    justify-self: start;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
    padding: 0.25rem 0.7rem;
    border-radius: var(--radius-small);
    background: var(--brun-cuir);
    color: var(--or-clair);
    font-size: 0.82rem;
    font-weight: 800;
}

.lot-titre {
    margin: 0;
    text-align: left;
    text-wrap: balance;
}

.lot-description p:last-child {
    margin-bottom: 0;
}

.lot-calcul {
    display: grid;
    gap: 0.3rem;
    margin: 0;
    padding: 0.75rem 0.9rem;
    border-radius: 10px;
    background: var(--beige-clair);
    font-variant-numeric: tabular-nums;
}

.lot-calcul div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.lot-calcul dt {
    font-weight: 600;
}

.lot-calcul dd {
    margin: 0;
}

.lot-calcul s {
    color: var(--brun-cuir-clair);
}

.lot-calcul-prix dd {
    font-family: 'Grandstander', cursive;
    font-size: 1.5rem;
    font-weight: 700;
}

.lot-calcul-economie {
    padding-top: 0.35rem;
    border-top: 1px dashed var(--beige-fonce);
    color: #2f7a43;
    font-weight: 800;
}

.lot-couleurs {
    margin: 0;
    padding: 0;
    border: none;
}

.lot-couleurs legend {
    margin-bottom: 0.35rem;
    font-size: 0.95rem;
    font-weight: 700;
}

.lot-couleurs-choix {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.lot-couleur {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.65rem 0.3rem 0.35rem;
    border: 2px solid var(--beige-fonce);
    border-radius: var(--radius-small);
    background: var(--beige-clair);
    cursor: pointer;
}

.lot-couleur input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.lot-couleur:has(input:checked) {
    border-color: var(--rouille);
}

.lot-couleur:has(input:focus-visible) {
    outline: 2px solid var(--rouille);
    outline-offset: 2px;
}

.lot-couleur-pastille {
    width: 22px;
    height: 22px;
    border: 2px solid rgba(0, 0, 0, 0.15);
    border-radius: 50%;
    background: var(--teinte);
}

.lot-dispo {
    margin: 0;
    color: #2f7a43;
    font-weight: 700;
}

.lot-dispo--epuise {
    color: var(--rouge-banni);
}

/* Bouton principal « Ajouter le lot au panier » (au-dessus du petit bouton « Ajouter » des états) */
.panier-ajout-btn.lot-ajout {
    display: inline-flex;
    justify-self: start;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.3rem;
    border-color: var(--rouille);
    border-radius: 8px;
    background: var(--rouille);
    color: #fff;
    font-size: 1.05rem;
}

.panier-ajout-btn.lot-ajout:hover,
.panier-ajout-btn.lot-ajout:focus-visible {
    border-color: var(--brun-cuir);
    background: var(--brun-cuir);
    color: var(--beige-clair);
}

/* Bouton secondaire (conseil « les remplacer par le lot ») */
.lot-bouton {
    justify-self: start;
    padding: 0.45rem 0.95rem;
    border: 1px solid #2f7a43;
    border-radius: 6px;
    background: #2f7a43;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.lot-bouton:hover,
.lot-bouton:focus-visible {
    background: #24603a;
}

.lot-bouton:disabled {
    opacity: 0.6;
    cursor: wait;
}

.lot-au-panier {
    margin: 0;
    color: #2f7a43;
    font-weight: 700;
}

.lot-conseil {
    display: grid;
    gap: 0.5rem;
    padding: 0.75rem 0.9rem;
    border: 2px dashed #2f7a43;
    border-radius: 10px;
    background: #e3f1e5;
}

.lot-conseil p {
    margin: 0;
}



.lot-note,
.lot-map {
    margin: 0;
    color: var(--brun-cuir-clair);
    font-size: 0.88rem;
}

.lot-contenu {
    margin-top: 2rem;
}

/* Contenu du lot : une petite tuile par article (illustration « ×N », nom, état, valeur) */
.lot-contenu-liste {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.lot-contenu-ligne {
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 0.4rem;
    padding: 0.5rem;
    border: 1px solid var(--beige-fonce);
    border-radius: 10px;
    background: var(--beige-clair);
}

.lot-contenu-ligne.is-indisponible {
    opacity: 0.6;
}

.lot-contenu-image {
    position: relative;
    display: block;
    aspect-ratio: 1;
    border-radius: 8px;
    background: var(--beige);
}

.lot-contenu-image img {
    display: block;
    width: 100%;
    height: 100%;
    padding: 4px;
    object-fit: contain;
}

/* Photo réelle d'un exemplaire : recadrée en carré selon le cadrage de Publication (photo-cadree de components.css) */
.lot-contenu-image:has(img.photo-cadree) {
    overflow: hidden;
}

.lot-contenu-image img.photo-cadree {
    padding: 0;
    object-fit: cover;
}

.lot-contenu-image img.photo-cadree--entiere {
    padding: 4px;
    object-fit: contain;
}
.lot-contenu-infos {
    display: grid;
    min-width: 0;
}

.lot-contenu-nom {
    color: var(--encre);
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.25;
    text-decoration: none;
}

.lot-contenu-nom:hover,
.lot-contenu-nom:focus-visible {
    color: var(--rouille);
    text-decoration: underline;
}

.lot-contenu-etat {
    color: var(--brun-cuir-clair);
    font-size: 0.78rem;
}

.lot-contenu-probleme {
    color: var(--rouge-banni);
    font-size: 0.85rem;
    font-weight: 700;
}

.lot-contenu-valeur {
    color: var(--brun-cuir-clair);
    font-size: 0.85rem;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.lot-autres {
    margin-top: 2rem;
}

/* Carrousel « Autres lots » (piste et flèches de catalogue.css) : une carte de lot par pas */
.article-related-track > .lot-carte {
    flex: 0 0 280px;
    width: 280px;
    min-width: 280px;
    scroll-snap-align: start;
}

@media (max-width: 992px) {
    .article-related-track > .lot-carte {
        flex: 0 0 calc((100% - 1rem) / 2.2);
        width: auto;
        min-width: 0;
    }
}

@media (max-width: 576px) {
    .article-related-track > .lot-carte {
        flex: 0 0 80%;
    }
}

/* Drapeau de la langue choisie devant la pastille d'option */
.lot-pastille-drapeau {
    width: 16px;
    height: 16px;
    margin-right: 0.3rem;
    vertical-align: -3px;
    object-fit: contain;
}

.lot-pastille-drapeau[hidden] {
    display: none;
}

/* ---------- Page d'une map : décors vendus en lot ---------- */
.map-lots {
    display: grid;
    gap: 0.75rem;
    margin: 1.5rem 0;
}

.map-lot {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.6rem 1rem;
    padding: 0.85rem 1rem;
    border: 2px solid var(--or);
    border-radius: 12px;
    background: var(--beige-clair);
}

@media (max-width: 600px) {
    .map-lot {
        grid-template-columns: 1fr;
    }
}

.map-lot-titre {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0 0 0.2rem;
    font-weight: 800;
}

.map-lot-titre svg {
    color: var(--rouille);
}

.map-lot p {
    margin: 0;
}

.map-lot-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}
/* Options d'un lot (version de la carte…) : choix unique pour tout le lot, pastille sur les articles concernés */
.lot-options {
    grid-template-columns: max-content minmax(0, 22rem);
    justify-content: start;
    margin: 0;
}

/* Les options partagent les mêmes colonnes : listes déroulantes l'une sous l'autre (comme dans le panier) */
.lot-option {
    grid-column: 1 / -1;
    grid-template-columns: subgrid;
}

@media (max-width: 575.98px) {
    .lot-options {
        grid-template-columns: minmax(0, 1fr);
    }

    .lot-option {
        grid-template-columns: minmax(0, 1fr);
    }
}

.lot-option[hidden],
.lot-option-pastille[hidden] {
    display: none;
}

.lot-option-pastille {
    display: inline-block;
    width: fit-content;
    max-width: 100%;
    margin-top: 0.15rem;
    padding: 0.05rem 0.5rem;
    overflow: hidden;
    border-radius: 999px;
    background: var(--beige-fonce);
    color: var(--encre);
    font-size: 0.72rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lot-option-detail {
    margin: 0.25rem 0 0;
    padding: 0;
    color: var(--brun-cuir-clair);
    font-size: 0.8rem;
    list-style: none;
}