/* XVS DESIGN — DARK GOTHIC EDITORIAL */

:root {
    --xvs-black: #050505;
    --xvs-red: #aa1421;
    --xvs-white: #f2f2f2;
}

*, *::before, *::after { box-sizing: border-box; }

html {
    color-scheme: dark;
    scrollbar-width: thin;
    scrollbar-color: #3a3a3a var(--xvs-black);
}

html::-webkit-scrollbar { width: 8px; }
html::-webkit-scrollbar-track { background: var(--xvs-black); }
html::-webkit-scrollbar-thumb { background: #3a3a3a; border-radius: 4px; }
html::-webkit-scrollbar-thumb:hover { background: var(--xvs-red); }

html, body {
    min-height: 100%;
    margin: 0;
    background: var(--xvs-black);
    color: var(--xvs-white);
    font-family: Arial, Helvetica, sans-serif;
}

body { overflow-x: hidden; }

/* HEADER */

.xvs-topbar {
    min-height: 66px;
    padding: 0 1.2%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    border-bottom: 1px solid #242424;
    background-color: #121111;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.xvs-wordmark {
    flex: 0 0 auto;
    color: var(--xvs-white);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-decoration: none;
}

.xvs-wordmark span { color: #999; font-weight: 400; }

.xvs-topnav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: clamp(1rem, 3vw, 2.8rem);
}

.xvs-topnav a {
    color: #aaa;
    font-size: 0.78rem;
    letter-spacing: 1.4px;
    text-decoration: none;
    text-transform: uppercase;
    transition: color 0.2s;
}

.xvs-topnav a:hover { color: #fff; }

.xvs-topnav .xvs-admin-link {
    padding: 0.55rem 0.8rem;
    border: 1px solid #444;
}

.xvs-menu-toggle {
    display: none;
    width: 44px;
    height: 40px;
    padding: 9px;
    border: 1px solid #444;
    border-radius: 3px;
    background: #171515;
    color: #fff;
}

.xvs-menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    margin: 4px 0;
    background: #eee;
}

/* LAYOUT */

.xvs-home {
    width: 100%;
    margin: 2rem 0 3rem;
    padding: 0 1.2%;
    display: grid;
    grid-template-columns: minmax(260px, 0.5fr) minmax(0, 2.6fr);
    gap: 2rem;
    align-items: stretch;
}

.xvs-content { min-width: 0; padding: 0; }

/* INTRO */

.xvs-intro {
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding: 0.8rem 2rem 1.5rem 0;
    position: sticky;
    top: 5rem;
    align-self: start;
}

.xvs-kicker {
    color: var(--xvs-red);
    font-size: 1rem;
    font-weight: bold;
    letter-spacing: 4px;
    text-transform: uppercase;
}

.xvs-intro h1 {
    margin: 0.5rem 0 0;
    font-size: clamp(1.6rem, 1.9vw, 2.8rem);
    font-weight: 300;
    line-height: 1.02;
    letter-spacing: -1.8px;
}

.xvs-role {
    margin: 0.8rem 0 0;
    color: #bbb;
    font-family: Georgia, serif;
    font-size: 1.15rem;
}

.xvs-rule {
    height: 1px;
    margin: 2rem 0;
    background: #393939;
}

.xvs-intro-copy {
    max-width: 34rem;
    color: #cecece;
    font-size: 0.94rem;
    line-height: 1.85;
}

.xvs-intro-copy strong { color: #ddd; font-weight: 500; }

.xvs-contact-cta {
    width: min(100%, 260px);
    margin-top: 1.5rem;
    padding: 0.85rem 1.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(100deg, #303030, #101010);
    border: 1px solid #555;
    border-radius: 30px;
    font-size: 0.8rem;
    letter-spacing: 1.5px;
    text-align: center;
    text-decoration: none;
    transition: 0.25s;
}

.xvs-contact-cta:hover { background: #281014; border-color: var(--xvs-red); }

.xvs-socials {
    margin-top: auto;
    padding-top: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
    justify-content: center;
    text-decoration: underline;
    text-decoration-color: var(--xvs-red);
}

.xvs-socials a { color: #777; font-size: 0.75rem; letter-spacing: 1px; text-decoration: none; }
.xvs-socials a:hover { color: #eee; }

/* GALERIE */

.gallery-wrapper { width: 100%; margin: 0 0 3rem; }

.category-filters {
    margin: 0 0 2.4rem;
    padding: 1rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.65rem;
    border: 1px solid #292929;
    border-radius: 2px;
}

.category-filters p {
    margin: 0;
    padding: 0.55rem 0.9rem;
    background: #111;
    border: 1px solid #393939;
    border-radius: 2px;
}

.category-filters p:hover { background: #211013; border-color: var(--xvs-red); }
.category-filters a { color: #c5c5c5; text-decoration: none; }
.category-filters a:hover { color: #fff; }

/* On conserve les gouttières Bootstrap : ne pas remplacer .row par flex avec gap. */
.portfolio-grid {
    --bs-gutter-x: 1.15rem;
    --bs-gutter-y: 1.15rem;
}

.portfolio-grid > .col { display: flex; }

.portfolio-card,
.portfolio-card-bodys {
    width: 100%;
    min-width: 0;
    overflow: hidden;
    background: #090909;
    border: 1px solid #292929;
    transition: border-color 0.3s, transform 0.3s;
}

.portfolio-card:hover,
.portfolio-card-bodys:hover { border-color: var(--xvs-red); transform: translateY(-3px); }

.portfolio-img,
.card-img-top {
    display: block;
    width: 100%;
    height: clamp(250px, 31vw, 450px);
    object-fit: contain;
    filter: grayscale(50%);
    transition: filter 0.45s, transform 0.55s;
}

.portfolio-card:hover .portfolio-img,
.portfolio-card-bodys:hover .portfolio-img {
    filter: grayscale(0);
    transform: scale(1.025);
}

.portfolio-card-body { padding: 1rem; text-align: left; background: #090909; }

.card-text {
    color: #eee;
    font-family: Georgia, serif;
    font-size: 1.1rem;
    overflow-wrap: anywhere;
}

/* BORDURES PAR CATÉGORIE */

p.border-fantasy       { border: 1px solid #40513e; }
p.border-dark-fantasy  { border: 1px solid var(--xvs-red); }
p.border-sweet-fantasy { border: 1px solid #485c67; }
p.border-ink           { border: 1px solid #535151; }

.portfolio-card-bodys.border-fantasy       { border-color: #40513e; }
.portfolio-card-bodys.border-dark-fantasy  { border-color: var(--xvs-red); }
.portfolio-card-bodys.border-sweet-fantasy { border-color: #485c67; }
.portfolio-card-bodys.border-ink           { border-color: #535151; }

/* TIMELINE / DÉCOR */

.fx-0793-root,
.fx-0793-root *,
.fx-0793-root *::before,
.fx-0793-root *::after { box-sizing: border-box; }

.fx-0793-root {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    position: relative;
    color: #fff;
    font-family: sans-serif;
}

.spb-scene { position: relative; width: 100%; isolation: isolate; }
.spb-scroll { padding: 0 0 0 40px; }
.spb-block { color: #e7e9f5; }
.spb-block h4 { margin: 0 0 8px; font-size: 16px; }

.spb-block p {
    margin: 0 0 22px;
    font-size: 13px;
    line-height: 1.7;
    color: #aeb2c8;
}

.spb-beam {
    position: absolute;
    left: 14px;
    top: 18px;
    bottom: 18px;
    width: 4px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.10);
    z-index: 3;
    pointer-events: none;
}

.spb-beam-fill {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: calc(var(--spb-p, 0) * 100%);
    border-radius: 4px;
    background: linear-gradient(180deg, #5cffd8, #6d8bff);
    box-shadow: 0 0 12px rgba(109, 139, 255, 0.8), 0 0 4px rgba(92, 255, 216, 0.9);
}

.spb-beam-dot {
    position: absolute;
    left: 50%;
    top: calc(var(--spb-p, 0) * 100%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    box-shadow: 0 0 14px 3px rgba(109, 139, 255, 0.9);
}

.spb-pct {
    position: absolute;
    right: 14px;
    top: 12px;
    z-index: 3;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    color: #aeb2c8;
    background: rgba(0, 0, 0, 0.4);
    padding: 3px 9px;
    border-radius: 999px;
    pointer-events: none;
}

/* contact*/ 
 .example-wrapper {
        width: min(95%, 800px);
        margin: 1em auto;
        font: 18px/1.5 sans-serif;
    }

    .contact-fields {
        display: flex;
        gap: 1rem;
        padding: 0.5rem;
    }

    .contact-fields > div {
        flex: 1 1 0;
        min-width: 0;
    }

    .contact-fields input,
    .contact-fields textarea {
        width: 100%;
        max-width: 100%;
        font-size: 16px;
    }

    @media (max-width: 600px) {
        .contact-fields {
            flex-direction: column;
            gap: 0;
        }

        .contact-fields > div {
            width: 100%;
        }
    }
/* lightbox*/ /* Agrandissement d'une image au clic + zone de zoom à côté (survol) */

.portfolio-img { cursor: zoom-in; }

.lbz-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    overflow-y: auto;
    background: rgba(8, 8, 12, 0.93);
    animation: lbz-fade .18s ease-out;
}
.lbz-overlay[hidden] { display: none; }
html.lbz-open { overflow: hidden; }

.lbz-close {
    position: fixed;
    top: .75rem;
    right: 1rem;
    z-index: 2;
    width: 2.75rem;
    height: 2.75rem;
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 50%;
    background: rgba(255, 255, 255, .06);
    color: #f3eee6;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
}
.lbz-close:hover,
.lbz-close:focus-visible { background: #b3122b; border-color: #b3122b; outline: none; }

.lbz-dialog {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    max-width: 100%;
    max-height: 100%;
}

.lbz-figure { margin: 0; min-width: 0; }

.lbz-stage {
    position: relative;
    display: inline-block;
    max-width: 100%;
    line-height: 0;
    cursor: crosshair;
}

.lbz-img {
    display: block;
    max-width: calc(100vw - 31rem);
    max-height: 80vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .6);
}

.lbz-lens {
    position: absolute;
    display: none;
    pointer-events: none;
    border: 2px solid #b3122b;
    background: rgba(179, 18, 43, .12);
    box-sizing: border-box;
}
.lbz-stage.is-zooming .lbz-lens { display: block; }

.lbz-caption {
    margin-top: .75rem;
    color: #cfc8bd;
    font-size: .95rem;
    line-height: 1.4;
    text-align: center;
}

.lbz-pane {
    flex: 0 0 26rem;
    width: 26rem;
    height: min(26rem, 80vh);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 6px;
    background-color: #101015;
    background-repeat: no-repeat;
}
.lbz-pane.is-idle { background-image: none !important; }
.lbz-pane:not(.is-idle) .lbz-hint { display: none; }
.lbz-hint {
    padding: 1.5rem;
    color: #8d877e;
    font-size: .95rem;
    text-align: center;
}

/* Sur tablette et téléphone : affichage de l'image seule, sans zoom au survol. */
@media (max-width: 900px) {
    .lbz-overlay { padding: 3.5rem 0.75rem 1rem; }
    .lbz-dialog { width: 100%; justify-content: center; }
    .lbz-pane, .lbz-lens { display: none !important; }
    .lbz-img {
        max-width: 94vw;
        max-height: 82vh;
    }
    .lbz-stage { cursor: default; }
}

@media (max-width: 480px) {
    .lbz-overlay { padding: 3.5rem 0.5rem 0.75rem; }
    .lbz-img { max-width: 96vw; max-height: 78vh; }
    .lbz-caption { font-size: 0.85rem; }
}

@keyframes lbz-fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .lbz-overlay { animation: none; } }

/* TABLETTES */

@media (max-width: 992px) {
    .xvs-home {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.5rem;
        margin-top: 1.5rem;
    }

    .xvs-intro {
        position: static;
        padding: 0 0 1.25rem;
        border-bottom: 1px solid #292929;
    }

    .xvs-intro-copy { max-width: 48rem; }
    .xvs-socials { margin-top: 0; }
    .portfolio-img, .card-img-top { height: clamp(230px, 38vw, 390px); }
}

/* TÉLÉPHONES */

@media (max-width: 767.98px) {
    .xvs-topbar {
        min-height: 60px;
        padding: 0.55rem 4%;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .xvs-menu-toggle { display: block; }

    .xvs-topnav,
    .xvs-topnav.collapse:not(.show) {
        display: none;
    }

    .xvs-topnav.collapse.show {
        display: flex;
        flex: 0 0 100%;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0.35rem 0 0.65rem;
    }

    .xvs-topnav a {
        display: block;
        padding: 0.8rem 0.35rem;
        border-top: 1px solid #292929;
        font-size: 0.82rem;
    }

    .xvs-topnav .xvs-admin-link {
        margin-top: 0.35rem;
        padding: 0.75rem;
        text-align: center;
    }

    .xvs-home {
        margin: 1.2rem 0 2rem;
        padding: 0 4%;
        gap: 1.2rem;
    }

    .xvs-intro h1 { font-size: clamp(2rem, 8vw, 2.8rem); }
    .xvs-kicker { font-size: 0.82rem; letter-spacing: 2.5px; }
    .xvs-rule { margin: 1.2rem 0; }
    .xvs-intro-copy { font-size: 0.9rem; line-height: 1.7; }
    .xvs-contact-cta { width: 100%; max-width: 320px; }
    .xvs-socials { justify-content: flex-start; padding-top: 1.2rem; }

    .category-filters {
        margin-bottom: 1.4rem;
        padding: 0.7rem;
        gap: 0.45rem;
    }

    .category-filters p {
        padding: 0.5rem 0.65rem;
        font-size: 0.9rem;
    }
}


/* TÉLÉPHONES ET PETITS ÉCRANS */

@media (max-width: 900px) {

    .xvs-topbar {
        min-height: 60px;
        padding: 0.55rem 4%;
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        gap: 0.5rem;
    }

    .xvs-wordmark {
        flex: 1 1 auto;
        font-size: 1.15rem;
        white-space: nowrap;
    }

    .xvs-menu-toggle {
        display: flex !important;
        flex: 0 0 44px;
        width: 44px;
        height: 40px;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        cursor: pointer;
    }

    .xvs-menu-toggle span {
        display: block;
        width: 22px;
        height: 2px;
        margin: 3px 0;
        background: #eee;
    }

    .xvs-topnav.collapse:not(.show) {
        display: none !important;
    }

    .xvs-topnav.collapse.show {
        display: flex !important;
        flex: 0 0 100%;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0.35rem 0 0.65rem;
    }

    .xvs-topnav a {
        display: block;
        padding: 0.8rem 0.35rem;
        border-top: 1px solid #292929;
        font-size: 0.82rem;
    }

    .xvs-topnav .xvs-admin-link {
        margin-top: 0.35rem;
        padding: 0.75rem;
        text-align: center;
    }

    .xvs-home {
        grid-template-columns: minmax(0, 1fr);
        margin: 1.2rem 0 2rem;
        padding: 0 4%;
        gap: 1.2rem;
    }

    .xvs-intro {
        position: static;
        padding: 0 0 1.25rem;
        border-bottom: 1px solid #292929;
    }

    .xvs-intro h1 {
        font-size: clamp(2rem, 8vw, 2.8rem);
    }

    .xvs-kicker {
        font-size: 0.82rem;
        letter-spacing: 2.5px;
    }

    .xvs-rule {
        margin: 1.2rem 0;
    }

    .xvs-intro-copy {
        font-size: 0.9rem;
        line-height: 1.7;
    }

    .xvs-contact-cta {
        width: 100%;
        max-width: 320px;
    }

    .xvs-socials {
        justify-content: flex-start;
        padding-top: 1.2rem;
    }

    .category-filters {
        margin-bottom: 1.4rem;
        padding: 0.7rem;
        gap: 0.45rem;
    }

    .category-filters p {
        padding: 0.5rem 0.65rem;
        font-size: 0.9rem;
    }

    .spb-scroll {
        padding-left: 17px;
    }

    .spb-beam {
        left: 4px;
    }

    .spb-pct {
        right: 4px;
    }

    .portfolio-img,
    .card-img-top {
        height: clamp(190px, 56vw, 320px);
    }

    .card-text {
        font-size: 0.95rem;
    }
}


/* TRÈS PETITS TÉLÉPHONES */

@media (max-width: 380px) {
    .xvs-wordmark { font-size: 1.08rem; }
    .xvs-home { padding-right: 3%; padding-left: 3%; }
    .category-filters p { padding: 0.42rem 0.5rem; font-size: 0.82rem; }
    .portfolio-img, .card-img-top { height: 190px; }
}

/* Réduction des animations si l'utilisateur le demande dans son système. */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* =========================================================
   MENU DÉROULANT — téléphone et tablette (<= 900px)
   Le menu s'ouvre sous la barre au clic sur le bouton hamburger.
   ========================================================= */

@media (max-width: 900px) {
    .xvs-topbar { flex-wrap: nowrap; align-items: center; }
    .xvs-wordmark { white-space: nowrap; }

    /* Bouton hamburger (devient une croix quand le menu est ouvert) */
    .xvs-menu-toggle {
        display: flex !important;
        flex: 0 0 44px;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        cursor: pointer;
    }
    .xvs-menu-toggle span { transition: transform 0.2s, opacity 0.2s; }
    .xvs-topbar.is-open .xvs-menu-toggle span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
    .xvs-topbar.is-open .xvs-menu-toggle span:nth-child(2) { opacity: 0; }
    .xvs-topbar.is-open .xvs-menu-toggle span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

    /* Liste des pages : cachée, puis déroulée sous la barre */
    .xvs-topnav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 0;
        padding: 0.25rem 4% 0.75rem;
        background: #121111;
        border-bottom: 1px solid #242424;
        box-shadow: 0 14px 28px rgba(0, 0, 0, 0.55);
    }
    .xvs-topbar.is-open .xvs-topnav {
        display: flex;
        animation: xvs-drop 0.18s ease-out;
    }

    .xvs-topnav a {
        display: block;
        padding: 0.9rem 0.35rem;
        border-top: 1px solid #292929;
        font-size: 0.85rem;
    }
    .xvs-topnav .xvs-admin-link {
        margin-top: 0.5rem;
        padding: 0.8rem;
        text-align: center;
    }
}

@keyframes xvs-drop {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: none; }
}

/* =========================================================
   ADMINISTRATION : pas de bloc de présentation à gauche,
   le contenu prend donc toute la largeur de la page.
   ========================================================= */

.xvs-home--admin {
    display: block;
}

.xvs-home--admin .xvs-content {
    width: 100%;
    max-width: none;
}

/* Bouton Déconnexion (barre de navigation) */

.xvs-topnav .xvs-logout-link {
    padding: 0.55rem 0.8rem;
    border: 1px solid #6b2b2b;
    color: #e0a0a0;
}

.xvs-topnav .xvs-logout-link:hover {
    background: #6b2b2b;
    color: #fff;
}

@media (max-width: 900px) {
    .xvs-topnav .xvs-logout-link {
        margin-top: 0.5rem;
        padding: 0.8rem;
        text-align: center;
    }
}
