/* Mes réalisations — alternance texte / image (thème lumineux) */

body.page-realisations.theme-lumineux main#contenu {
    width: min(var(--page), calc(100% - 2rem));
    margin: 0 auto;
    padding: 1.25rem 0 3.5rem;
}

.real-intro {
    max-width: 40rem;
    margin: 0 0 2rem;
    padding: 1.2rem 1.3rem 1.35rem;
    border-radius: 1.5rem;
    background: linear-gradient(155deg, rgba(255, 255, 255, 0.78), rgba(241, 250, 255, 0.45));
    border: 1px solid rgba(139, 207, 244, 0.28);
    box-shadow: var(--ombre-douce), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.real-intro__eyebrow {
    margin: 0 0 0.5rem;
    font-family: var(--display);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--azur-vif);
}

.real-intro h1 {
    margin: 0 0 0.75rem;
    font-family: var(--display);
    font-size: clamp(1.75rem, 3.5vw, 2.35rem);
    color: var(--profond);
    letter-spacing: -0.02em;
}

.real-intro p {
    margin: 0;
    color: var(--profond-soft);
    line-height: 1.65;
}

/* ——— Liste : bandes alternées ——— */

.real-liste {
    display: grid;
    gap: 1.5rem;
    margin: 0 0 1.5rem;
}

.real-bandeau {
    display: block;
    padding: 1.2rem 1.25rem 1.3rem;
    border-radius: 1.45rem;
    background: linear-gradient(155deg, rgba(255, 255, 255, 0.88), rgba(241, 250, 255, 0.5));
    border: 1px solid rgba(139, 207, 244, 0.35);
    box-shadow: 0 16px 40px rgba(36, 75, 105, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.95);
    transition: box-shadow 0.22s ease, border-color 0.22s ease;
}

.real-bandeau:hover {
    border-color: rgba(94, 184, 232, 0.55);
    box-shadow: 0 20px 46px rgba(36, 75, 105, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.real-bandeau__haut {
    display: grid;
    gap: 1.35rem 1.75rem;
    align-items: center;
}

/* Projet impair (0, 2…) : texte gauche — image droite */
.real-bandeau--texte-gauche .real-bandeau__haut {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
}
.real-bandeau--texte-gauche .real-bandeau__texte { order: 1; }
.real-bandeau--texte-gauche .real-bandeau__media { order: 2; }

/* Projet pair (1, 3…) : image gauche — texte droite */
.real-bandeau--image-gauche .real-bandeau__haut {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
}
.real-bandeau--image-gauche .real-bandeau__media { order: 1; }
.real-bandeau--image-gauche .real-bandeau__texte { order: 2; }

/* ——— Accordéon Nexus (in-page) ——— */

.real-accordeon {
    margin-top: 1.25rem;
    padding-top: 1.15rem;
    border-top: 1px solid rgba(139, 207, 244, 0.35);
    overflow: hidden;
}

.real-accordeon[hidden] {
    display: none !important;
}

.real-accordeon__inner {
    display: grid;
    gap: 1.15rem;
    animation: real-accordeon-in 0.38s ease;
}

.real-accordeon__circuit {
    margin: 0.35rem 0 0;
    padding: 0.55rem;
    border-radius: 1.1rem;
    border: 1px solid rgba(139, 207, 244, 0.35);
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.92), rgba(234, 247, 255, 0.75));
}

.real-accordeon__circuit img {
    display: block;
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
    object-position: center;
    margin: 0 auto;
}

.real-accordeon__circuit figcaption {
    margin: 0.55rem 0.15rem 0.1rem;
    color: var(--profond-soft);
    font-size: 0.92rem;
    line-height: 1.5;
}

@keyframes real-accordeon-in {
    from {
        opacity: 0;
        transform: translateY(-0.5rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.real-bandeau--accordeon.is-accordeon-ouvert {
    border-color: rgba(94, 184, 232, 0.55);
}

.real-bandeau__texte {
    min-width: 0;
    max-width: 36rem;
}

.real-bandeau__cat {
    display: inline-block;
    margin: 0 0 0.45rem;
    font-family: var(--display);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--azur-vif);
}

.real-bandeau__titre {
    margin: 0 0 0.4rem;
    font-family: var(--display);
    font-size: clamp(1.25rem, 2.4vw, 1.65rem);
    font-weight: 600;
    color: var(--profond);
}

.real-bandeau__sous {
    margin: 0 0 0.75rem;
    color: var(--profond-soft);
    font-size: 1.02rem;
}

.real-bandeau__desc {
    margin: 0 0 0.75rem;
    color: var(--profond-soft);
    line-height: 1.6;
}

.real-bandeau__points {
    margin: 0 0 1rem;
    padding-left: 1.1rem;
    color: var(--profond-soft);
}

.real-bandeau__points li {
    margin: 0.28rem 0;
    line-height: 1.5;
}

.real-bandeau__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.real-bandeau__media {
    min-width: 0;
}

/* ——— Carrousel de photos (projets empilés séparément) ——— */

.real-carrousel {
    position: relative;
    min-width: 0;
}

.real-carrousel__viewport {
    overflow: hidden;
    border-radius: 1rem;
    border: 1px solid rgba(139, 207, 244, 0.35);
    background: linear-gradient(160deg, #eaf7ff, #f7fcff);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.real-carrousel__track {
    display: flex;
    transition: transform 0.4s ease;
    will-change: transform;
}

.real-carrousel__slide {
    min-width: 100%;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem;
}

.real-carrousel__zoom {
    appearance: none;
    border: 0;
    background: transparent;
    padding: 0;
    margin: 0;
    cursor: zoom-in;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.real-carrousel__zoom img {
    display: block;
    max-width: 100%;
    width: auto;
    height: auto;
    max-height: 22rem;
    object-fit: contain;
    object-position: center;
}

.real-carrousel__nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 0.7rem;
}

.real-carrousel__btn {
    appearance: none;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 999px;
    border: 1px solid rgba(139, 207, 244, 0.5);
    background: rgba(255, 255, 255, 0.9);
    color: var(--profond);
    font-size: 1.35rem;
    line-height: 1;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(36, 75, 105, 0.08);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.real-carrousel__btn:hover:not(:disabled) {
    border-color: var(--azur);
    box-shadow: 0 6px 18px rgba(36, 75, 105, 0.12);
}

.real-carrousel__btn:disabled {
    opacity: 0.35;
    cursor: default;
}

.real-carrousel__compteur {
    font-family: var(--display);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--profond-soft);
    min-width: 3.5rem;
    text-align: center;
}

/* Lightbox agrandissement (optionnel) */
.real-lightbox {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    padding: 1.25rem;
    background: rgba(20, 42, 64, 0.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.real-lightbox[hidden] {
    display: none !important;
}

.real-lightbox__figure {
    margin: 0;
    max-width: min(96vw, 72rem);
    max-height: 90vh;
}

.real-lightbox__figure img {
    display: block;
    max-width: 100%;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 0.75rem;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.real-lightbox__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    appearance: none;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.92);
    color: var(--profond);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

body.is-lightbox {
    overflow: hidden;
}

/* ——— Détail ——— */

.real-detail {
    display: none;
    margin-top: 0.5rem;
    scroll-margin-top: 6rem;
}

.real-detail.is-open {
    display: block;
}

.real-detail__shell {
    padding: 1.25rem 1.25rem 1.5rem;
    border-radius: 1.5rem;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.9), rgba(241, 250, 255, 0.55));
    border: 1px solid rgba(139, 207, 244, 0.35);
    box-shadow: var(--ombre-douce), inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.real-detail__toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.1rem;
}

.real-detail__retour {
    appearance: none;
    border: 1px solid rgba(139, 207, 244, 0.45);
    background: rgba(255, 255, 255, 0.75);
    color: var(--profond);
    font-family: var(--display);
    font-size: 0.92rem;
    font-weight: 600;
    border-radius: 999px;
    padding: 0.45rem 0.95rem;
    cursor: pointer;
}

.real-detail__retour:hover {
    border-color: var(--azur);
}

.real-detail__cat {
    font-family: var(--display);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--azur-vif);
}

.real-detail__titre {
    margin: 0 0 0.35rem;
    font-family: var(--display);
    font-size: clamp(1.45rem, 3vw, 2rem);
    color: var(--profond);
}

.real-detail__sous {
    margin: 0 0 0.85rem;
    color: var(--profond-soft);
    font-size: 1.05rem;
}

.real-detail__intro {
    margin: 0 0 1.25rem;
    color: var(--profond-soft);
    line-height: 1.65;
    max-width: 46rem;
}

.real-detail__blocs {
    display: grid;
    gap: 0.75rem;
    margin: 0 0 1.35rem;
    max-width: 48rem;
}

.real-detail__bloc {
    margin: 0;
    padding: 0.85rem 1rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(139, 207, 244, 0.3);
    color: var(--profond-soft);
    line-height: 1.6;
}

.real-detail__bloc-label {
    display: inline-block;
    margin-right: 0.35rem;
    font-family: var(--display);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--azur-vif);
}

.real-section--texte-seul {
    grid-template-columns: 1fr;
}

.real-section--interconnexion {
    grid-template-columns: 1fr;
    gap: 1.1rem;
}

.real-section--interconnexion .real-section__texte {
    max-width: 48rem;
}

.real-section__media--wide {
    max-width: 42rem;
}

.nexus-diagramme {
    margin: 0;
    padding: 0.85rem 0.9rem 1rem;
    border-radius: 1.1rem;
    border: 1px solid rgba(139, 207, 244, 0.35);
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.92), rgba(234, 247, 255, 0.75));
    overflow-x: auto;
}

.nexus-diagramme__svg {
    display: block;
    width: 100%;
    min-width: 18rem;
    height: auto;
}

.nexus-diagramme__bloc {
    fill: rgba(255, 255, 255, 0.95);
    stroke: rgba(42, 111, 151, 0.45);
    stroke-width: 1.5;
}

.nexus-diagramme__label {
    fill: var(--profond);
    font-family: var(--display), system-ui, sans-serif;
    font-size: 18px;
    font-weight: 700;
}

.nexus-diagramme__sub {
    fill: var(--profond-soft);
    font-family: var(--display), system-ui, sans-serif;
    font-size: 13px;
}

.nexus-diagramme__caption {
    margin: 0.65rem 0 0;
    font-size: 0.9rem;
    color: var(--profond-soft);
    line-height: 1.45;
}

.real-detail__hero {
    margin: 0 0 1.5rem;
    border-radius: 1.1rem;
    overflow: hidden;
    border: 1px solid rgba(139, 207, 244, 0.3);
    background: #eaf7ff;
    padding: 0.75rem;
}

.real-detail__hero img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 24rem;
    object-fit: contain;
    margin: 0 auto;
}

.real-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    gap: 1.2rem 1.6rem;
    align-items: center;
    margin: 0 0 1.35rem;
    padding: 1.05rem 1.1rem 1.15rem;
    border-radius: 1.2rem;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(139, 207, 244, 0.28);
}

.real-section--texte-gauche {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
}
.real-section--texte-gauche .real-section__texte { order: 1; }
.real-section--texte-gauche .real-section__media { order: 2; }

.real-section--image-gauche {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
}
.real-section--image-gauche .real-section__media { order: 1; }
.real-section--image-gauche .real-section__texte { order: 2; }

.real-section__texte {
    min-width: 0;
    max-width: 34rem;
}

.real-section h3 {
    margin: 0 0 0.55rem;
    font-family: var(--display);
    font-size: 1.15rem;
    color: var(--profond);
}

.real-section p {
    margin: 0 0 0.75rem;
    color: var(--profond-soft);
    line-height: 1.6;
}

.real-section ul {
    margin: 0;
    padding-left: 1.15rem;
    color: var(--profond-soft);
}

.real-section li {
    margin: 0.25rem 0;
    line-height: 1.5;
}

.real-section__media .real-carrousel__zoom img {
    max-height: 18rem;
}

.real-detail__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.35rem;
}

body.page-realisations.is-detail .real-liste,
body.page-realisations.is-detail .real-intro {
    display: none;
}

@media (max-width: 860px) {
    .real-bandeau__haut,
    .real-bandeau--texte-gauche .real-bandeau__haut,
    .real-bandeau--image-gauche .real-bandeau__haut,
    .real-section,
    .real-section--texte-gauche,
    .real-section--image-gauche {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .real-bandeau--texte-gauche .real-bandeau__texte,
    .real-bandeau--image-gauche .real-bandeau__texte,
    .real-section--texte-gauche .real-section__texte,
    .real-section--image-gauche .real-section__texte {
        order: 1;
    }

    .real-bandeau--texte-gauche .real-bandeau__media,
    .real-bandeau--image-gauche .real-bandeau__media,
    .real-section--texte-gauche .real-section__media,
    .real-section--image-gauche .real-section__media {
        order: 2;
    }

    .real-bandeau__media .real-carrousel__zoom img,
    .real-section__media .real-carrousel__zoom img {
        max-height: 16rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .real-bandeau,
    .real-carrousel__track,
    .real-carrousel__btn,
    .real-accordeon__inner {
        transition: none !important;
        animation: none !important;
    }
}
