/**
 * Single Reference Page Styles
 * ============================
 * Feuille de styles dédiée pour les pages single-reference.php
 * Basé sur le design Figma - SPECS EXACTES
 * 
 * === COULEURS TEBIOR (Figma) ===
 * Primaires:
 * - BLEU LAPIS LAZULI: #005DA4
 * - NOIR DE JAIS: #2F3031
 * - MILKSHAKE: #F5EFE6
 * 
 * Nuances:
 * - FLORAL WHITE: #FFFAF2
 * - CAROLINA BLUE: #7AAED5
 * - FRENCH GRAY: #ADB0B4
 * - COLUMBIA BLUE: #C1D9EC
 * - PÊCHE: #F7BFA1
 * - ASH GRAY: #B3D1BD
 * 
 * Secondaires:
 * - ORANGE: #E95D13
 * - MANDARINE: #F08A00
 * - VERT SAPIN: #0D6729
 * - ROUGE: #CF1623
 * - VIEUX ROSE: #D47983
 * 
 * === TYPOGRAPHIES (Figma) ===
 * - H1/Title: Funnel Display Light, 60px, line-height 66px
 * - H3: Funnel Display Regular, 34px, line-height 40px
 * - Body Lead: Funnel Display Regular, 24px, line-height 30px
 * - Body 18px: Funnel Display Light, 18px, line-height 22px
 * - Breadcrumb: La Belle Aurore Regular, 24px, line-height 14px
 */

/* ========================================
   BASE & LAYOUT
   ======================================== */

.single-reference-page {
    background-color: #F5EFE6;
    margin-top: -220px;
}

.reference-hero {
    padding-top: 180px;
    padding-bottom: 60px;
}

/* Background gradient (Figma: from #F5EFE6 via #EFE0CC to #F5EFE6) */
.single-reference-page::after {
    content: '';
    position: absolute;
    top: 731px;
    left: 0;
    width: 100%;
    height: 1298px;
    background: linear-gradient(to bottom, #F5EFE6, #EFE0CC 52.885%, #F5EFE6);
    pointer-events: none;
    z-index: -1;
}

/* ========================================
   BREADCRUMB (Figma Specs)
   - Font: La Belle Aurore Regular
   - Size: 24px
   - Line-height: 14px
   - Color: #7AAED5
   - Separator: 50.5px wide line
   ======================================== */

.breadcrumb-solution {
    width: 100%;
    margin-bottom: 40px;
    padding-bottom: 30px;
}

.breadcrumb-solution .breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
    background: transparent;
    padding: 0;
    margin: 0;
    color: #7AAED5;
    font-family: 'La Belle Aurore', cursive;
    font-size: 24px;
    font-style: normal;
    font-weight: 400;
    line-height: 14px; /* Figma: 14px */
}

.breadcrumb-solution .breadcrumb-item a {
    color: #7AAED5;
    text-decoration: none;
    font-family: 'La Belle Aurore', cursive;
    font-size: 24px;
    line-height: 14px;
    transition: opacity 0.3s ease;
}

.breadcrumb-solution .breadcrumb-item a:hover {
    text-decoration: underline;
    opacity: 0.8;
}

.breadcrumb-solution .breadcrumb-item.active {
    color: #7AAED5;
    font-family: 'La Belle Aurore', cursive;
}

/* Breadcrumb Separator - Figma: 50.5px wide line */
.breadcrumb-sep {
    display: inline-block;
    width: 50.5px;
    height: 1px;
    background-color: #7AAED5;
    margin: 0 20px;
    vertical-align: middle;
}

/* ========================================
   HERO SECTION - LEFT COLUMN
   ======================================== */

.solution-content-col {
    padding-right: 40px;
}

/* Solution Icon */
.solution-icon {
    margin-bottom: 15px;
}

.solution-icon img {
    max-height: 50px;
    width: auto;
}

/* Solution Subtitle */
.solution-subtitle {
    color: #005DA4;
    letter-spacing: 1px;
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 10px;
    text-transform: uppercase;
}

/* Main Title - Figma: Funnel Display Light, 60px, line-height 66px */
.solution-title {
    font-family: 'Funnel Display', sans-serif;
    font-size: 60px;
    font-weight: 300; /* Light */
    line-height: 66px;
    color: #2F3031 !important;
    margin-top: 0;
    margin-bottom: 20px;
}

/* Location - Figma: Funnel Display Regular, 14px, tracking 0.56px */
.reference-location {
    font-family: 'Funnel Display', sans-serif;
    font-size: 14px !important;
    font-weight: 400; /* Regular */
    letter-spacing: 0.56px;
    line-height: 66px;
    color: #2F3031 !important;
    margin-bottom: 0 !important;
    border-bottom: 1px solid #ADB0B4;
    width: max-content !important;
    padding-bottom: 8px;
}

.reference-location i {
    margin-right: 5px;
}

/* ========================================
   LOGOS ENTREPRISES (Figma Specs)
   - Background: #FFFAF2
   - Border-radius: 2000px
   - Size: 68x69px
   - Padding: 10px
   ======================================== */

.reference-logos-section {
    margin-top: 30px;
    margin-bottom: 40px;
}

.logos-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.logo-circle {
    width: 68px;
    height: 69px;
    border-radius: 2000px;
    background: #FFFAF2;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.logo-circle:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.logo-circle img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* ========================================
   TAGS / SOLUTIONS (Figma Specs)
   Couleurs = PHP dynamique
   Typo = Figma forcé
   ======================================== */

.reference-meta {
    border-color: rgba(0, 0, 0, 0.1) !important;
}

.meta-tags {
    margin-bottom: 50px !important;
}

/* Container des tags */
.meta-tags .d-flex {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    align-items: flex-start !important;
}

/* ====== TAG BASE - Figma Typo Specs ====== */
.reference-tag-item {
    /* Couleurs gérées par PHP inline */
    padding: 8px 12px !important;
    transition: all 0.3s ease !important;
    width: max-content !important;
    text-decoration: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    overflow: hidden !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.reference-tag-item:hover {
    transform: translateX(5px) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

/* ====== TAG LABEL - Figma Typo: 16px, line-height 18px, letter-spacing 0.32px ====== */
.reference-tag-item .tag-label,
.reference-tag-item span.tag-label {
    font-family: 'Funnel Display', sans-serif !important;
    font-size: 16px !important;
    font-weight: 300 !important; /* Light */
    letter-spacing: 0.32px !important;
    line-height: 18px !important;
    text-align: left !important;
    margin: 0 !important;
    padding: 0 !important;
    /* Couleur gérée par PHP inline */
}

/* ====== TAG ICONS - Figma Specs ====== */
.reference-tag-item .tag-icons,
.reference-tag-item span.tag-icons {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    margin-left: 10px !important;
    height: auto !important;
}

.reference-tag-item .tag-icons img {
    height: 16px !important;
    width: auto !important;
    max-height: 18px !important;
    object-fit: contain !important;
}

/* ========================================
   CONTENT BLOCK (Figma Specs)
   - Body Lead: Funnel Display Regular, 24px, line-height 30px
   - Body 18px: Funnel Display Light, 18px, line-height 22px
   ======================================== */

.solution-orange-block {
    background-color: #F5EFE6;
    color: #005DA4;
    padding: 0;
    border-radius: 12px;
}

.hero-text-columns h5 {
    font-family: 'Funnel Display', sans-serif;
    font-weight: 700;
    margin-bottom: 15px;
}

/* Body Lead - Figma: 24px, line-height 30px, Regular */
.hero-text-block-lead {
    font-family: 'Funnel Display', sans-serif;
    font-size: 24px;
    font-weight: 400; /* Regular */
    line-height: 30px;
    color: #2F3031 !important;
    margin-bottom: 20px;
}

.hero-text-block-lead ul,
.hero-text-block-lead ol {
    padding-left: 20px;
    margin-top: 15px;
}

.hero-text-block-lead li {
    margin-bottom: 8px;
}

/* Body 18px - Figma: 18px, line-height 22px, Light */
.body-18px,
.hero-text-block-secondary {
    font-family: 'Funnel Display', sans-serif;
    font-size: 18px;
    font-weight: 300; /* Light */
    line-height: 22px;
    color: #2F3031 !important;
}

/* Download Button - Figma: border #ADB0B4, 16px, tracking 0.8px, uppercase */
.download-pdf-wrapper {
    margin-top: 30px;
    margin-bottom: 20px;
}

.download-pdf-wrapper .btn {
    border: 1px solid #ADB0B4;
    color: #2F3031;
    background: transparent;
    border-radius: 0;
    font-family: 'Funnel Display', sans-serif;
    font-weight: 400; /* Regular */
    font-size: 16px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    padding: 10px 12px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.download-pdf-wrapper .btn:hover {
    background: #2F3031;
    color: #FFFAF2;
    border-color: #2F3031;
}

.download-pdf-wrapper .btn i,
.download-pdf-wrapper .btn svg {
    width: 13.5px;
    height: 14.25px;
}

/* ========================================
   HERO SECTION - RIGHT COLUMN (IMAGE)
   Figma: rounded-tl-4000px
   ======================================== */

.solution-image-col {
    display: flex !important;
    align-items: stretch !important;
    padding: 0 !important;
}

.solution-hero-image {
    border-radius: 4000px 0 0 0 !important;
    overflow: hidden !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 600px !important;
    position: relative !important;
}

.solution-hero-image img {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

/* ========================================
   GALLERY SECTION (Figma Specs)
   - Images with rounded corners: 120px
   ======================================== */

.reference-gallery-section {
    background-color: #F5EFE6;
    padding: 80px 0;
}

.gallery-item-wrapper {
    overflow: hidden;
    position: relative;
    transition: box-shadow 0.3s ease;
}

/* Figma corner radiuses */
.gallery-item-wrapper.rounded-tl {
    border-radius: 120px 0 0 0;
}

.gallery-item-wrapper.rounded-tr {
    border-radius: 0 120px 0 0;
}

.gallery-item-wrapper.rounded-bl {
    border-radius: 0 0 0 120px;
}

.gallery-item-wrapper.rounded-br {
    border-radius: 0 0 120px 0;
}

.gallery-item-wrapper:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.gallery-item-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.gallery-item-wrapper:hover img {
    transform: scale(1.05);
}

/* ========================================
   OTHER REFERENCES CAROUSEL (Figma Specs)
   - Card width: 361px
   - Card bg: #FFFAF2
   - Title: Funnel Display Regular 34px, line-height 40px
   - Button: border #C1D9EC, 18px, tracking 0.9px
   ======================================== */

.other-references-section {
    background-color: #F5EFE6;
    overflow: hidden;
    padding: 60px 0 80px;
}

/* Section Title - Figma: 34px, line-height 40px */
.other-references-section .expertise-title {
    font-family: 'Funnel Display', sans-serif;
    font-size: 34px;
    font-weight: 400; /* Regular */
    line-height: 40px;
    color: #2F3031;
    text-align: center;
    margin-bottom: 40px;
}

/* Swiper Container with fade effect */
.reference-swiper {
    width: 100%;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    padding: 20px 0 60px 0;
}

/* Slides - Figma: 361px width */
.reference-slide {
    height: auto;
    width: 361px;
}

.reference-swiper .swiper-slide {
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0.5;
}

.reference-swiper .swiper-slide-active,
.reference-swiper .swiper-slide-next,
.reference-swiper .swiper-slide-prev {
    opacity: 1;
}

/* ====== REFERENCE CARD - Hauteur égalisée par JS ====== */
.reference-slide {
    height: auto !important;
}

.reference-card {
    background-color: #FFFAF2 !important;
    border-radius: 0 !important;
    overflow: hidden !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02) !important;
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    height: 100% !important; /* Sera égalisé par JS */
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
    border: none !important;
}

.reference-card:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08) !important;
}

/* ====== CARD IMAGE - Figma: 280px height ====== */
.reference-image-wrapper {
    height: 280px !important;
    min-height: 280px !important;
    max-height: 280px !important;
    width: 100% !important;
    overflow: hidden !important;
    position: relative !important;
    flex-shrink: 0 !important;
    border-radius: 0 !important;
}

.reference-image-wrapper img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    transition: transform 0.5s ease !important;
    border-radius: 0 !important;
}

.reference-card:hover .reference-image-wrapper img {
    transform: scale(1.05) !important;
}

/* ====== CARD BODY - Flex pour remplir l'espace ====== */
.reference-card-body {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    padding: 30px !important;
    gap: 15px !important;
    text-align: center !important;
    align-items: center !important;
    background: transparent !important;
}

/* ====== CARD TAG BADGE - Figma Typo Specs ====== */
.reference-card-body .reference-tag,
.reference-card-body .px-3.py-2 {
    /* Couleurs gérées par PHP inline */
    border-radius: 0 !important;
    width: max-content !important;
    padding: 8px 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    overflow: hidden !important;
}

/* Figma Typo: 16px, font-weight 400 (Regular), line-height 18px */
.reference-card-body .reference-tag span,
.reference-card-body .px-3.py-2 span {
    font-family: 'Funnel Display', sans-serif !important;
    font-size: 16px !important;
    font-weight: 400 !important;
    line-height: 18px !important;
    text-align: center !important;
    margin: 0 !important;
    padding: 0 !important;
    /* Couleur gérée par PHP inline */
}

/* Figma: icône 14px de hauteur */
.reference-card-body .reference-tag img,
.reference-card-body .px-3.py-2 img {
    height: 14px !important;
    width: auto !important;
    object-fit: contain !important;
}

/* ====== CARD TITLE - Figma: 34px, line-height 40px ====== */
.reference-card-title {
    font-family: 'Funnel Display', sans-serif !important;
    font-size: 34px !important;
    font-weight: 400 !important;
    line-height: 40px !important;
    color: #2F3031 !important;
    margin: 0 !important;
    text-align: center !important;
    flex-grow: 1 !important; /* Prend l'espace disponible */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* ====== CARD BUTTON - Figma: border #C1D9EC, 18px, tracking 0.9px (FORCÉ) ====== */
.btn-outline.blue.single-ref {
    padding: 12px 18px !important;
    font-family: 'Funnel Display', sans-serif !important;
    font-weight: 400 !important;
    font-size: 18px !important;
    letter-spacing: 0.9px !important;
    text-transform: uppercase !important;
    border: 1px solid #C1D9EC !important;
    color: #005DA4 !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    border-radius: 0 !important;
    background: transparent !important;
    text-align: center !important;
    display: inline-block !important;
    margin-top: auto !important;
}

.reference-card:hover .btn-outline.blue.single-ref {
    background-color: #005DA4 !important;
    color: #FFFAF2 !important;
    border-color: #005DA4 !important;
}

/* ========================================
   PDF GENERATION STYLES
   ======================================== */

body.generating-pdf .site-header,
body.generating-pdf .site-footer,
body.generating-pdf .download-pdf-wrapper,
body.generating-pdf .reference-cta,
body.generating-pdf .breadcrumb-solution,
body.generating-pdf #wpadminbar {
    display: none !important;
}

body.generating-pdf .single-reference-page {
    background: #fff;
    padding: 0 !important;
    margin: 0 !important;
}

body.generating-pdf .solution-hero-section {
    padding-top: 20px !important;
    padding-bottom: 0 !important;
}

/* ========================================
   RESPONSIVE - TABLET (max-width: 991px)
   ======================================== */

@media (max-width: 991px) {
    .single-reference-page {
        margin-top: -80px;
    }

    .reference-hero {
        padding-top: 120px;
    }

    .solution-title {
        font-size: 42px;
        line-height: 48px;
    }

    .solution-content-col {
        padding-right: 15px;
        margin-bottom: 40px;
    }

    .solution-hero-image {
        min-height: 400px !important;
        border-radius: 2000px 0 0 0 !important;
    }

    .reference-gallery-section {
        padding: 40px 0;
    }

    .gallery-item-wrapper {
        margin-bottom: 20px;
    }

    .gallery-item-wrapper.rounded-tl,
    .gallery-item-wrapper.rounded-tr,
    .gallery-item-wrapper.rounded-bl,
    .gallery-item-wrapper.rounded-br {
        border-radius: 60px;
    }

    .other-references-section {
        padding: 40px 0 60px;
    }

    .reference-slide {
        width: 320px;
    }
}

/* ========================================
   RESPONSIVE - MOBILE (max-width: 768px)
   ======================================== */

@media (max-width: 768px) {
    .breadcrumb-sep {
        width: 25px;
        margin: 0 10px;
    }

    .breadcrumb-solution .breadcrumb {
        font-size: 18px !important;
    }

    .breadcrumb-solution .breadcrumb-item a {
        font-size: 18px;
    }

    .solution-title {
        font-size: 32px;
        line-height: 38px;
    }

    .hero-text-block-lead {
        font-size: 20px;
        line-height: 26px;
    }

    .body-18px,
    .hero-text-block-secondary {
        font-size: 16px;
        line-height: 20px;
    }

    .logo-circle {
        width: 60px;
        height: 60px;
        padding: 8px;
    }

    .solution-hero-image {
        min-height: 300px !important;
        border-radius: 1000px 0 0 0 !important;
    }

    /* Cartes - Mobile */
    .reference-slide {
        width: 280px !important;
    }

    .reference-image-wrapper {
        height: 200px !important;
        min-height: 200px !important;
    }

    .reference-card-body {
        padding: 20px !important;
    }

    .reference-card-title {
        font-size: 24px !important;
        line-height: 30px !important;
    }

    .btn-outline.blue.single-ref {
        font-size: 14px !important;
        padding: 10px 14px !important;
        letter-spacing: 0.7px !important;
    }
}

/* ========================================
   RESPONSIVE - SMALL MOBILE (max-width: 576px)
   ======================================== */

@media (max-width: 576px) {
    .single-reference-page {
        margin-top: -60px;
    }

    .reference-hero {
        padding-top: 100px;
        padding-bottom: 40px;
    }

    .breadcrumb-sep {
        width: 20px;
        margin: 0 8px;
    }

    .breadcrumb-solution .breadcrumb {
        font-size: 16px !important;
    }

    .breadcrumb-solution .breadcrumb-item a {
        font-size: 16px;
    }

    .solution-title {
        font-size: 28px;
        line-height: 34px;
    }

    .reference-location {
        font-size: 12px !important;
        line-height: normal;
    }

    .tag-label {
        font-size: 14px;
    }

    .tag-icons img {
        height: 14px;
    }

    .hero-text-block-lead {
        font-size: 18px;
        line-height: 24px;
    }

    .logo-circle {
        width: 50px;
        height: 50px;
        padding: 6px;
    }

    .reference-slide {
        width: 260px;
    }

    .reference-image-wrapper {
        height: 180px;
    }

    .reference-card-title {
        font-size: 22px;
        line-height: 28px;
    }

    .other-references-section .expertise-title {
        font-size: 26px;
        line-height: 32px;
    }
}

/* ========================================
   RESPONSIVE - LARGE SCREENS (min-width: 1200px)
   ======================================== */

@media (min-width: 1200px) {
    .reference-slide {
        width: 361px !important; /* Figma exact */
    }

    .reference-image-wrapper {
        height: 280px !important;
        min-height: 280px !important;
    }

    .solution-hero-image {
        min-height: 700px !important;
    }
}

/* ========================================
   RESPONSIVE - EXTRA LARGE (min-width: 1400px)
   ======================================== */

@media (min-width: 1400px) {
    .solution-title {
        font-size: 60px; /* Figma exact */
        line-height: 66px;
    }

    .solution-hero-image {
        min-height: 800px !important;
    }

    .reference-swiper {
        padding: 20px 100px 60px 100px;
    }
}
