/*-----------------------------------------------------------*/
/* Catalogue produits                                          */
/*                                                             */
/* Pages Achat, Offre speciale et Occasion. Fond clair sous le  */
/* hero fonce : le produit se detache, la page respire.         */
/*-----------------------------------------------------------*/

.catalogue {
    --cat-navy: #002060;
    --cat-cyan: #0b6fa4;
    --cat-fond: #f4f8fc;
    --cat-panneau: #eef3f9;
    --cat-gris: #6b7a90;
    --cat-trait: #dde5ef;
    --cat-rouge: #c0000a;

    box-sizing: border-box;
    padding: 48px 20px 88px;
    background: var(--cat-fond);
    font-family: 'Poppins', 'Helvetica Neue', Arial, sans-serif;
    color: var(--cat-navy);
}

.catalogue * { box-sizing: border-box; }

.catalogue-inner {
    max-width: 1240px;
    margin-inline: auto;
}

/* ── En-tete : texte a gauche, lien comparatif a droite ──── */

.catalogue-entete {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 48px;
    margin-bottom: 36px;
}

.catalogue-intro {
    max-width: 72ch;
    color: #46536b;
    font-size: 1rem;
    line-height: 1.75;
}

.catalogue-intro > :first-child { margin-top: 0; }
.catalogue-intro > :last-child { margin-bottom: 0; }
.catalogue-intro p { margin: 0 0 14px; }
.catalogue-intro strong { color: var(--cat-navy); font-weight: 600; }

.catalogue-intro a {
    color: var(--cat-cyan);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.catalogue-comparer {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    padding-top: 4px;
    color: var(--cat-navy);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.catalogue-comparer > span:first-child {
    text-decoration: underline;
    text-underline-offset: 5px;
    text-decoration-thickness: 1px;
}

.catalogue-comparer:hover { color: var(--cat-cyan); }

/* La cible s'arrete sous l'en-tete fixe au lieu de passer dessous. */
#gamme-compare-titre { scroll-margin-top: 130px; }

/* Fleche dessinee : meme trait que sur l'accueil. */
.catalogue-fleche {
    display: inline-block;
    flex-shrink: 0;
    width: 22px;
    height: 10px;
    transition: transform 200ms ease;
}

.catalogue-fleche svg {
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.catalogue-comparer:hover .catalogue-fleche,
.produit-lien:hover .catalogue-fleche { transform: translateX(4px); }

/* ── Barre de filtres ────────────────────────────────────── */

.catalogue-barre {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    border-bottom: 1px solid var(--cat-trait);
    margin-bottom: 22px;
}

.catalogue-onglets {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: -1px;
}

.catalogue-onglet {
    padding: 12px 20px;
    border: 0;
    /* Le theme met tous les boutons en capitales : pas ici. */
    text-transform: none;
    letter-spacing: normal;
    /* Le trait actif prolonge celui de la barre : pas de saut de 1 px. */
    border-bottom: 2px solid transparent;
    background: none;
    color: var(--cat-gris);
    font-family: inherit;
    font-size: 0.97rem;
    font-weight: 500;
    line-height: 1.5;
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.catalogue-onglet:hover { color: var(--cat-navy); }

.catalogue-onglet.est-actif {
    border-bottom-color: var(--cat-navy);
    color: var(--cat-navy);
    font-weight: 600;
}

.catalogue-onglet:focus-visible {
    outline: 2px solid var(--cat-cyan);
    outline-offset: -2px;
}

/* ── Listes deroulantes ──────────────────────────────────── */

.catalogue-budget,
.catalogue-tri {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

/* Sans onglets (page Occasion), le budget reste a droite comme ailleurs. */
.catalogue-budget {
    margin-bottom: 10px;
    margin-left: auto;
}

.catalogue-tri-libelle {
    color: var(--cat-gris);
    font-size: 0.9rem;
}

.catalogue select {
    /* Largeur calee sur l'option la plus longue, pas sur un minimum arbitraire. */
    width: auto;
    padding: 9px 30px 9px 12px;
    border: 1px solid var(--cat-trait);
    border-radius: 8px;
    background-color: #fff;
    /* Chevron dessine : l'apparence native varie trop d'un systeme a l'autre. */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5 6 6.5l5-5' stroke='%23002060' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 11px center;
    background-size: 10px 7px;
    color: var(--cat-navy);
    font-family: inherit;
    font-size: 0.86rem;
    font-weight: 500;
    line-height: 1.4;
    cursor: pointer;
    appearance: none;
}

.catalogue select:focus-visible {
    outline: 2px solid var(--cat-cyan);
    outline-offset: 1px;
}

/* ── Compteur et tri ─────────────────────────────────────── */

.catalogue-resultats {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 26px;
}

/* Selecteur d'identifiant en face : l'ancienne regle #resultsCount peignait
   le compteur en blanc, du temps ou la boutique etait sur fond bleu. */
.catalogue #resultsCount {
    color: var(--cat-gris);
    font-size: 0.93rem;
}

/* ── Grille ──────────────────────────────────────────────── */

.catalogue-grille {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 26px;
}

/* Carte fermee : le visuel en haut, les informations sur fond blanc dessous,
   le tout dans un meme cadre. */
.produit-carte {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--cat-trait);
    border-radius: 10px;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.produit-carte:hover {
    border-color: #c3d4e8;
    box-shadow: 0 10px 28px rgba(0, 32, 96, 0.09);
    transform: translateY(-3px);
}

.produit-infos {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 18px 20px 22px;
}

/* display:flex ci-dessus l'emporte sur la regle [hidden] du navigateur :
   sans cette ligne, les cartes filtrees restent visibles. */
.produit-carte[hidden] { display: none; }

/* Le visuel est le seul element encadre : le texte vit sur le fond de page. */
.produit-visuel {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 4 / 3;
    padding: 26px;
    border-bottom: 1px solid var(--cat-trait);
    background: var(--cat-panneau);
    overflow: hidden;
}

.produit-visuel.a-promo { padding-top: 52px; }

.produit-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 300ms ease;
}

.produit-carte:hover .produit-image { transform: scale(1.04); }

/* Bandeau promotion : meme rouge que partout ailleurs sur le site. */
.produit-badge {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: block;
    padding: 12px;
    background: linear-gradient(90deg, #c0000a 0%, #e8000d 50%, #c0000a 100%);
    box-shadow: 0 2px 8px rgba(192, 0, 10, 0.4);
    color: #fff;
    font-size: 0.86rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    line-height: 1;
    text-align: center;
    text-transform: uppercase;
}

.produit-famille {
    margin: 0 0 6px;
    color: var(--cat-gris);
    font-size: 0.87rem;
    line-height: 1.5;
}

.produit-titre {
    margin: 0 0 10px;
    font-family: 'Poppins', sans-serif;
    font-size: 1.22rem;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.01em;
}

.produit-titre a {
    color: var(--cat-navy);
    text-decoration: none;
}

.produit-titre a:hover { color: var(--cat-cyan); }

.produit-prix {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0 0 8px;
}

.produit-prix-actuel {
    color: var(--cat-navy);
    font-size: 1.3rem;
    font-weight: 700;
}

.produit-prix-ancien {
    color: #9aa7b8;
    font-size: 0.98rem;
    font-weight: 500;
    text-decoration: line-through;
}

.produit-carte .promo-ribbon + .produit-image { margin-top: 0; }

.produit-repere {
    margin: 0 0 16px;
    color: var(--cat-gris);
    font-size: 0.92rem;
    line-height: 1.6;
}

.produit-lien {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-top: auto;
    color: var(--cat-navy);
    font-size: 0.93rem;
    font-weight: 500;
    text-decoration: none;
}

.produit-lien > span:first-child {
    text-decoration: underline;
    text-underline-offset: 5px;
    text-decoration-thickness: 1px;
}

.produit-lien:hover { color: var(--cat-cyan); }

.produit-lien.est-epuise {
    color: #9aa7b8;
    pointer-events: none;
}

.catalogue-aucun,
.catalogue-vide {
    margin: 40px 0 0;
    color: var(--cat-gris);
    font-size: 1rem;
    text-align: center;
}

/* ── Ecrans intermediaires ───────────────────────────────── */

@media (max-width: 1023px) {
    .catalogue-grille { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
    .catalogue-entete { flex-direction: column; gap: 20px; }
    .catalogue-comparer { padding-top: 0; }
}

/* ── Petits ecrans ───────────────────────────────────────── */

@media (max-width: 767px) {
    .catalogue { padding: 36px 16px 64px; }

    .catalogue-barre {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }

    /* Les onglets defilent lateralement plutot que de passer a la ligne. */
    .catalogue-onglets {
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .catalogue-onglets::-webkit-scrollbar { display: none; }
    .catalogue-onglet { padding: 10px 14px; white-space: nowrap; }

    /* Pleine largeur : le decalage a droite n'a plus de sens sur une colonne. */
    .catalogue-budget {
        display: flex;
        margin: 0 0 12px;
    }

    .catalogue-budget select,
    .catalogue-tri select { width: 100%; }

    .catalogue-resultats { flex-wrap: wrap; gap: 12px; }

    .catalogue-grille { grid-template-columns: minmax(0, 1fr); gap: 20px; }
    .produit-visuel { aspect-ratio: 16 / 10; }

    /* Cibles tactiles : ces liens sont les actions repetees de la page, on les
       epaissit pour le pouce sans toucher a leur apparence. */
    .produit-lien { padding-block: 10px; }
    .produit-titre a { display: inline-block; padding-block: 7px; }
    .catalogue-comparer { padding-block: 10px; }
}
