/*
 * Fiche d’une référence
 * Extrait de templates/public/reference/show.html.twig : ce fichier remplace le bloc <style> que le
 * gabarit portait en ligne. Chargé via asset() (versionné par ASSETS_VERSION).
 */

/* ---------- Breadcrumb ---------- */
.ref-breadcrumb {
    padding: 110px 0 1rem;
    position: relative;
    z-index: 2;
}

.ref-breadcrumb-nav {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.55);
    letter-spacing: 0.3px;
}

.ref-breadcrumb-nav a {
    color: #9b7eed;
    text-decoration: none;
    transition: color 0.3s;
}

.ref-breadcrumb-nav a:hover { color: #fff; }

/* La liste ordonnée porte la sémantique ; l'apparence reste celle d'avant. */
.ref-breadcrumb-nav ol {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin: 0;
    padding: 0;
}

.ref-breadcrumb-nav li { display: inline-flex; align-items: center; }

/* Séparateur décoratif : en CSS, donc jamais lu par un lecteur d'écran. */
.ref-breadcrumb-nav li + li::before {
    content: "/";
    color: rgba(255, 255, 255, 0.25);
    margin: 0 0.5rem;
}

/* ---------- Main split layout ---------- */
.ref-show-container {
    padding: 1.5rem 0 80px;
    position: relative;
}

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

.ref-eyebrow::before {
    content: "";
    width: 28px;
    height: 1px;
    background: #9b7eed;
}

.ref-show-title {
    font-family: 'Poppins', sans-serif;
    font-size: 2.8rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.15;
    margin-bottom: 1rem;
    letter-spacing: -0.035em;
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.45);
}

.ref-show-excerpt {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.6;
    margin-bottom: 2.5rem;
    max-width: 720px;
}

.ref-show-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.ref-tag {
    display: inline-block;
    background: rgba(112, 69, 225, 0.25);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(155, 126, 237, 0.45);
    color: #fff;
    padding: 0.4rem 1rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
}

/* ---------- Featured image ---------- */
.ref-featured-image {
    width: 100%;
    height: 420px;
    object-fit: cover;
    border-radius: 20px;
    margin-bottom: 3rem;
    border: 1px solid rgba(112, 69, 225, 0.18);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(112, 69, 225, 0.08);
}

.ref-featured-fallback {
    width: 100%;
    height: 420px;
    border-radius: 20px;
    margin-bottom: 3rem;
    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: 5rem;
    border: 1px solid rgba(112, 69, 225, 0.18);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

/* ---------- Body ---------- */
.ref-body {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.82);
}

.ref-body p { margin-bottom: 1.5rem; }

/* Blocs de paragraphe produits par Trix (<div>) */
.ref-body > div { margin-bottom: 1.5rem; }

.ref-body h1,
.ref-body h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.85rem;
    font-weight: 800;
    color: #fff;
    margin-top: 2.8rem;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    position: relative;
    padding-left: 1.2rem;
}

.ref-body h1::before,
.ref-body h2::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.4rem;
    bottom: 0.4rem;
    width: 4px;
    background: linear-gradient(180deg, #7045e1 0%, #4828b3 100%);
    border-radius: 2px;
}

.ref-body h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
    margin-top: 2rem;
    margin-bottom: 0.8rem;
}

.ref-body strong { color: #fff; font-weight: 600; }

.ref-body a {
    color: #9b7eed;
    text-decoration: underline;
    text-decoration-color: rgba(112, 69, 225, 0.4);
    transition: all 0.3s;
}

.ref-body a:hover {
    color: #fff;
    text-decoration-color: #7045e1;
}

.ref-body ul, .ref-body ol {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.ref-body li { margin-bottom: 0.6rem; }

.ref-body blockquote {
    background: rgba(18, 13, 26, 0.7);
    border-left: 3px solid #7045e1;
    padding: 1.2rem 1.5rem;
    border-radius: 12px;
    margin: 2rem 0;
    color: rgba(255, 255, 255, 0.88);
    font-style: italic;
}

.ref-body img {
    max-width: 100%;
    height: auto;
    border-radius: 14px;
    margin: 1.5rem 0;
}

/* ---------- SEO callout ---------- */
.seo-callout {
    background: rgba(18, 13, 26, 0.7);
    backdrop-filter: blur(12px);
    padding: 1.5rem 1.8rem;
    border-radius: 14px;
    margin: 2.5rem 0 0;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-left: 3px solid #7045e1;
    color: rgba(255, 255, 255, 0.78);
}

/* ---------- Gallery ---------- */
.ref-gallery {
    margin-top: 3rem;
}

.ref-gallery-title {
    font-family: 'Poppins', sans-serif;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.6px;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ref-gallery-title i { color: #7045e1; }

.ref-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

.ref-gallery-item {
    aspect-ratio: 4/3;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(112, 69, 225, 0.15);
    cursor: pointer;
    background: rgba(18, 13, 26, 0.7);
    transition: all 0.3s;
}

.ref-gallery-item:hover {
    transform: scale(1.03);
    border-color: rgba(112, 69, 225, 0.5);
    box-shadow: 0 10px 28px rgba(44, 23, 138, 0.4);
}

.ref-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ---------- Sticky info panel (LEFT side) ---------- */
.ref-info-panel {
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ref-info-card {
    background: rgba(18, 13, 26, 0.82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-radius: 18px;
    padding: 1.6rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 14px 45px rgba(0, 0, 0, 0.5);
}

.ref-info-cert {
    background: linear-gradient(135deg, rgba(44, 23, 138, 0.4) 0%, rgba(112, 69, 225, 0.2) 100%);
    border: 1px solid rgba(155, 126, 237, 0.4);
    text-align: center;
    padding: 1.6rem 1.4rem;
    position: relative;
    overflow: hidden;
}

.ref-info-cert::before {
    content: "";
    position: absolute;
    top: -40px;
    right: -40px;
    width: 140px;
    height: 140px;
    background: radial-gradient(circle, rgba(155, 126, 237, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.ref-info-cert-icon {
    font-size: 2.4rem;
    color: #9b7eed;
    margin-bottom: 0.6rem;
    filter: drop-shadow(0 4px 12px rgba(112, 69, 225, 0.5));
}

.ref-info-cert-label {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.6px;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 0.4rem;
}

.ref-info-cert-value {
    font-family: 'Poppins', sans-serif;
    font-size: 1.25rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.015em;
}

.ref-info-section-title {
    font-family: 'Poppins', sans-serif;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.6px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ref-info-row {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 0.65rem 0;
}

.ref-info-row + .ref-info-row {
    border-top: 1px dashed rgba(255, 255, 255, 0.06);
}

.ref-info-row-icon {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border-radius: 10px;
    background: rgba(112, 69, 225, 0.15);
    border: 1px solid rgba(112, 69, 225, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9b7eed;
    font-size: 0.95rem;
}

.ref-info-row-text {
    flex: 1;
    min-width: 0;
}

.ref-info-row-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 0.15rem;
}

.ref-info-row-value {
    font-size: 0.95rem;
    color: #fff;
    font-weight: 600;
    line-height: 1.35;
    word-break: break-word;
}

.ref-info-cta {
    background: linear-gradient(135deg, #2c178a 0%, #4828b3 50%, #7045e1 100%);
    background-size: 200% 200%;
    color: #fff;
    padding: 0.95rem 1.4rem;
    text-align: center;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: 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), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.ref-info-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);
}

.ref-info-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    text-decoration: none;
    padding: 0.75rem 0;
    justify-content: center;
    transition: all 0.3s;
}

.ref-info-back:hover {
    color: #fff;
    gap: 0.8rem;
}

/* ---------- Other references ---------- */
.ref-others-section {
    margin-top: 5rem;
    padding-top: 3rem;
    border-top: 1px solid rgba(112, 69, 225, 0.2);
}

.ref-others-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.75rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 2rem;
    letter-spacing: -0.02em;
}

.ref-others-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.ref-other-card {
    display: flex;
    flex-direction: column;
    background: rgba(18, 13, 26, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.3s, box-shadow 0.3s;
}

.ref-other-card:hover {
    transform: translateY(-4px);
    border-color: rgba(112, 69, 225, 0.4);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.4), 0 0 24px rgba(112, 69, 225, 0.15);
}

.ref-other-card-image {
    /* Hauteur réservée avant le chargement de l'image : pas de saut de mise
       en page quand elle arrive (les vignettes sont en lazy). */
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, #2c178a 0%, #4828b3 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.75);
    font-size: 2.2rem;
}

.ref-other-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ref-other-card-content {
    padding: 1.25rem 1.4rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    flex: 1;
}

.ref-other-card-cert {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #9b7eed;
}

.ref-other-card-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.35;
    margin: 0;
}

.ref-other-card-excerpt {
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ref-other-card-link {
    margin-top: auto;
    padding-top: 0.4rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #9b7eed;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.ref-others-all {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    color: #9b7eed;
    font-weight: 600;
    font-size: 0.92rem;
    text-decoration: none;
}

.ref-others-all:hover { color: #fff; }

.ref-other-card {
    background: rgba(18, 13, 26, 0.78);
    backdrop-filter: blur(14px);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-decoration: none;
    display: flex;
    flex-direction: column;
}

.ref-other-card:hover {
    transform: translateY(-6px);
    border-color: rgba(112, 69, 225, 0.3);
    box-shadow: 0 22px 50px rgba(44, 23, 138, 0.4);
}

.ref-other-image {
    height: 160px;
    overflow: hidden;
    background: linear-gradient(135deg, #2c178a 0%, #4828b3 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 2rem;
    position: relative;
}

.ref-other-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ref-other-content {
    padding: 1.2rem 1.3rem 1.4rem;
}

.ref-other-cert {
    font-size: 0.65rem;
    color: #9b7eed;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    margin-bottom: 0.45rem;
}

.ref-other-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.4;
    letter-spacing: -0.01em;
    margin-bottom: 0.4rem;
}

.ref-other-company {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.6);
}

/* ---------- Lightbox ---------- */
.ref-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(8, 5, 14, 0.95);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    cursor: zoom-out;
}

.ref-lightbox.active {
    display: flex;
}

.ref-lightbox img {
    max-width: 95vw;
    max-height: 90vh;
    border-radius: 12px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8);
}

.ref-lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(112, 69, 225, 0.2);
    border: 1px solid rgba(155, 126, 237, 0.4);
    color: #fff;
    font-size: 1.4rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ---------- Responsive ---------- */
@media (max-width: 992px) {
    .ref-info-panel {
        position: static;
        margin-bottom: 2rem;
    }

    .ref-show-title { font-size: 2.2rem; }
    .ref-featured-image,
    .ref-featured-fallback { height: 300px; }
}

@media (max-width: 768px) {
    .ref-breadcrumb { padding-top: 100px; }
    .ref-show-title { font-size: 1.7rem; }
    .ref-show-excerpt { font-size: 1rem; }
    .ref-featured-image,
    .ref-featured-fallback { height: 220px; border-radius: 14px; }
    .ref-body h2 { font-size: 1.45rem; }
    .ref-others-title { font-size: 1.4rem; }
}

/* ---- Ancien attribut style="" de reference/show.html.twig ---- */

.ref-info-card .ref-info-text {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.55;
    margin-bottom: 1.1rem;
}
