/*
 * Liste des références
 * Extrait de templates/public/reference/list.html.twig : ce fichier remplace le bloc <style> que le
 * gabarit portait en ligne. Chargé via asset() (versionné par ASSETS_VERSION).
 */

/* ---------- Header ---------- */
.ref-list-header {
    padding: 140px 0 50px;
    position: relative;
    overflow: hidden;
}

.ref-list-header::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 50% 50% at 85% 25%, rgba(72, 40, 179, 0.22) 0%, transparent 65%),
        radial-gradient(ellipse 50% 50% at 10% 75%, rgba(112, 69, 225, 0.12) 0%, transparent 65%);
    z-index: 0;
    pointer-events: none;
}

.ref-list-header > * {
    position: relative;
    z-index: 1;
}

.ref-list-eyebrow {
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #9b7eed;
    margin-bottom: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}

.ref-list-eyebrow::before,
.ref-list-eyebrow::after {
    content: "";
    width: 32px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(155, 126, 237, 0.6), transparent);
}

.ref-list-header h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 3.2rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 0.8rem;
    letter-spacing: -0.035em;
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.45);
}

.ref-list-header p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.75);
    max-width: 640px;
    line-height: 1.6;
}

.ref-back-btn {
    background: transparent;
    color: #fff;
    padding: 0.7rem 1.6rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    border-radius: 999px;
    border: 1.5px solid rgba(112, 69, 225, 0.6);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    white-space: nowrap;
    box-shadow: 0 0 0 1px rgba(112, 69, 225, 0.15), 0 8px 24px rgba(44, 23, 138, 0.35);
}

.ref-back-btn:hover {
    color: #fff;
    border-color: #7045e1;
    transform: translateY(-3px);
    background: rgba(112, 69, 225, 0.08);
    box-shadow: 0 0 0 1px rgba(112, 69, 225, 0.35), 0 14px 32px rgba(44, 23, 138, 0.55);
}

/* ---------- Stats bar ---------- */
.ref-stats-bar {
    display: flex;
    gap: 0;
    margin-top: 2.5rem;
    background: rgba(18, 13, 26, 0.55);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(112, 69, 225, 0.15);
    border-radius: 14px;
    overflow: hidden;
    max-width: 720px;
}

.ref-stat {
    flex: 1;
    padding: 1.1rem 1.5rem;
    text-align: center;
    border-right: 1px solid rgba(112, 69, 225, 0.15);
}

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

.ref-stat-value {
    font-family: 'Poppins', sans-serif;
    font-size: 1.6rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.02em;
    line-height: 1;
}

.ref-stat-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    color: rgba(155, 126, 237, 0.9);
    margin-top: 0.4rem;
}

/* ---------- Container ---------- */
.ref-list-container {
    padding: 60px 0 80px;
    position: relative;
}

/* ---------- Zigzag cards ---------- */
.ref-zigzag {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.ref-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    background: rgba(18, 13, 26, 0.7);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 14px 50px rgba(0, 0, 0, 0.45);
    transition: all 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-decoration: none;
    position: relative;
}

.ref-item:hover {
    transform: translateY(-6px);
    border-color: rgba(112, 69, 225, 0.35);
    box-shadow: 0 26px 60px rgba(44, 23, 138, 0.45),
                0 0 0 1px rgba(112, 69, 225, 0.25);
}

/* Zigzag: even items reverse */
.ref-item:nth-child(even) .ref-item-image {
    order: 2;
}

.ref-item-image {
    position: relative;
    min-height: 340px;
    overflow: hidden;
    background: linear-gradient(135deg, #1a1226 0%, #0c0814 100%);
}

.ref-item-image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.ref-item:hover .ref-item-image img {
    transform: scale(1.06);
}

.ref-item-image-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2c178a 0%, #4828b3 50%, #7045e1 100%);
    color: rgba(255, 255, 255, 0.85);
    font-size: 4rem;
}

.ref-item-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(12, 8, 20, 0) 0%, rgba(12, 8, 20, 0.3) 100%);
    pointer-events: none;
}

.ref-item-number {
    position: absolute;
    top: 1.2rem;
    left: 1.2rem;
    z-index: 2;
    background: rgba(12, 8, 20, 0.75);
    backdrop-filter: blur(8px);
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 2px;
    padding: 0.45rem 0.9rem;
    border-radius: 8px;
    border: 1px solid rgba(155, 126, 237, 0.35);
}

.ref-item-content {
    padding: 2.5rem 2.8rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ref-item-cert {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    align-self: flex-start;
    background: linear-gradient(135deg, rgba(112, 69, 225, 0.18) 0%, rgba(72, 40, 179, 0.25) 100%);
    border: 1px solid rgba(155, 126, 237, 0.4);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    margin-bottom: 1.2rem;
}

.ref-item-cert i {
    color: #9b7eed;
}

.ref-item-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.7rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.25;
    margin-bottom: 1rem;
    letter-spacing: -0.025em;
}

.ref-item-client {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
    margin-bottom: 1.2rem;
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.7);
}

.ref-item-client-row {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.ref-item-client-row i {
    color: #7045e1;
}

.ref-item-client-row strong {
    color: #fff;
    font-weight: 600;
}

.ref-item-excerpt {
    font-size: 0.98rem;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.65;
    margin-bottom: 1.5rem;
}

.ref-item-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: #9b7eed;
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    align-self: flex-start;
    padding-bottom: 0.3rem;
    border-bottom: 2px solid rgba(112, 69, 225, 0.4);
    transition: all 0.3s;
}

.ref-item:hover .ref-item-cta {
    color: #fff;
    gap: 0.9rem;
    border-bottom-color: #7045e1;
}

/* ---------- Empty state ---------- */
.ref-empty {
    text-align: center;
    padding: 70px 20px;
    background: rgba(18, 13, 26, 0.6);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    max-width: 520px;
    margin: 0 auto;
}

.ref-empty i {
    font-size: 4rem;
    color: #7045e1;
    margin-bottom: 1rem;
}

.ref-empty p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
}

/* ---------- Bottom CTA ---------- */
.ref-list-bottom {
    text-align: center;
    margin-top: 5rem;
    padding: 3rem 2rem;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(44, 23, 138, 0.25) 0%, rgba(112, 69, 225, 0.12) 100%);
    border: 1px solid rgba(112, 69, 225, 0.25);
}

.ref-list-bottom h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.6rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 0.8rem;
    letter-spacing: -0.02em;
}

.ref-list-bottom p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    max-width: 540px;
    margin: 0 auto 1.6rem;
    line-height: 1.6;
}

.ref-list-bottom-cta {
    background: linear-gradient(135deg, #2c178a 0%, #4828b3 50%, #7045e1 100%);
    background-size: 200% 200%;
    color: #fff;
    padding: 0.9rem 2rem;
    text-decoration: none;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 10px 28px rgba(44, 23, 138, 0.45);
}

.ref-list-bottom-cta:hover {
    background-position: 100% 50%;
    transform: translateY(-3px);
    color: #fff;
    box-shadow: 0 16px 38px rgba(44, 23, 138, 0.6), 0 0 0 1px rgba(112, 69, 225, 0.4);
}

/* ---------- Responsive ---------- */
@media (max-width: 992px) {
    .ref-item {
        grid-template-columns: 1fr;
    }

    .ref-item:nth-child(even) .ref-item-image {
        order: 0;
    }

    .ref-item-image {
        min-height: 240px;
    }

    .ref-item-content {
        padding: 2rem 1.8rem;
    }

    .ref-item-title {
        font-size: 1.4rem;
    }
}

@media (max-width: 768px) {
    .ref-list-header {
        padding: 120px 0 40px;
    }

    .ref-list-header h1 {
        font-size: 2rem;
    }

    .ref-list-container {
        padding: 40px 0 60px;
    }

    .ref-zigzag {
        gap: 2rem;
    }

    .ref-stats-bar {
        flex-direction: column;
    }

    .ref-stat {
        border-right: none;
        border-bottom: 1px solid rgba(112, 69, 225, 0.15);
        padding: 0.85rem;
    }

    .ref-stat:last-child {
        border-bottom: none;
    }
}
