/*-----------------------------------------------------------*/
/* Comparatif de la gamme                                      */
/*                                                             */
/* Section presentee sur les pages Achat et Occasion. Le        */
/* contenu vient de WooCommerce : aucun prix n'est recopie ici. */
/*-----------------------------------------------------------*/

.gamme-compare {
    --gc-navy: #002060;
    --gc-cyan: #4dc4ff;
    box-sizing: border-box;
    /* Fond explicite : le catalogue au-dessus est clair, cette section reste
       sur le bleu de la marque quelle que soit la page qui l'accueille. */
    background: var(--gc-navy);
    padding: 72px 20px 84px;
    font-family: 'Poppins', 'Helvetica Neue', Arial, sans-serif;
    position: relative;
    z-index: 1;
}

.gamme-compare * { box-sizing: border-box; }

.gamme-compare-inner {
    max-width: 1000px;
    margin-inline: auto;
}

/* ── En-tete ─────────────────────────────────────────────── */

.gamme-compare-entete {
    margin-bottom: 32px;
    text-align: center;
}

.gamme-compare-surtitre {
    margin: 0 0 10px;
    color: var(--gc-cyan);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    line-height: 1.6;
    text-transform: uppercase;
}

.gamme-compare-titre {
    margin: 0 0 14px;
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-size: clamp(24px, 2.6vw, 34px);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

.gamme-compare-intro {
    max-width: 62ch;
    margin: 0 auto;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.98rem;
    line-height: 1.7;
}

/* ── Tableau ─────────────────────────────────────────────── */

/* Le tableau defile horizontalement plutot que de deborder la page. */
.gamme-compare-defilement {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.gamme-compare-table {
    width: 100%;
    border-collapse: collapse;
    color: #fff;
    font-size: 0.95rem;
    text-align: left;
}

.gamme-compare-table thead th {
    padding: 0 14px 12px;
    border-bottom: 1px solid rgba(77, 196, 255, 0.55);
    color: var(--gc-cyan);
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    white-space: nowrap;
}

.gamme-compare-table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    transition: background 0.15s ease;
}

.gamme-compare-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.gamme-compare-table td,
.gamme-compare-table tbody th {
    padding: 18px 14px;
    font-weight: 400;
    vertical-align: middle;
}

.gamme-compare-table tbody th {
    font-weight: 600;
    white-space: nowrap;
}

.gamme-compare-table tbody th a {
    color: #fff;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.15s ease, color 0.15s ease;
}

.gamme-compare-table tbody th a:hover,
.gamme-compare-table tbody th a:focus-visible {
    color: var(--gc-cyan);
    border-bottom-color: var(--gc-cyan);
}

.gamme-compare-table td {
    color: rgba(255, 255, 255, 0.8);
    white-space: nowrap;
}

.gamme-compare-prix {
    color: #fff !important;
    font-weight: 600;
}

/* WooCommerce affiche l'ancien prix barre puis le nouveau. */
.gamme-compare-prix del {
    display: inline-block;
    margin-right: 8px;
    color: rgba(255, 255, 255, 0.45);
    font-weight: 400;
    text-decoration: line-through;
}

.gamme-compare-prix ins {
    background: none;
    color: var(--gc-cyan);
    text-decoration: none;
}

.gamme-compare-barre {
    color: rgba(255, 255, 255, 0.45) !important;
    text-decoration: line-through;
}

.gamme-compare-remise {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(77, 196, 255, 0.16);
    color: var(--gc-cyan);
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
}

/* ── Pied ────────────────────────────────────────────────── */

.gamme-compare-pied {
    max-width: 68ch;
    margin: 30px auto 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.92rem;
    line-height: 1.7;
    text-align: center;
}

.gamme-compare-pied a {
    color: var(--gc-cyan);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.gamme-compare-pied a:hover { color: #fff; }

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

/*
 * Le tableau reste un tableau et defile lateralement, la colonne des modeles
 * restant figee a gauche. En cartes empilees, six lignes repetaient cinq
 * libelles chacune : 1 450 px a faire defiler juste apres les fiches produit
 * qui disent deja la meme chose.
 */
@media (max-width: 767px) {
    .gamme-compare { padding: 56px 0 64px; }

    .gamme-compare-entete,
    .gamme-compare-texte,
    .gamme-compare-pied { padding-inline: 16px; }

    .gamme-compare-surtitre { font-size: 0.82rem; letter-spacing: 0.16em; }

    /* Le voile a droite signale qu'il reste des colonnes a decouvrir. */
    .gamme-compare-defilement {
        position: relative;
        padding-inline: 16px;
        overflow-x: auto;
        scrollbar-width: thin;
        scrollbar-color: rgba(77, 196, 255, 0.5) transparent;
        -webkit-overflow-scrolling: touch;
    }

    .gamme-compare-table { font-size: 0.9rem; }

    .gamme-compare-table thead th { padding: 0 12px 10px; }

    .gamme-compare-table td,
    .gamme-compare-table tbody th { padding: 14px 12px; }

    /* Colonne des modeles figee : on garde le repere en defilant. */
    .gamme-compare-table thead th:first-child,
    .gamme-compare-table tbody th {
        position: sticky;
        left: 0;
        z-index: 1;
        padding-left: 0;
        background: var(--gc-navy);
    }

    .gamme-compare-table tbody th a { display: inline-block; padding-block: 4px; }

    .gamme-compare-table tbody tr:hover { background: none; }
}

/* ── Texte de la page, rendu dans la section ─────────────── */

.gamme-compare-texte {
    max-width: 72ch;
    margin: 0 auto 34px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.98rem;
    line-height: 1.75;
    text-align: center;
}

.gamme-compare-texte > :first-child { margin-top: 0; }
.gamme-compare-texte > :last-child { margin-bottom: 0; }
.gamme-compare-texte p { margin: 0 0 14px; }
.gamme-compare-texte strong { color: #fff; font-weight: 600; }

.gamme-compare-texte a {
    color: var(--gc-cyan);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.gamme-compare-texte a:hover { color: #fff; }
