/**
 * LD Solutions - Page Réalisations Web
 * Styles pour la page des réalisations et projets web
 *
 * @package ldsolutions
 * @version 1.0.0
 */

/* ============================================================
   PAGE HERO
   ============================================================ */

.page-realisations-web .page-hero {
    position: relative;
    min-height: 55vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 200px 2rem 120px;
    overflow: hidden;
}

.page-realisations-web .page-hero__bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.page-realisations-web .page-hero__bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.page-realisations-web .page-hero__bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(2, 27, 80, 0.7);
}

.page-realisations-web .page-hero__container {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.page-realisations-web .page-hero__title {
    margin: 0 0 1.5rem;
    font-family: 'Chillax', Arial, -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    text-transform: uppercase;
    color: var(--lds-white, #ffffff);
}

.page-realisations-web .page-hero__title span {
    font-style: italic;
}

.page-realisations-web .page-hero__desc {
    margin: 0 auto;
    max-width: 640px;
    font-family: Arial, -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 1.125rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.9);
}

/* ============================================================
   SECTION RÉALISATIONS
   ============================================================ */

.rw-realisations {
    background: var(--lds-white, #ffffff);
    padding: 20px 2rem 0;
    overflow-x: hidden;
}

.rw-realisations__container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Réalisation individuelle */
.rw-realisation {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
    padding: 80px 0;
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.7s cubic-bezier(0.23, 1, 0.32, 1);
    /* Scroll anchor offset pour le header fixe */
    scroll-margin-top: 120px;
}

/* Fond alterné gris clair - pleine largeur */
.rw-realisation--alt::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    background-color: var(--lds-platinium, #EBEBEB);
    z-index: -1;
}

.rw-realisation.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.rw-realisation--reversed .rw-realisation__visual {
    order: 2;
}

.rw-realisation--reversed .rw-realisation__content {
    order: 1;
}

/* Visual / Mockup */
.rw-realisation__visual {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
}

.rw-realisation__mockup {
    position: relative;
    width: 100%;
    max-width: 500px;
}

.rw-realisation__mockup-screen {
    position: relative;
    background: #1a1a1a;
    border-radius: 10px 10px 0 0;
    padding: 10px 10px 6px;
    box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.1), inset 0 0 0 2px #2a2a2a;
}

.rw-realisation__mockup-screen::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: #333;
    border-radius: 50%;
    box-shadow: inset 0 0 2px rgba(0,0,0,0.5);
}

.rw-realisation__mockup-content {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: 4px;
    overflow: hidden;
    background: #000;
}

.rw-realisation__mockup-content img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}

.rw-realisation__mockup-content::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(180deg, rgba(255,255,255,0.03) 0%, transparent 100%);
    pointer-events: none;
}

.rw-realisation__mockup-base {
    position: relative;
    height: 12px;
    background: linear-gradient(180deg, #c0c0c0 0%, #a0a0a0 50%, #909090 100%);
    border-radius: 0 0 2px 2px;
}

.rw-realisation__mockup-notch {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 5px;
    background: linear-gradient(180deg, #888 0%, #999 100%);
    border-radius: 0 0 6px 6px;
}

.rw-realisation__mockup-bottom {
    height: 6px;
    background: linear-gradient(180deg, #b0b0b0 0%, #d0d0d0 100%);
    border-radius: 0 0 10px 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

/* Galerie d'images - Sous le mockup dans la colonne visual */
.rw-realisation__gallery {
    margin-top: 24px;
    width: 100%;
    max-width: 500px;
}

.rw-realisation__gallery-line {
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(2, 27, 80, 0.15), transparent);
    margin-bottom: 16px;
}

.rw-realisation__gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
}

/* Footer visual (tags + lien) */
.rw-realisation__visual-footer {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    margin-top: 32px;
    width: 100%;
    max-width: 500px;
}

.rw-realisation__visual-footer .rw-realisation__tags {
    margin-top: 0;
}

.rw-realisation__visual-footer .rw-realisation__link {
    margin-top: 0;
}

.rw-realisation__gallery-item {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(2, 27, 80, 0.1);
    transition: all 0.3s ease;
}

.rw-realisation__gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(2, 27, 80, 0.15);
}

.rw-realisation__gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(2, 27, 80, 0);
    transition: background 0.3s ease;
}

.rw-realisation__gallery-item:hover::after {
    background: rgba(2, 27, 80, 0.1);
}

.rw-realisation__gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.rw-realisation__gallery-item:hover img {
    transform: scale(1.05);
}

/* Responsive galerie */
@media (max-width: 1024px) {
    .rw-realisation__gallery {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .rw-realisation__gallery-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .rw-realisation__gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }
}

/* ============================================================
   LIGHTBOX
   ============================================================ */

.rw-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.rw-lightbox.is-active {
    opacity: 1;
    visibility: visible;
}

.rw-lightbox__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(2, 27, 80, 0.95);
    cursor: pointer;
}

.rw-lightbox__container {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    z-index: 1;
}

.rw-lightbox__image {
    display: block;
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.rw-lightbox__close {
    position: absolute;
    top: -40px;
    right: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease;
}

.rw-lightbox__close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.rw-lightbox__prev,
.rw-lightbox__next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.rw-lightbox__prev {
    left: -70px;
}

.rw-lightbox__next {
    right: -70px;
}

.rw-lightbox__prev:hover,
.rw-lightbox__next:hover {
    background: rgba(255, 255, 255, 0.2);
}

@media (max-width: 768px) {
    .rw-lightbox__prev {
        left: 10px;
    }

    .rw-lightbox__next {
        right: 10px;
    }

    .rw-lightbox__close {
        top: 10px;
        right: 10px;
    }

    .rw-lightbox__prev,
    .rw-lightbox__next {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
}

/* Badge "En cours" */
.rw-realisation__badge-encours {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    padding: 6px 14px;
    background: linear-gradient(135deg, #0a3fd0 0%, #1a6aff 100%);
    color: var(--lds-white, #ffffff);
    font-family: 'Chillax', Arial, sans-serif;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(18, 90, 248, 0.5);
}

/* Placeholder pour images manquantes */
.rw-realisation__placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    height: 100%;
    background: rgba(2, 27, 80, 0.04);
}

.rw-realisation__placeholder i,
.rw-realisation__placeholder svg {
    width: 48px;
    height: 48px;
    stroke: rgba(2, 27, 80, 0.3);
}

.rw-realisation__placeholder span {
    font-family: Arial, -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(2, 27, 80, 0.4);
}

/* Content */
.rw-realisation__content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.rw-realisation__name {
    font-family: 'Chillax', Arial, -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--lds-navy, #021B50);
    margin: 0;
    text-transform: uppercase;
}

.rw-realisation__text {
    font-family: Arial, -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.9375rem;
    font-weight: 400;
    line-height: 1.7;
    color: rgba(21, 30, 40, 0.7);
    margin: 0;
}

.rw-realisation__text strong {
    color: var(--lds-navy, #021B50);
    font-weight: 600;
}

.rw-realisation__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

/* Lien vers le site */
.rw-realisation__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    font-family: Arial, sans-serif;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--lds-cta, #B82A14);
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.3s ease, gap 0.3s ease;
}

.rw-realisation__link:hover {
    color: var(--lds-cta-hover, #E63D24);
    gap: 12px;
}

.rw-realisation__link svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    stroke: var(--lds-cta, #B82A14);
    transition: transform 0.3s ease, stroke 0.3s ease;
}

.rw-realisation__link:hover svg {
    stroke: var(--lds-cta-hover, #E63D24);
    transform: translateX(4px);
}

/* Client */
.rw-realisation__client {
    font-family: Arial, -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.875rem;
    font-weight: 400;
    color: rgba(21, 30, 40, 0.6);
    margin: 0;
}

.rw-realisation__client strong {
    color: var(--lds-navy, #021B50);
    font-weight: 600;
}

/* Message vide */
.rw-realisations__empty {
    text-align: center;
    padding: 80px 20px;
    background: rgba(2, 27, 80, 0.03);
    border-radius: 16px;
}

.rw-realisations__empty p {
    font-family: Arial, -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 1rem;
    line-height: 1.7;
    color: rgba(21, 30, 40, 0.6);
    margin: 0 0 0.5rem;
}

.rw-realisations__empty p:last-child {
    margin-bottom: 0;
}

/* ============================================================
   SECTION CTA FINAL
   ============================================================ */

.rw-cta-final {
    position: relative;
    padding: 160px 2rem;
    overflow: hidden;
}

.rw-cta-final__bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.rw-cta-final__bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rw-cta-final__bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(2, 27, 80, 0.88);
}

.rw-cta-final__container {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.rw-cta-final__title {
    font-family: 'Chillax', Arial, -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    text-transform: uppercase;
    margin: 0 0 1.25rem;
    color: var(--lds-white, #ffffff);
}

.rw-cta-final__text {
    font-family: Arial, -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.8);
    margin: 0 0 2rem;
}

.rw-cta-final__actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.rw-cta-final__actions .lds-btn svg {
    margin-left: 8px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1200px) {
    .rw-realisation {
        gap: 60px;
    }

    .rw-realisation__mockup {
        max-width: 450px;
    }
}

@media (max-width: 1024px) {
    .page-realisations-web .page-hero {
        padding: 160px 1.5rem 100px;
    }

    .rw-realisations {
        padding: 20px 1.5rem 0;
    }

    .rw-realisation {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 60px 0;
    }

    .rw-realisation--reversed .rw-realisation__visual {
        order: 0;
    }

    .rw-realisation--reversed .rw-realisation__content {
        order: 0;
    }

    .rw-realisation__visual {
        order: -1;
    }

    .rw-realisation__mockup {
        max-width: 100%;
    }

    .rw-cta-final {
        padding: 100px 1.5rem;
    }
}

@media (max-width: 768px) {
    .page-realisations-web .page-hero {
        min-height: 50vh;
        padding: 140px 1rem 80px;
    }

    .page-realisations-web .page-hero__desc {
        font-size: 1rem;
    }

    .rw-realisations {
        padding: 10px 1rem 0;
    }

    .rw-realisation {
        gap: 32px;
        padding: 50px 0;
    }

    .rw-realisation__name {
        font-size: 1.25rem;
    }

    .rw-realisation__mockup-screen {
        padding: 8px 8px 5px;
    }

    .rw-cta-final {
        padding: 80px 1rem;
    }

    .rw-cta-final__actions {
        flex-direction: column;
        align-items: center;
    }

    .rw-cta-final__actions .lds-btn {
        width: 100%;
        max-width: 320px;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .page-realisations-web .page-hero {
        min-height: 45vh;
        padding: 120px 1rem 60px;
    }

    .page-realisations-web .page-hero__title {
        font-size: 1.5rem;
    }

    .page-realisations-web .page-hero__desc {
        font-size: 0.9375rem;
    }

    .rw-realisations {
        padding: 10px 1rem 0;
    }

    .rw-realisation {
        gap: 24px;
        padding: 40px 0;
    }

    .rw-realisation__name {
        font-size: 1.125rem;
    }

    .rw-realisation__text {
        font-size: 0.875rem;
    }

    .rw-cta-final {
        padding: 60px 1rem;
    }
}

/* ============================================================
   BLOCS DE CONTENU (depuis l'editeur de blocs)
   ============================================================ */

.ld-realization-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Bloc Texte */
.ld-block--text {
    font-family: Arial, -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.9375rem;
    line-height: 1.7;
    color: rgba(21, 30, 40, 0.7);
}

.ld-block--text p {
    margin: 0 0 0.75rem;
}

.ld-block--text p:last-child {
    margin-bottom: 0;
}

.ld-block--text strong,
.ld-block--text b {
    color: var(--lds-navy, #021B50);
    font-weight: 600;
}

.ld-block--text a {
    color: var(--lds-cta, #B82A14);
    text-decoration: none;
    transition: color 0.2s ease;
}

.ld-block--text a:hover {
    color: var(--lds-cta-hover, #E63D24);
    text-decoration: underline;
}

/* Bloc Image */
.ld-block--image {
    margin: 1rem 0;
}

.ld-block--image img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.ld-block--image figcaption {
    margin-top: 0.5rem;
    font-size: 0.8125rem;
    color: rgba(21, 30, 40, 0.5);
    text-align: center;
    font-style: italic;
}

.ld-block--align-left {
    text-align: left;
}

.ld-block--align-left img {
    margin-right: auto;
}

.ld-block--align-center {
    text-align: center;
}

.ld-block--align-center img {
    margin-left: auto;
    margin-right: auto;
}

.ld-block--align-right {
    text-align: right;
}

.ld-block--align-right img {
    margin-left: auto;
}

.ld-block--align-full img {
    width: 100%;
}

/* Bloc Colonnes */
.ld-block--columns {
    display: grid;
    gap: 2rem;
    margin: 1rem 0;
}

.ld-block--layout-50-50 {
    grid-template-columns: 1fr 1fr;
}

.ld-block--layout-33-67 {
    grid-template-columns: 1fr 2fr;
}

.ld-block--layout-67-33 {
    grid-template-columns: 2fr 1fr;
}

.ld-block--layout-33-33-33 {
    grid-template-columns: 1fr 1fr 1fr;
}

.ld-block__column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Bloc Espacement */
.ld-block--spacer {
    width: 100%;
}

.ld-block--spacer-small {
    height: 1rem;
}

.ld-block--spacer-medium {
    height: 2rem;
}

.ld-block--spacer-large {
    height: 4rem;
}

/* Responsive pour les colonnes */
@media (max-width: 768px) {
    .ld-block--columns {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }
}
