/* Design inspiré d'eBay et style Kodachrome réaliste - Version sombre */
body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #1a1a1a;
    color: #e0e0e0;
}

/* Menu sticky et compact */
header {
    background-color: #2a2a2a;
    color: white;
    padding: 0;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

header nav {
    display: flex;
    align-items: center;
    padding: 0;
    gap: 1rem;
    min-height: 26px;
    margin: 0;
}

.logo {
    margin-right: auto;
    padding-left: 10px;
}

/* Lien en couleur marronorangée habituelle */
.logo-title {
    font-size: 1.1rem;
    margin: 0;
    line-height: 1;
    text-decoration: none;
    color: #a7502d; /* Couleur marronorangée */
    display: inline-flex;
    align-items: center;
    font-weight: bold;
}

.menu {
    display: flex;
    justify-content: center;
    align-items: center;
    list-style: none;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    flex: 1;
}

/* Menu - Rectangles orange-marron AGRANDIS */
.menu li a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.95rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    transition:
    background-color 0.2s,
    color 0.2s,
    transform 0.2s;
}

.menu li a:hover,
.menu li a.active {
    background-color: #a7502d;
    color: white;
    padding: 0.5rem 1rem;
    margin: 0;
    transform: scale(1.08);
}

.search-container {
    position: relative;
    margin-left: auto;
    padding-right: 10px;
    display: flex;
    align-items: center;
}

/* Bannière sous le menu */
.site-banner {
    position: relative;
    width: 100%;
    text-align: center;
}

.site-banner img {
    display: block;
    margin: 0 auto;
    width: 45%;
    height: auto;

    filter: contrast(1.1) saturate(1.15);

    border-radius: 6px;

    /* cadre cinéma propre */
    border: 2px solid rgba(255,255,255,0.12);

    box-shadow: 0 4px 14px rgba(0,0,0,0.6);
    background: #1a1a1a;
    padding: 6px;
}

/* Espacement sous la bannière */
main {
    margin-top: 1rem;
}

#search-input {
    padding: 0.3rem;
    border-radius: 4px;
    border: 1px solid #444;
    background-color: #2a2a2a;
    color: white;
    font-size: 0.9rem;
}

#search-btn {
    padding: 0.3rem 0.6rem;
    background-color: #a7502d;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    margin-left: 0.5rem;
}

.hero {
    padding: 6px 20px;
    padding-bottom: 0.5rem;
    margin: 0;
    position: relative;
}

.hero h1,
.hero h2 {
    margin: 0 0 12px 0;
    font-size: 1.15rem;
    font-weight: 600;
    color: #e0e0e0;
}

.hero::before,
.hero::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 10px;
    background: repeating-linear-gradient(to right, #2a2a2a 0px, #2a2a2a 14px, transparent 14px, transparent 24px);
    z-index: 2;
}

.hero::before {
    top: 0;
}

.hero::after {
    bottom: 0;
}

.hero-content {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-text {
    max-width: 800px;        /* ou 900px selon rendu souhaité */
    width: 100%;
    text-align: left;        /* garde le texte aligné à gauche */
}

.hero-text br {
    display: block;
    content: "";
    margin-bottom: 0.4em;
}

.hero-text p {
    margin: 0.5em 0;
}

.hero .filter-buttons {
    margin-top: 10px;
    max-height: 280px;
    overflow-y: auto;
    border: 1px solid #333;
    padding: 0.5rem;
}

/* Style pour les encarts produits */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    row-gap: 1.5rem;
    column-gap: 1.5rem;
    padding: 0.5rem;
    align-items: start;
}

.product {
    background-color: #1e1e1e;
    border-radius: 8px;
    padding: 1rem 1rem 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s, box-shadow 0.3s, background-color 0.3s;
    cursor: default;
    color: #e0e0e0;
    border: 1px solid #333;
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 0;
    position: relative;
    margin: 0;
}

.product:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    background-color: #2a2a2a;
}

.product-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    font-size: 14px;
    color: #aaa;
    line-height: 1.4;
    margin: 0;
    padding-bottom: 0;
    white-space: normal;
    overflow: visible;
}

.product-info p {
    margin: 0.2rem 0;
    white-space: normal;
    overflow: visible;
    word-break: break-word;
}

.product-price {
    margin-top: auto;
    font-size: 1.1rem;
    color: #ffffff;
    font-weight: bold;
    text-align: center;
    padding: 0.5rem 0;
    margin-bottom: 0;
    border-top: 1px solid #333;
    display: flex;
    justify-content: center;
    align-items: center;
}

.product-ebay-link {
    display: block;
    text-align: center;

    margin: 0.35rem 0 0.9rem;

    font-size: 0.85rem;
    font-weight: 700;

    color: #a7502d;

    text-decoration: none;

    transition:
        color 0.18s ease,
        text-shadow 0.18s ease,
        transform 0.18s ease;
}

.product-ebay-link:hover {
    color: #ffb08c;

    text-shadow:
        0 0 6px rgba(255,176,140,0.55),
        0 0 12px rgba(167,80,45,0.45);

    transform: translateY(-1px) scale(1.03);
}

.logo-title:hover {
    color: #ffb08c;
    text-shadow:
        0 0 6px rgba(255,176,140,0.55),
        0 0 12px rgba(167,80,45,0.45);
    transform: translateY(-1px) scale(1.03);
}

.product-title {
    margin-top: 0;
    margin-bottom: 0.7rem;
    font-size: 18px;
    color: #e0e0e0;
    text-align: center;
}

.product-image-container {
    position: relative;
    width: 100%;
    height: 200px;
    margin-bottom: 0.5rem;
    overflow: hidden;
    cursor: default;
    background-color: #1a1a1a;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-color: #2a2a2a;
    display: block;
    border-radius: 4px;
}

.placeholder {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #1a1a1a;
    justify-content: center;
    align-items: center;
    color: #888;
    font-weight: bold;
    font-size: 18px;
    border: 2px dashed #444;
    border-radius: 4px;
    text-align: center;
}

/* Badge +1 / +2 / +3 pour les autres exemplaires */
.other-copies-badge {
    position: absolute;
    top: 8px;
    right: 8px;

    min-width: 28px;
    height: 28px;

    padding: 0 7px;

    box-sizing: border-box;

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(25, 25, 25, 0.88);

    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 14px;

    color: #fff;

    font-size: 13px;
    font-weight: 700;
    line-height: 1;

    box-shadow:
        0 2px 7px rgba(0, 0, 0, 0.55);

    z-index: 21;

    pointer-events: auto;
    cursor: default;
}

.other-copies-tooltip {
    position: fixed;

    padding: 6px 9px;

    background: rgba(20, 20, 20, 0.96);

    border: 1px solid #555;
    border-radius: 5px;

    color: #fff;

    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;

    white-space: nowrap;

    box-shadow:
        0 2px 7px rgba(0, 0, 0, 0.45);

    pointer-events: none;

    z-index: 9999;
}

/* Bandeau VENDU */
.sold-banner {
    position: absolute;
    top: 18px;
    left: -42px;

    width: 150px;

    background: #c62828;
    color: #fff;

    text-align: center;
    font-size: 15px;
    font-weight: bold;

    padding: 6px 0;

    transform: rotate(-45deg);

    box-shadow: 0 2px 8px rgba(0,0,0,.45);

    z-index: 20;

    pointer-events: none;
}

/* Bandeau VENDU horizontal centré uniquement dans la lightbox */
.sold-banner-lightbox {
    top: 20px;
    left: 50%;
    right: auto;
    bottom: auto;

    transform: translateX(-50%);

    width: auto;
    height: auto;

    padding: 8px 30px;

    writing-mode: horizontal-tb;
    text-orientation: mixed;

    white-space: nowrap;
}

/* =========================================================
   FILTRES MODERNES
   ========================================================= */

.filters {
    padding: 1rem;
    background-color: #1a1a1a;
    margin: 1rem 0;
    border-radius: 8px;
    border: 1px solid #333;
}

.filter-section {
    margin-bottom: 1.5rem;
}

.filter-section h3 {
    margin-bottom: 0.5rem;
    color: #a7502d;
    text-align: center;
}

/* =========================================================
   FILTRES DES PAGES ANNÉES / DISTRIBUTION / TITRES / RÉALISATION
   ========================================================= */

.filter-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 8px;

    max-height: 360px;
    overflow-y: auto;

    padding: 12px;
    margin-top: 10px;

    background: #111;
    border: 1px solid #333;
    border-radius: 10px;
}

/* ============================================================
   PAGE ANNÉES — boutons plus compacts
   ============================================================ */

#annees-filters {
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
}

#annees-filters .category-filter-button {
    width: 100%;
}

/* ============================================================
   PAGE TITRES — grille compacte et alignée
   ============================================================ */

#titres-filters {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 8px;
}

.filter-buttons button,
.filter-buttons .category-filter-button {
    min-width: 0;
    width: 100%;
    box-sizing: border-box;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;

    background: #303030;

    border: 1px solid #444;
    border-radius: 20px;

    color: #dcdcdc;

    cursor: pointer;

    font-size: 0.78rem;
    font-weight: 500;

    padding: 5px 11px;

    line-height: 1.2;

    text-decoration: none;
    text-align: center;

    transition:
        background-color 0.18s ease,
        border-color 0.18s ease,
        color 0.18s ease,
        transform 0.18s ease,
        box-shadow 0.18s ease;
}

#titres-filters .category-filter-button {
    min-width: 0;
}

.filter-buttons button:hover,
.filter-buttons .category-filter-button:hover {
    background: #3d3d3d;
    border-color: #666;
    color: #fff;

    transform: translateY(-1px);
}

.filter-buttons button.active,
.filter-buttons .category-filter-button.active {
    background: #a7502d;
    border-color: #a7502d;

    color: #fff;

    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.25);

    transform: none;
}

/* =========================================================
   BOUTON RÉINITIALISER
   ========================================================= */

.reset-category-filter {
    display: block;

    margin: 4px auto 12px auto;

    padding: 5px 13px;

    background: transparent;

    border: 1px solid #555;
    border-radius: 20px;

    color: #aaa;

    font-size: 0.75rem;
    font-weight: 500;

    cursor: pointer;

    transition:
        background-color 0.18s ease,
        border-color 0.18s ease,
        color 0.18s ease,
        transform 0.18s ease;
}

.reset-category-filter:hover {
    background: #303030;

    border-color: #a7502d;

    color: #fff;

    transform: translateY(-1px);
}

/* Style pour le compteur de résultats */
.results-count {
    text-align: center;

    margin: 8px auto 18px;

    font-size: 0.85rem;

    color: #aaa;

    font-style: normal;

    padding: 5px 12px;

    width: fit-content;

    border: 1px solid #333;

    background: #222;

    border-radius: 16px;
}

/* Style pour "Livraison gratuite" dans les encarts */
.shipping {
    font-size: 0.7rem;
    font-weight: 300;
    color: #aaa;
    vertical-align: middle;
}

/* ===== LIGHTBOX ANIMATIONS ===== */

.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    justify-content: center;
    align-items: center;

    opacity: 0;
    transition: opacity 0.25s ease;
}

.lightbox.show {
    display: flex;
    opacity: 1;
}

.lightbox.closing {
    opacity: 0;
}

/* ========== LIGHTBOX (TOUS LES STYLES CONSOLIDÉS) ========== */
.lightbox-image-container,
.lightbox-info,
.lightbox-close,
.lightbox-nav {
    position: relative;
    z-index: 2;
}

.lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

/* Lightbox - Photo entière + bouton toujours visible */
.lightbox-image-container {
    position: relative;
    width: 90vw;
    height: 90vh;
    overflow: hidden;
    cursor: grab;
	display: flex;
    justify-content: center;
    align-items: center;
}

.lightbox-image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transform: translate(0px, 0px) scale(1);
    transform-origin: center center;
    transition: none;
    user-select: none;
    display: block;
    cursor: grab;
	margin: auto;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 40px;
    cursor: pointer;
    z-index: 1001;
    transition: color 0.2s;
}

.lightbox-close:hover {
    color: #a7502d;
}

.lightbox-info {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(167, 80, 45, 0.55);
    color: white;
    padding: 0.4rem 0.8rem;
	padding-top: 0.25rem;
	margin: 0.15rem 0;
	margin-bottom: 0;
    text-align: center;
    font-size: 0.9rem;
    line-height: 1.05;
    width: fit-content;
    max-width: 80%;
    border-radius: 25px;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
}

.lightbox-content {
    display: block;
}

.lightbox-content h3 {
    margin: 0 0 0.2rem 0;
}

.lightbox-content p {
    margin: 0.1rem 0;
}

.lightbox-info.hidden {
    opacity: 0;
    visibility: hidden;
    height: 0;
    padding: 0;
    margin-bottom: 0;
}

.lightbox-price {
    margin-top: 0.5rem;
    font-size: 1rem;
    color: #ffffff;
    font-weight: 600;
}

.lightbox-price span {
    color: #a7502d;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    transition: color 0.2s;
}

.lightbox-nav:hover {
    color: #a7502d;
}

.lightbox-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-toggle {
    position: static;
    transform: none;
    background: rgba(167, 80, 45, 0.4);
    color: white;
    border: none;
    padding: 0.25rem 0.7rem;
    font-size: 0.7rem;
    cursor: pointer;
    border-radius: 20px;
    transition: background-color 0.2s;
    margin-top: 0.1rem;
}

.lightbox-toggle:hover {
    background: rgba(167, 80, 45, 0.6);
}

.local-filter-search {
    width: 100%;
    max-width: 420px;
    box-sizing: border-box;

    display: block;

    margin: 0 auto 12px auto;

    padding: 9px 14px;

    border-radius: 20px;

    border: 1px solid #444;

    background: #202020;

    color: #fff;

    font-size: 0.85rem;

    outline: none;

    transition:
        border-color 0.2s ease,
        background-color 0.2s ease,
        box-shadow 0.2s ease;
}

.local-filter-search:focus {
    border-color: #a7502d;

    background: #242424;

    box-shadow:
        0 0 0 2px rgba(167, 80, 45, 0.12);
}

.local-filter-search::placeholder {
    color: #888;
}

/* =========================================================
   SÉLECTEUR ALPHABÉTIQUE
   ========================================================= */

.alphabet-filter {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;

    gap: 5px;

    width: 100%;
    max-width: 1100px;

    margin: 0 auto 10px auto;

    padding: 5px 8px;

    box-sizing: border-box;
}

.alphabet-filter-button {
    min-width: 32px;
    height: 30px;

    padding: 4px 9px;

    background: #303030;

    border: 1px solid #444;
    border-radius: 20px;

    color: #dcdcdc;

    cursor: pointer;

    font-size: 0.78rem;
    font-weight: 500;

    line-height: 1;

    transition:
        background-color 0.18s ease,
        border-color 0.18s ease,
        color 0.18s ease,
        transform 0.18s ease,
        box-shadow 0.18s ease;
}

.alphabet-filter-button:hover {
    background: #3d3d3d;
    border-color: #666;
    color: #fff;

    transform: translateY(-1px);
}

.alphabet-filter-button.active {
    background: #a7502d;
    border-color: #a7502d;

    color: #fff;

    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.25);

    transform: none;
}

#search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;

    width: 100%;
    max-height: 400px;
    overflow-y: auto;

    background: #111;
    border-radius: 10px;

    z-index: 99999;

    box-shadow: 0 8px 25px rgba(0,0,0,0.45);

    margin-top: 6px;
}

.search-suggestion {
    padding: 10px 14px;
    cursor: pointer;

    color: white;

    font-size: 14px;
    line-height: 1.2;

    border-bottom: 1px solid #222;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-suggestion:hover,
.search-suggestion.active {
    background: #222;
}

.search-suggestion:last-child {
    border-bottom: none;
}

@media (max-width: 1100px) {
    .filter-buttons {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 750px) {
    .filter-buttons {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 500px) {
    .filter-buttons {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   INFOBULLE DES TITRES TRONQUÉS
   ============================================================ */

.filter-title-tooltip {
    position: fixed;
    z-index: 10000;

    max-width: 500px;
    padding: 7px 10px;

    background: #222;
    color: #fff;

    border: 1px solid #555;
    border-radius: 6px;

    font-size: 14px;
    font-weight: normal;
    line-height: 1.3;

    white-space: normal;
    text-align: left;

    pointer-events: none;

    opacity: 0;
    transition: opacity 0.05s linear;
}

.filter-title-tooltip.visible {
    opacity: 1;
}

.type-object-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    vertical-align: -5px;
    margin-left: 3px;
}

/* ============================================================
   FICHE PRODUIT INDIVIDUELLE
   ============================================================ */

.product-page-main {
    width: 100%;
    box-sizing: border-box;
}

.product-page {
    width: min(1200px, calc(100% - 2rem));
    margin: 2rem auto;
}

.product-page-loading,
.product-page-error {
    text-align: center;
    padding: 3rem 1rem;
    font-size: 18px;
    color: #e0e0e0;
}

.product-page-error {
    color: #ff7070;
}


/* ------------------------------------------------------------
   Carte principale
   ------------------------------------------------------------ */

.product-page-card {
    background-color: #1e1e1e;
    border: 1px solid #333;
    border-radius: 10px;
    padding: 1.5rem;
    box-sizing: border-box;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.35);
}


/* ------------------------------------------------------------
   En-tête
   ------------------------------------------------------------ */

.product-page-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.product-page-header h1 {
    margin: 0;
    color: #e0e0e0;
    font-size: 28px;
    line-height: 1.25;
}

.product-page-other-title {
    margin: 0.5rem 0 0;
    color: #aaa;
    font-size: 16px;
}


/* ------------------------------------------------------------
   Image + informations
   ------------------------------------------------------------ */

.product-page-layout {
    display: grid;
    grid-template-columns: minmax(300px, 1.35fr) minmax(280px, 1fr);
    gap: 2rem;
    align-items: start;
}


/* ------------------------------------------------------------
   Image
   ------------------------------------------------------------ */

.product-page-image-container {
    position: relative;
    min-height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #151515;
    border-radius: 8px;
    overflow: hidden;
}

.product-page-image {
    display: block;
    max-width: 100%;
    max-height: 72vh;
    width: auto;
    height: auto;
    object-fit: contain;
    cursor: zoom-in;
}

/* Loupe de zoom suivant le pointeur */
.product-page-zoom-lens {
    position: absolute;

    width: 260px;
    height: 260px;

    border: 2px solid rgba(255, 255, 255, 0.7);
    border-radius: 50%;

    background-repeat: no-repeat;

    box-shadow:
        0 4px 18px rgba(0, 0, 0, 0.65);

    pointer-events: none;

    z-index: 10;

    display: none;

    transform: translate(-50%, -50%);
}

.product-page-placeholder {
    min-height: 400px;
    width: 100%;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #888;
    font-size: 20px;
    line-height: 1.4;
}

.product-page-placeholder:not([hidden]) {
    display: flex;
}


/* ------------------------------------------------------------
   Bandeau VENDU
   ------------------------------------------------------------ */

.product-page-sold-banner {
    position: absolute;
    top: 24px;
    left: -48px;
    z-index: 2;
    width: 190px;
    padding: 8px 0;
    text-align: center;
    transform: rotate(-45deg);
    background-color: rgba(170, 0, 0, 0.9);
    color: #fff;
    font-weight: bold;
    font-size: 20px;
    letter-spacing: 1px;
    pointer-events: none;
}


/* ------------------------------------------------------------
   Informations
   ------------------------------------------------------------ */

.product-page-details {
    color: #e0e0e0;
    font-size: 16px;
    line-height: 1.5;
}

.product-page-detail-row {
    margin-bottom: 1rem;
}

.product-page-detail-row strong {
    color: #fff;
}

.product-page-detail-row .type-object-icon {
    vertical-align: middle;
}


/* ------------------------------------------------------------
   Prix et eBay
   ------------------------------------------------------------ */

.product-page-sale {
    border-top: 1px solid #3a3a3a;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    text-align: left;
}

.product-page-price {
    margin: 0 0 1rem;
    font-size: 24px;
    font-weight: bold;
    color: #fff;
}

#product-page-ebay-link {
    display: inline-block;
    width: auto;
    font-size: 18px;
    padding: 0.85rem 1.25rem;
    align-self: flex-start;
}

.product-page-shipping {
    font-size: 14px;
    font-weight: normal;
    color: #aaa;
}

/* ------------------------------------------------------------
   Responsive
   ------------------------------------------------------------ */

@media (max-width: 800px) {

    .product-page {
        width: min(100% - 1rem, 1200px);
        margin: 1rem auto;
    }

    .product-page-card {
        padding: 1rem;
    }

    .product-page-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .product-page-image-container {
        min-height: 280px;
    }

    .product-page-placeholder {
        min-height: 280px;
    }

    .product-page-header h1 {
        font-size: 23px;
    }
}

/* ============================================================
   LIEN VERS LA FICHE PRODUIT
   ============================================================ */

.product-page-link {
    display: block;
    width: fit-content;

    margin: 0 auto 0.9rem;

    padding: 0.4rem 0.75rem;

    background-color: #a7502d;

    border-radius: 5px;

    color: #fff;

    font-size: 0.84rem;
    font-weight: 600;

    text-decoration: none;

    box-shadow:
        0 2px 5px rgba(0, 0, 0, 0.28);

    transition:
        background-color 0.18s ease,
        box-shadow 0.18s ease,
        transform 0.18s ease;
}

.product-page-link:hover {
    background-color: #bd6038;

    color: #fff;

    box-shadow:
        0 3px 8px rgba(0, 0, 0, 0.38);

    transform: translateY(-1px);
}

.lightbox-product-page-link {
    display: block;
    width: fit-content;

    margin: 0.35rem auto 0;

    color: #fff;

    font-size: 0.78rem;
    font-weight: 600;

    text-decoration: underline;
    text-underline-offset: 3px;

    cursor: pointer;

    transition:
        color 0.18s ease,
        text-shadow 0.18s ease;
}

.lightbox-product-page-link:hover {
    color: #ffb08c;

    text-shadow:
        0 0 6px rgba(255,176,140,0.45);
}

/* ============================================================
   FICHE PRODUIT — AGRANDISSEMENT IMAGE PLEIN ÉCRAN
   ============================================================ */

.product-page-image-lightbox {
    position: fixed;
    inset: 0;

    z-index: 10000;

    display: flex;
    justify-content: center;
    align-items: center;

    overflow: hidden;

    background: rgba(0, 0, 0, 0.96);

    cursor: default;
}

.product-page-image-lightbox-img {
    display: block;

    max-width: 94vw;
    max-height: 94vh;

    width: auto;
    height: auto;

    object-fit: contain;

    user-select: none;

    transform:
        translate(0, 0)
        scale(1);

    transform-origin: center center;

    cursor: zoom-in;
}

.product-page-image-lightbox-close {
    position: absolute;

    top: 18px;
    right: 24px;

    z-index: 10001;

    padding: 0;

    border: none;
    background: transparent;

    color: #fff;

    font-size: 42px;
    line-height: 1;

    cursor: pointer;

    transition:
        color 0.2s ease;
}

.product-page-image-lightbox-close:hover {
    color: #a7502d;
}

/* ============================================================
   FICHE PRODUIT — AUTRES EXEMPLAIRES
   ============================================================ */

.product-page-related {
    max-width: 1200px;
    margin: 2rem auto 0;
    padding-top: 1.5rem;
    border-top: 1px solid #3a3a3a;
}

.product-page-related-title {
    margin: 0 0 1.2rem;
    font-size: 1.3rem;
    font-weight: 600;
    color: #fff;
}

.product-page-related-list {
    display: grid;
    grid-template-columns:
        repeat(
            auto-fit,
            minmax(220px, 1fr)
        );
    gap: 1rem;
}

.product-page-related-item {
    display: flex;
    gap: 0.9rem;
    align-items: flex-start;

    padding: 0.8rem;

    background: #222;
    border: 1px solid #333;
    border-radius: 6px;
}

.product-page-related-image-link {
    flex: 0 0 100px;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 100px;
    height: 100px;

    overflow: hidden;

    background: #151515;
    border-radius: 4px;

    text-decoration: none;
}

.product-page-related-image {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: contain;
}

.product-page-related-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    height: 100%;

    padding: 0.4rem;

    color: #777;

    font-size: 0.7rem;
    text-align: center;
}

.product-page-related-info {
    min-width: 0;
    flex: 1;
}

.product-page-related-name {
    display: block;

    margin-bottom: 0.45rem;

    color: #fff;

    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.25;

    text-decoration: none;
}

.product-page-related-name:hover {
    color: #a7502d;
}

.product-page-related-ref {
    margin: 0.25rem 0;

    color: #aaa;

    font-size: 0.78rem;
}

.product-page-related-status {
    margin: 0.35rem 0;

    color: #fff;

    font-size: 0.9rem;
    font-weight: 600;
}

.product-page-related-status-sold {
    color: #a7502d;
}

.product-page-related-link {
    display: inline-block;

    margin-top: 0.35rem;

    color: #aaa;

    font-size: 0.78rem;

    text-decoration: underline;
    text-underline-offset: 3px;
}

.product-page-related-link:hover {
    color: #fff;
}

@media (max-width: 600px) {

    .product-page-related-list {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   HEADER RESPONSIVE
   ============================================================ */

/*
 * Tablettes et écrans étroits :
 * le header passe sur plusieurs lignes uniquement lorsque
 * l'espace horizontal devient insuffisant.
 */
@media (max-width: 1050px) {

    header nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0;
        padding: 6px 10px;
    }

    .logo {
        flex: 1 1 auto;
        margin-right: 0;
        padding-left: 0;
        text-align: left;
    }

    .menu {
        order: 3;
        flex: 0 0 100%;
        flex-wrap: wrap;
        margin-top: 6px;
        gap: 4px;
    }

    .menu li a {
        padding: 0.45rem 0.7rem;
        font-size: 0.88rem;
    }

    .menu li a:hover,
    .menu li a.active {
        padding: 0.45rem 0.7rem;
    }

    .search-container {
        margin-left: auto;
        padding-right: 0;
    }
}


/*
 * Téléphones :
 * logo, recherche et menu occupent chacun leur propre ligne.
 */
@media (max-width: 650px) {

    header nav {
        padding: 6px 8px;
    }

    .logo {
        order: 1;
        flex: 0 0 100%;
        text-align: center;
        margin-bottom: 6px;
    }

    .search-container {
        order: 2;
        flex: 0 0 100%;
        width: 100%;
        box-sizing: border-box;
        justify-content: center;
        margin: 0;
        padding: 0;
    }

    #search-input {
        flex: 1 1 auto;
        min-width: 0;
        max-width: 320px;
    }

    #search-btn {
        flex: 0 0 auto;
    }

    .menu {
        order: 3;
        flex: 0 0 100%;
        width: 100%;
        margin-top: 7px;
        gap: 3px;
    }

    .menu li a {
        padding: 0.4rem 0.55rem;
        font-size: 0.82rem;
    }

    .menu li a:hover,
    .menu li a.active {
        padding: 0.4rem 0.55rem;
    }
}


/*
 * Très petits téléphones :
 * répartir les six rubriques sur toute la largeur disponible.
 */
@media (max-width: 430px) {

    .menu {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
    }

    .menu li {
        min-width: 0;
    }

    .menu li a {
        width: 100%;
        box-sizing: border-box;
        justify-content: center;
        padding: 0.4rem 0.25rem;
        font-size: 0.76rem;
    }

    .menu li a:hover,
    .menu li a.active {
        padding: 0.4rem 0.25rem;
    }

    .logo-title {
        font-size: 1rem;
    }
}

/* ============================================================
   INDICATEUR DE CHARGEMENT DU SCROLL INFINI
   ============================================================ */

.infinite-scroll-loader {
    display: flex;
    align-items: center;
    justify-content: center;

    align-self: center;
    justify-self: center;

    gap: 8px;

    width: fit-content;

    margin: 0;
    padding: 7px 13px;

    color: #aaa;

    font-size: 0.82rem;

    background: #222;

    border: 1px solid #333;
    border-radius: 18px;
}


/*
 * Lorsque la dernière ligne de vignettes est complète,
 * le chargeur occupe toute la ligne suivante et reste centré.
 */
.infinite-scroll-loader-full-row {
    grid-column: 1 / -1;

    margin: 2px auto 10px;
}


.infinite-scroll-loader[hidden] {
    display: none;
}


.infinite-scroll-spinner {
    width: 12px;
    height: 12px;

    box-sizing: border-box;

    border: 2px solid #555;
    border-top-color: #a7502d;
    border-radius: 50%;

    animation:
        infinite-scroll-spin 0.7s linear infinite;
}


@keyframes infinite-scroll-spin {

    to {
        transform: rotate(360deg);
    }
}

/*
 * État définitif lorsque tous les résultats ont été chargés.
 */
.infinite-scroll-end {
    color: #777;

    background: transparent;

    border-color: transparent;

    font-size: 0.9rem;
}