/* =====================================================================
   NEUF SEIZIÈME — case-study.css (LOT 3)
   Styles des pages « étude de cas détaillée » (page-cas-*.php) et de la
   page portfolio « Nos vidéos » (page-portfolio.php).

   Chargé conditionnellement (functions.php : is_page_template) — AUCUN poids
   sur la home ni le blog. Dépend de ns-style (tokens + façade vidéo
   .case-study-video-visual, définie dans style.css) et de ns-pages
   (.page-hero / .page-section / .page-cta / .stats-grid).

   Charte : blanc, bleu --accent (#0265FF), radius 4px partout (--radius-*),
   titres Neue Montreal, corps Manrope, ombres --shadow-*.
   ===================================================================== */

/* =====================================================================
   1. HERO — en-tête étude de cas (secteur + logo client)
   ===================================================================== */
.case-detail-hero-head {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.case-detail-hero-head .case-detail-sector {
    margin-bottom: 0;
}

.case-detail-logo {
    height: 40px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
    display: block;
}

/* =====================================================================
   2. BANDEAU KPI (réutilise .stats-band / .stats-grid / .stat-card de
      ns-pages ; on ajoute juste la couleur de tendance + la flèche)
   ===================================================================== */
.case-detail-kpis {
    padding-top: 0;
}

.case-kpi-card .stat-number {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

.case-kpi-trend {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: var(--radius-full);
}

.case-kpi-card--up .case-kpi-trend {
    color: var(--accent);
    background: var(--accent-light);
}

.case-kpi-card--down .case-kpi-trend {
    color: var(--danger, #e5484d);
    background: rgba(229, 72, 77, 0.1);
}

/* =====================================================================
   3. DÉFI + OBJECTIFS (dans le .page-split-visual)
   ===================================================================== */
.case-detail-objectifs {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 28px 28px 30px;
}

.case-detail-objectifs h3 {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 16px;
}

.case-detail-objectifs ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.case-detail-objectifs li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 15px;
    line-height: 1.5;
    color: var(--text-secondary);
}

.case-detail-objectifs li svg {
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--accent);
}

/* =====================================================================
   4. FORMATS PRODUITS (pills)
   ===================================================================== */
.case-detail-formats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
    justify-content: center;
}

.case-detail-format-pill {
    display: inline-flex;
    align-items: center;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    padding: 10px 16px;
    color: var(--accent);
    background: var(--accent-tint);
    border: 1px solid transparent;
    border-radius: var(--radius-full);
}

/* =====================================================================
   5. GALERIE VIDÉOS DU CLIENT
      Les vignettes .case-study-video-visual sont stylées dans style.css
      (façade 9/16, poster, iframe en fondu, indice son). Ici : la grille.
   ===================================================================== */
.case-detail-videos {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 900px;
    margin: 0 auto;
}

/* 2 vidéos (Maripoza) : centrées, pas étirées sur 3 colonnes. */
.case-detail-videos[data-videos="2"] {
    grid-template-columns: repeat(2, 1fr);
    max-width: 600px;
}

.case-detail-videos[data-videos="1"] {
    grid-template-columns: minmax(0, 300px);
    max-width: 300px;
}

/* =====================================================================
   6. TÉMOIGNAGE
   ===================================================================== */
.case-detail-testimonial {
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
    position: relative;
}

.case-detail-quote-mark {
    color: var(--accent);
    margin-bottom: 8px;
}

.case-detail-testimonial blockquote {
    margin: 0 0 24px;
    padding: 0;
    border: 0;
}

.case-detail-testimonial blockquote p {
    font-family: var(--font-heading);
    font-size: clamp(22px, 3vw, 30px);
    line-height: 1.35;
    font-weight: 500;
    color: var(--text-primary);
    margin: 0;
}

.case-detail-testimonial figcaption {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.case-detail-testimonial-author {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.case-detail-testimonial-role {
    font-size: 14px;
    color: var(--text-muted);
}

/* =====================================================================
   7. RÉSULTATS DÉTAILLÉS
   ===================================================================== */
.case-detail-results-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.case-detail-result {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 28px 26px 30px;
    transition: box-shadow var(--transition-fast, 0.2s ease), transform var(--transition-fast, 0.2s ease);
}

.case-detail-result:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.case-detail-result-value {
    display: block;
    font-family: var(--font-heading);
    font-size: clamp(32px, 4vw, 44px);
    font-weight: 600;
    line-height: 1;
    color: var(--accent);
    letter-spacing: -0.02em;
}

.case-detail-result-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-primary);
    margin: 12px 0 10px;
}

.case-detail-result-text {
    font-size: 15px;
    line-height: 1.55;
    color: var(--text-secondary);
    margin: 0;
}

/* =====================================================================
   8. AUTRES ÉTUDES DE CAS (cartes cliquables)
   ===================================================================== */
.case-detail-others {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.case-detail-other-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    text-decoration: none;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 26px 26px 24px;
    min-height: 180px;
    transition: box-shadow var(--transition-fast, 0.2s ease), transform var(--transition-fast, 0.2s ease), border-color var(--transition-fast, 0.2s ease);
}

.case-detail-other-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: var(--accent);
}

.case-detail-other-pill {
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    padding: 7px 12px;
    color: var(--accent);
    background: var(--accent-tint);
    border-radius: var(--radius-full);
}

.case-detail-other-logo {
    height: 34px;
    width: auto;
    max-width: 150px;
    object-fit: contain;
    margin-top: auto;
}

.case-detail-other-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    transition: gap var(--transition-fast, 0.2s ease), color var(--transition-fast, 0.2s ease);
}

.case-detail-other-card:hover .case-detail-other-cta {
    color: var(--accent);
    gap: 12px;
}

.case-detail-other-cta svg {
    color: var(--accent);
}

/* =====================================================================
   9. PAGE PORTFOLIO « Nos vidéos » — grille filtrable
   ===================================================================== */
.portfolio-filters {
    margin-bottom: 40px;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.pf-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Masquage par le filtre (même mécanique que le carrousel). */
.pf-card.hidden {
    display: none;
}

.pf-card-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 2px;
}

.pf-card-label .brand-name {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--text-primary);
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pf-card-label .category-tag {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

/* La vignette .pf-card-visual EST une .case-study-video-visual : ratio 9/16,
   radius, poster, iframe en fondu, indice son -> tout vient de style.css. */

/* =====================================================================
   10. RESPONSIVE
   ===================================================================== */
@media (max-width: 1024px) {
    .portfolio-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .case-detail-results-grid,
    .case-detail-others {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }
    .case-detail-videos {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
        max-width: 460px;
    }
    .case-detail-videos[data-videos="2"] {
        max-width: 460px;
    }
    .case-detail-results-grid,
    .case-detail-others {
        grid-template-columns: 1fr;
    }
    .case-detail-other-card {
        min-height: 0;
    }
    .case-detail-formats {
        justify-content: flex-start;
    }
}

@media (max-width: 480px) {
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .case-detail-videos,
    .case-detail-videos[data-videos="2"] {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        max-width: 100%;
    }
    .case-detail-objectifs {
        padding: 22px 20px 24px;
    }
    .case-detail-hero-head {
        gap: 12px;
    }
    .case-detail-logo {
        height: 34px;
    }
}
