/**
 * PowerUp Compa — Page marque : classes spécifiques
 *
 * Ce fichier étend comparatif-design.css + comparatif-components.css
 * sans les modifier. N'enqueue que sur les pages marque (template page-marque.php).
 *
 * Classes couvertes ici (absentes des deux CSS parents) :
 *   - Brand hero enrichi : __name, __tagline, __meta-item, brand-logo, brand-trust-block
 *   - Brand stats bar style "separateur" : .brand-stat / __val / __label
 *   - Score summary cards : .score-summary / .score-summary-card / __*
 *   - Product cards visuelles : .product-card / __*
 *   - Brand meta pills row : .brand-meta-pills
 *   - SWOT variantes page marque : --pros / --cons / --flags + .swot-list
 *   - Compare table enrichi : .brand-cell-current::after + .cell-best
/* Tagline italique sous le nom */
.brand-hero__tagline {
    font-size: 1rem;
    color: rgba(255, 255, 255, .75);
    font-style: italic;
    margin: 0 0 .75rem;
}

/* Meta-item = icone SVG + texte */
.brand-hero__meta-item {
    display: flex;
    align-items: center;
    gap: .35rem;
    font-size: .85rem;
    color: rgba(255, 255, 255, .85);
}

.brand-hero__meta-item strong {
    color: #B1D3A1; /* var(--pu-c-secondary) */
}

.brand-hero__meta-item svg {
    flex-shrink: 0;
    opacity: .75;
}

/* Remplace __meta de components (badges seuls) pour la version meta-items */
.brand-hero__meta--items {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: .75rem;
}

/* Conteneur logo carré blanc avec object-fit:contain */
.brand-logo {
    width: 140px;
    height: 140px;
    border-radius: var(--pu-radius, 12px);
    background: #fff;
    border: 1px solid rgba(42, 50, 75, .1);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    margin: 0 auto;
    overflow: hidden;
    flex-shrink: 0;
}

.brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* Bloc trust score (coin droit hero) */
.brand-trust-block {
    background: rgba(255, 255, 255, .1);
    border-radius: var(--pu-radius, 12px);
    padding: 1.25rem 1.5rem;
    text-align: center;
    flex-shrink: 0;
}

.brand-trust-block__title {
    font-size: .7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: #B1D3A1; /* var(--pu-c-secondary) */
    margin: 0 0 .5rem;
}

.brand-trust-block__score {
    font-size: 3rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
}

.brand-trust-block__score span {
    font-size: 1.25rem;
    opacity: .7;
}

.brand-trust-block__sub {
    font-size: .78rem;
    color: rgba(255, 255, 255, .7);
    margin-top: .35rem;
}

/* ─── BRAND META PILLS ────────────────────────────────────────────────────── */
/* Rangée de badges pu-badge--on-dark en bas du hero info */
.brand-meta-pills {
    display: flex;
    gap: .4rem;
    flex-wrap: wrap;
    margin-top: .75rem;
}

/* ─── BRAND STATS BAR — VARIANTE AVEC SÉPARATEUR ───────────────────────── */
/*
 * comparatif-components.css définit .brand-stats-bar + __item / __value / __label.
 * Ici on définit la variante à séparateurs verticaux (maquette page marque)
 * avec des éléments .brand-stat (sans __item) pour distinguer les deux usages.
 */

.brand-stat {
    flex: 1;
    min-width: 120px;
    padding: 1.25rem 1rem;
    text-align: center;
    border-right: 1px solid rgba(42, 50, 75, .08);
}

.brand-stat:last-child {
    border-right: none;
}

.brand-stat__val {
    font-size: 1.5rem;
    font-weight: 800;
    color: #2A324B; /* var(--pu-c-accent) */
    line-height: 1;
    margin-bottom: .25rem;
}

.brand-stat__label {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #696E7D; /* var(--pu-c-text) */
}

@media (max-width: 480px) {
    .brand-stat {
        flex: 0 0 50%;
        border-right: none;
        border-bottom: 1px solid rgba(42, 50, 75, .06);
    }

    .brand-stats-bar .brand-stat:nth-last-child(-n+2) {
        border-bottom: none;
    }
}

/* ─── SCORE SUMMARY CARDS ────────────────────────────────────────────────── */
.score-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.score-summary-card {
    background: #fff;
    border-radius: var(--pu-radius, 12px);
    padding: 1.25rem;
    box-shadow: var(--pu-shadow, 0 2px 12px rgba(42,50,75,.08));
    text-align: center;
}

.score-summary-card__label {
    font-size: .7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #28697F; /* var(--pu-c-primary) */
    margin: 0 0 .35rem;
}

.score-summary-card__value {
    font-size: 1.65rem;
    font-weight: 800;
    color: #2A324B; /* var(--pu-c-accent) */
    margin: 0 0 .25rem;
    line-height: 1;
}

.score-summary-card__sub {
    font-size: .8rem;
    color: #696E7D; /* var(--pu-c-text) */
    margin: 0;
}

.score-summary-card__sub a {
    color: #28697F;
    text-decoration: none;
}

.score-summary-card__sub a:hover {
    text-decoration: underline;
}

/* ─── PRODUCT CARDS (grille gamme) ──────────────────────────────────────── */
/* Grille de cartes produit — le thème ne fournit pas les colonnes ici
   (computed grid-template-columns:none) → cartes pleine largeur + image géante.
   On force une vraie grille responsive. */
.pu-cards-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)) !important;
    gap: 1.25rem;
}

.product-card {
    position: relative;
    background: #fff;
    border-radius: var(--pu-radius, 12px);
    box-shadow: var(--pu-shadow, 0 2px 12px rgba(42,50,75,.08));
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    transition: box-shadow .2s ease, transform .2s ease;
}

.product-card:hover {
    box-shadow: var(--pu-shadow-hover, 0 4px 20px rgba(42,50,75,.14));
    transform: translateY(-3px);
}

.product-card:focus-visible {
    outline: 2px solid #28697F;
    outline-offset: 2px;
}

.product-card__image {
    aspect-ratio: 16 / 10;
    background: #f5f5f5;
    position: relative;
    overflow: hidden;
}

.product-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s ease;
}

.product-card:hover .product-card__image img {
    transform: scale(1.04);
}

.product-card__image.no-image {
    background: linear-gradient(135deg, #B1D3A1, rgba(40, 105, 127, .25));
    min-height: 120px;
}

/* Badge score flottant sur l'image */
.product-card__score {
    position: absolute;
    top: .75rem;
    right: .75rem;
    background: rgba(0, 0, 0, .7);
    color: #fff;
    padding: .25rem .6rem;
    border-radius: 50px;
    font-size: .85rem;
    font-weight: 800;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.product-card__content {
    padding: 1rem 1.1rem 1.1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: .35rem;
}

.product-card__category {
    font-size: .7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #28697F; /* var(--pu-c-primary) */
    text-decoration: none;
}

.product-card__title {
    font-size: .95rem;
    font-weight: 800;
    color: #2A324B; /* var(--pu-c-accent) */
    line-height: 1.3;
    margin: 0;
}

.product-card__price {
    font-size: .8rem;
    color: #696E7D; /* var(--pu-c-text) */
    margin-top: auto;
    padding-top: .6rem;
    border-top: 1px solid rgba(42, 50, 75, .06);
}

.product-card__price strong {
    color: #2A324B;
}

/* ─── SWOT VARIANTES PAGE MARQUE ─────────────────────────────────────────── */
/*
 * comparatif-components.css a : --strengths, --weaknesses, --opportunities, --threats.
 * La maquette page marque utilise : --pros, --cons, --flags + .swot-list.
 * On les ajoute ici sans toucher l'original.
 */

.swot-card--pros {
    border-color: #B1D3A1; /* var(--pu-c-secondary) */
}

.swot-card--pros .swot-card__title,
.swot-card--pros h3 {
    color: #3a7a2a;
}

.swot-card--cons {
    border-color: #f0be50;
}

.swot-card--cons .swot-card__title,
.swot-card--cons h3 {
    color: #8a6a00;
}

.swot-card--flags {
    border-color: #d05656;
}

.swot-card--flags .swot-card__title,
.swot-card--flags h3 {
    color: #8a1010;
}

/* Liste custom pour les swot-cards de la page marque */
.swot-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.swot-list li {
    display: flex;
    gap: .55rem;
    align-items: flex-start;
    font-size: .9rem;
    color: #696E7D;
    line-height: 1.5;
}

/* Icônes par type */
.swot-card--pros .swot-list li::before {
    content: '✓';
    color: #3a7a2a;
    font-weight: 800;
    flex-shrink: 0;
    margin-top: .05rem;
}

.swot-card--cons .swot-list li::before {
    content: '–';
    color: #8a6a00;
    font-weight: 800;
    flex-shrink: 0;
    margin-top: .05rem;
}

.swot-card--flags .swot-list li::before {
    content: '⚠';
    color: #d05656;
    flex-shrink: 0;
    margin-top: .05rem;
}

/* ─── COMPARE TABLE — ENRICHISSEMENTS ────────────────────────────────────── */
/*
 * comparatif-components.css couvre le socle du tableau.
 * Ici on ajoute les styles spécifiques page marque :
 * - Pseudo-element "Cette marque" sous le nom de colonne
 * - style thead th:first-child (alignement gauche)
 * - tbody th (ligne de critère, non couvert)
 */

.compare-table thead th:first-child {
    text-align: left;
    min-width: 180px;
}

.compare-table thead th.brand-cell-current {
    text-align: center;
}

/* Label "Cette marque" en dessous du nom dans la colonne courante */
.compare-table .brand-cell-current::after {
    content: 'Cette marque';
    display: block;
    font-size: .65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #28697F;
    opacity: .8;
    margin-top: .15rem;
}

/* Cellule en-tête de ligne (critère) dans le tbody */
.compare-table tbody th {
    text-align: left;
    padding: .8rem 1rem;
    background: rgba(42, 50, 75, .04);
    font-weight: 700;
    color: #2A324B;
    font-size: .85rem;
    border-bottom: 1px solid rgba(42, 50, 75, .08);
}

/* ─── CTA BOX ─────────────────────────────────────────────────────────────── */
.pu-cta-box {
    padding: 2.5rem 2rem;
    background: #2A324B; /* var(--pu-c-accent) */
    border-radius: var(--pu-radius-lg, 16px);
    text-align: center;
    color: #fff;
}

.pu-cta-box--light {
    background: #fff;
    border: 1px solid rgba(42, 50, 75, .1);
    color: #2A324B;
    box-shadow: var(--pu-shadow, 0 2px 12px rgba(42,50,75,.08));
}

.pu-cta-box__eyebrow {
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    opacity: .65;
    margin: 0 0 .5rem;
}

.pu-cta-box__title {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 .75rem;
    color: inherit;
}

.pu-cta-box__desc {
    font-size: .95rem;
    opacity: .8;
    margin: 0 auto 1.75rem;
    max-width: 500px;
}

/* ─── COMPARE TABLE SIMPLE (vs concurrents directs, style pu-table) ──────── */
/*
 * La maquette a deux tableaux comparatifs :
 * 1. Tableau pu-table classique (simple, avec badge "Cette page")
 * 2. Tableau compare-table (critères détaillés)
 * Le premier utilise les classes pu-table existantes.
 * On ajoute seulement le highlight de la ligne courante.
 */
.pu-table .current-brand-row td {
    background: rgba(40, 105, 127, .06) !important;
    font-weight: 600;
}

/* ─── BRAND PRESENTATION ─────────────────────────────────────────────────── */
/* Bloc notes / présentation depuis wp_kses_post */
.brand-presentation {
    font-size: .95rem;
    line-height: 1.7;
    color: #696E7D;
    margin-bottom: 1.5rem;
}

.brand-presentation p {
    margin: 0 0 1rem;
}

.brand-presentation p:last-child {
    margin-bottom: 0;
}

/* ─── ALERT REFORMULATION ────────────────────────────────────────────────── */
/* Utilisé pour l'alerte "reformulation en cours" sous le SWOT */
.brand-update-alert {
    margin-top: 1rem;
}

/* ─── RESPONSIVE ─────────────────────────────────────────────────────────── */

/* Tablette : <= 768px */
@media (max-width: 768px) {
    .brand-trust-block {
        padding: 1rem 1.25rem;
    }

    .brand-trust-block__score {
        font-size: 2.5rem;
    }

    .score-summary {
        grid-template-columns: repeat(2, 1fr);
    }

    .pu-cta-box {
        padding: 1.75rem 1.25rem;
    }
}

/* Mobile : <= 480px */
@media (max-width: 480px) {
    .brand-logo {
        width: 100px;
        height: 100px;
    }

    .brand-trust-block {
        padding: .75rem 1rem;
    }

    .brand-trust-block__score {
        font-size: 2rem;
    }

    .score-summary {
        grid-template-columns: 1fr 1fr;
        gap: .75rem;
    }

    .score-summary-card {
        padding: 1rem .75rem;
    }

    .score-summary-card__value {
        font-size: 1.35rem;
    }

    .product-card__image {
        aspect-ratio: 4 / 3;
    }

    .compare-table tbody th {
        font-size: .75rem;
        padding: .6rem .5rem;
    }

    .pu-cta-box {
        padding: 1.5rem 1rem;
    }

    .pu-cta-box__title {
        font-size: 1.2rem;
    }
}
