/*
 * Site public : mise en page et effets.
 * Toutes les animations sont désactivées si l'utilisateur préfère réduire les mouvements.
 */
html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

section[id] {
    scroll-margin-top: 4.5rem;
}

.section {
    position: relative;
    padding-block: 3rem;
}

@media (min-width: 992px) {
    .section {
        padding-block: 5rem;
    }
}

.section-alt {
    background: var(--bs-tertiary-bg);
    border-block: 1px solid var(--bs-border-color);
}

.skip-link {
    position: absolute;
    top: .5rem;
    left: .5rem;
    z-index: 1090;
}

/* ---------- Barre de progression de lecture ---------- */

.scroll-progress {
    position: fixed;
    inset: 0 0 auto;
    height: 2px;
    z-index: 1040;
    background: linear-gradient(90deg, #ff7676, #ffb199);
    transform-origin: 0 50%;
    transform: scaleX(var(--progress, 0));
}

/* ---------- Navigation ---------- */

.site-nav {
    padding-block: 1rem;
    transition: background-color .4s var(--cct-ease), padding .4s var(--cct-ease), box-shadow .4s var(--cct-ease), border-color .4s;
    border-bottom: 1px solid transparent;
}

.site-nav.is-solid {
    padding-block: .5rem;
    background: rgba(15, 18, 24, .78);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    border-bottom-color: var(--bs-border-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
}

.site-nav .navbar-brand img {
    transition: transform .5s var(--cct-ease-out);
}

.site-nav .navbar-brand:hover img {
    transform: rotate(-8deg) scale(1.08);
}

.site-nav .nav-link {
    position: relative;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .75);
    transition: color .25s;
}

.site-nav .nav-link::after {
    content: "";
    position: absolute;
    left: var(--bs-nav-link-padding-x, .5rem);
    right: var(--bs-nav-link-padding-x, .5rem);
    bottom: .2rem;
    height: 1px;
    background: var(--bs-primary);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform .35s var(--cct-ease);
}

.site-nav .nav-link:hover,
.site-nav .nav-link.active {
    color: #fff;
}

.site-nav .nav-link:hover::after,
.site-nav .nav-link.active::after {
    transform: scaleX(1);
    transform-origin: left;
}

@media (max-width: 991.98px) {
    .site-nav .navbar-collapse {
        margin-top: .5rem;
        padding: 0 1rem 1rem;
        border-radius: 1rem;
        background: rgba(15, 18, 24, .95);
        border: 1px solid var(--bs-border-color);
    }

    .site-nav .nav-link::after {
        display: none;
    }
}

/* ---------- Boutons ---------- */

.btn {
    transition: transform .25s var(--cct-ease), box-shadow .25s var(--cct-ease), background-color .2s, border-color .2s, color .2s;
}

.btn-glow {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.btn-glow::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .45) 50%, transparent 70%);
    transform: translateX(-120%);
    transition: transform .7s var(--cct-ease);
}

.btn-glow:hover,
.btn-glow:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px var(--cct-primary-glow);
}

.btn-glow:hover::before {
    transform: translateX(120%);
}

.btn-outline-light:hover {
    transform: translateY(-2px);
}

/* ---------- Accueil (hero) ---------- */

.hero {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: 100vh;
    min-height: 100svh;
    overflow: hidden;
    background: #0b0d12;
}

.hero-media {
    position: absolute;
    inset: 0;
    background: var(--placeholder);
    transform: translate3d(0, var(--hero-shift, 0px), 0);
    will-change: transform;
}

.hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.12);
    filter: saturate(.9);
    transition: transform 2.8s var(--cct-ease-out), filter 2.8s;
}

.is-ready .hero-media img {
    transform: scale(1.02);
    filter: none;
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 50% 120%, rgba(15, 18, 24, .95) 10%, transparent 60%),
        linear-gradient(180deg, rgba(15, 18, 24, .6) 0%, rgba(15, 18, 24, .1) 40%, rgba(15, 18, 24, .97) 100%);
}

/* Nappes de brume qui dérivent lentement */
.hero-fog {
    position: absolute;
    inset: 0;
    pointer-events: none;
    mix-blend-mode: screen;
    opacity: .35;
}

.hero-fog span {
    position: absolute;
    inset: auto -50% 0;
    height: 70%;
    background:
        radial-gradient(40% 50% at 20% 80%, rgba(220, 228, 240, .35), transparent 70%),
        radial-gradient(35% 45% at 60% 90%, rgba(220, 228, 240, .28), transparent 70%),
        radial-gradient(30% 40% at 90% 75%, rgba(220, 228, 240, .25), transparent 70%);
    filter: blur(20px);
    animation: fog-drift 38s linear infinite alternate;
}

.hero-fog span + span {
    height: 55%;
    opacity: .7;
    animation-duration: 52s;
    animation-direction: alternate-reverse;
}

@keyframes fog-drift {
    from { transform: translate3d(-12%, 0, 0); }
    to { transform: translate3d(12%, -4%, 0); }
}

.hero-content {
    padding-bottom: 3rem;
}

@media (min-width: 992px) {
    .hero-content {
        padding-bottom: 4.5rem;
    }
}

.hero h1 {
    text-shadow: 0 6px 40px rgba(0, 0, 0, .45);
    letter-spacing: .01em;
}

.js .hero-line {
    opacity: 0;
    transform: translateY(24px);
    filter: blur(6px);
    transition: opacity 1s var(--cct-ease-out), transform 1s var(--cct-ease-out), filter 1s var(--cct-ease-out);
    transition-delay: var(--delay, 0s);
}

.js.is-ready .hero-line {
    opacity: 1;
    transform: none;
    filter: none;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .45rem 1rem;
    border-radius: 999px;
    font-size: .85rem;
    font-weight: 500;
    color: #e6e8ee;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .16);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.status-dot {
    width: .5rem;
    height: .5rem;
    border-radius: 50%;
    background: #8a909c;
}

.status-badge.is-open {
    color: #c9f7dc;
    background: rgba(25, 135, 84, .22);
    border-color: rgba(70, 200, 130, .4);
}

.status-badge.is-open .status-dot {
    background: #46c882;
    box-shadow: 0 0 0 0 rgba(70, 200, 130, .7);
    animation: pulse 2.2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(70, 200, 130, .6); }
    70% { box-shadow: 0 0 0 .55rem rgba(70, 200, 130, 0); }
    100% { box-shadow: 0 0 0 0 rgba(70, 200, 130, 0); }
}

.scroll-cue {
    display: inline-block;
    font-size: .75rem;
    letter-spacing: .2em;
    text-transform: uppercase;
    text-decoration: none;
    color: rgba(255, 255, 255, .55);
    transition: color .3s;
}

.scroll-cue:hover {
    color: #fff;
}

.scroll-cue .icon {
    animation: nudge 2.4s var(--cct-ease) infinite;
}

@keyframes nudge {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(6px); }
}

/* ---------- Apparition au défilement ---------- */

.js [data-reveal] {
    opacity: 0;
    transform: translateY(32px) scale(.985);
    transition: opacity .9s var(--cct-ease-out), transform .9s var(--cct-ease-out);
    transition-delay: var(--delay, 0s);
}

.js [data-reveal].is-visible {
    opacity: 1;
    transform: none;
}

/* ---------- Vignettes ---------- */

.tile {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    border-radius: .85rem;
    overflow: hidden;
    background: none;
    color: inherit;
    text-align: left;
    cursor: zoom-in;
    isolation: isolate;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .06);
    transition: box-shadow .5s var(--cct-ease), transform .5s var(--cct-ease);
}

.tile.h-100 > .tile-media {
    height: 100%;
}

.tile-media {
    display: block;
    background: var(--placeholder, var(--bs-tertiary-bg));
}

.tile-media img {
    object-fit: cover;
    transition: transform 1.1s var(--cct-ease-out), filter .6s var(--cct-ease), opacity .8s var(--cct-ease);
}

/* Fondu net depuis la couleur moyenne une fois l'image chargée */
.js .tile-media img:not(.is-loaded) {
    opacity: 0;
    filter: blur(12px);
    transform: scale(1.06);
}

.tile::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(180deg, transparent 45%, rgba(8, 10, 14, .85) 100%);
    opacity: .55;
    transition: opacity .5s var(--cct-ease);
}

.tile-caption {
    position: absolute;
    inset: auto 0 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: .15rem;
    padding: 1rem 1.15rem;
    color: #fff;
    transform: translateY(.35rem);
    transition: transform .5s var(--cct-ease-out);
}

.tile-category {
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--bs-primary);
    opacity: 0;
    transform: translateY(.4rem);
    transition: opacity .45s var(--cct-ease), transform .45s var(--cct-ease-out);
}

.tile-title {
    font-family: var(--cct-display);
    font-weight: 700;
    font-size: 1.05rem;
    text-shadow: 0 2px 12px rgba(0, 0, 0, .5);
}

.tile-badge {
    position: absolute;
    top: .85rem;
    left: .85rem;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .25rem .6rem;
    border-radius: 999px;
    background: rgba(15, 18, 24, .7);
    border: 1px solid rgba(255, 255, 255, .15);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .1em;
    pointer-events: none;
}

.tile-badge .icon {
    color: var(--bs-primary);
}

.tile-zoom {
    position: absolute;
    top: .85rem;
    right: .85rem;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 50%;
    color: #fff;
    background: rgba(15, 18, 24, .55);
    border: 1px solid rgba(255, 255, 255, .2);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    transform: scale(.7) rotate(-45deg);
    transition: opacity .4s var(--cct-ease), transform .5s var(--cct-ease-out);
}

@media (hover: hover) {
    .tile:hover,
    .tile:focus-visible {
        box-shadow: 0 0 0 1px rgba(255, 118, 118, .45), 0 24px 50px -12px rgba(0, 0, 0, .7);
    }

    .tile:hover .tile-media img.is-loaded,
    .tile:focus-visible .tile-media img.is-loaded {
        transform: scale(1.06);
        filter: brightness(1.06) saturate(1.06);
    }

    .tile:hover::after,
    .tile:focus-visible::after {
        opacity: 1;
    }

    .tile:hover .tile-caption,
    .tile:focus-visible .tile-caption {
        transform: none;
    }

    .tile:hover .tile-category,
    .tile:focus-visible .tile-category,
    .tile:hover .tile-zoom,
    .tile:focus-visible .tile-zoom {
        opacity: 1;
        transform: none;
    }
}

@media (hover: none) {
    .tile-category {
        opacity: 1;
        transform: none;
    }
}

.tile:focus-visible {
    outline: 2px solid var(--bs-primary);
    outline-offset: 3px;
}

/* ---------- Projet à la une ---------- */

.project-facts {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1.5rem;
    border: 1px solid var(--bs-border-color);
    border-radius: .85rem;
    background: linear-gradient(160deg, rgba(255, 118, 118, .07), transparent 55%);
}

.facts-label {
    margin-bottom: .4rem;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--bs-secondary-color);
}

/* ---------- Commandes ---------- */

.offer-card {
    overflow: hidden;
    border: 1px solid var(--bs-border-color);
    border-radius: .85rem;
    background: var(--bs-tertiary-bg);
    transition: transform .5s var(--cct-ease-out), box-shadow .5s var(--cct-ease), border-color .5s;
}

.offer-card .tile {
    border-radius: 0;
    box-shadow: none;
}

.offer-card:hover {
    transform: translateY(-6px);
    border-color: rgba(255, 118, 118, .4);
    box-shadow: 0 28px 50px -20px rgba(0, 0, 0, .8);
}

.step {
    padding: 1rem;
    border-radius: .85rem;
    transition: background-color .4s;
}

.step:hover {
    background: rgba(255, 255, 255, .03);
}

.step-number {
    background: linear-gradient(160deg, #ff7676, #ffc2a8);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    transition: transform .5s var(--cct-ease-out);
}

.step:hover .step-number {
    transform: translateY(-3px) scale(1.08);
}

/* ---------- Contact ---------- */

.contact {
    border-top: 1px solid var(--bs-border-color);
    animation: pattern-drift 90s linear infinite;
}

@keyframes pattern-drift {
    to { background-position: 560px 280px; }
}

.contact-card {
    position: relative;
    padding: 2rem 1.5rem;
    /* Bord en dégradé : fond plein sous le contenu, dégradé visible dans la bordure transparente. */
    border: 1px solid transparent;
    border-radius: 1.25rem;
    background:
        linear-gradient(var(--bs-body-bg), var(--bs-body-bg)) padding-box,
        linear-gradient(140deg, rgba(255, 118, 118, .6), transparent 40%, transparent 60%, rgba(255, 177, 153, .4)) border-box,
        linear-gradient(var(--bs-border-color), var(--bs-border-color)) border-box;
    box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .85);
}

@media (min-width: 992px) {
    .contact-card {
        padding: 3rem;
    }
}

.contact-avatar {
    border: 3px solid var(--bs-primary);
    box-shadow: 0 0 0 0 var(--cct-primary-glow);
    transition: transform .6s var(--cct-ease-out), box-shadow .6s;
}

.contact-avatar:hover {
    transform: scale(1.06) rotate(-3deg);
    box-shadow: 0 0 0 .6rem rgba(255, 118, 118, .12);
}

/* ---------- Pied de page & barre mobile ---------- */

.site-footer {
    padding-bottom: 5.5rem !important;
}

@media (min-width: 992px) {
    .site-footer {
        padding-bottom: 1.5rem !important;
    }
}

.mobile-bar {
    position: fixed;
    inset: auto 0 0;
    z-index: 1030;
    padding: .5rem .75rem calc(.5rem + env(safe-area-inset-bottom));
    background: rgba(15, 18, 24, .88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--bs-border-color);
    transform: translateY(110%);
    transition: transform .45s var(--cct-ease-out);
}

.mobile-bar.is-visible {
    transform: none;
}

/* ---------- Visionneuse ---------- */

.lightbox .modal-content {
    background: rgba(8, 10, 14, .94);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 0;
}

.lightbox-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
}

.lightbox-counter {
    margin-left: auto;
    font-size: .8rem;
    letter-spacing: .15em;
    color: var(--bs-secondary-color);
    font-variant-numeric: tabular-nums;
}

.lightbox-btn {
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    flex-shrink: 0;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .18);
    background: rgba(255, 255, 255, .06);
    color: #fff;
    transition: background-color .25s, border-color .25s, transform .3s var(--cct-ease-out);
}

.lightbox-btn:hover,
.lightbox-btn:focus-visible {
    background: var(--bs-primary);
    border-color: var(--bs-primary);
    color: #16181d;
    transform: scale(1.06);
}

.lightbox-stage {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
    min-height: 0;
    padding: 0 1rem;
    touch-action: pan-y;
}

.lightbox-figure {
    position: relative;
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    margin: 0;
}

/* Taille automatique dans les limites max-* : les attributs width/height ne servent qu'au ratio. */
.lightbox-figure img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: calc(100vh - 10rem);
    max-height: calc(100dvh - 10rem);
    border-radius: .6rem;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
    background: var(--placeholder, transparent);
    transition: opacity .35s var(--cct-ease), transform .45s var(--cct-ease-out), filter .5s var(--cct-ease);
}

.lightbox-figure img.is-leaving {
    opacity: 0;
    transform: translateX(calc(var(--direction, 1) * -24px)) scale(.98);
}

.lightbox-figure img.is-entering {
    opacity: 0;
    transform: translateX(calc(var(--direction, 1) * 24px)) scale(.98);
}

/* Aperçu affiché le temps que la version HD arrive */
.lightbox-figure img.is-preview {
    filter: blur(2px) saturate(.95);
}

.lightbox-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 2.5rem;
    height: 2.5rem;
    margin: -1.25rem 0 0 -1.25rem;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .2);
    border-top-color: var(--bs-primary);
    opacity: 0;
    transition: opacity .3s;
    animation: spin .9s linear infinite;
    pointer-events: none;
}

.lightbox-figure.is-loading .lightbox-loader {
    opacity: 1;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    z-index: 2;
    transform: translateY(-50%);
}

.lightbox-nav:hover,
.lightbox-nav:focus-visible {
    transform: translateY(-50%) scale(1.06);
}

.lightbox-nav.is-prev { left: 1rem; }
.lightbox-nav.is-next { right: 1rem; }

.lightbox-nav[hidden] {
    display: none;
}

/* Choix image / 3D */
.lightbox-views {
    display: inline-flex;
    margin-left: auto;
    padding: .25rem;
    gap: .25rem;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 999px;
    background: rgba(255, 255, 255, .04);
}

.lightbox-views[hidden] {
    display: none;
}

.lightbox-views + .lightbox-counter {
    margin-left: 0;
}

.lightbox-view {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .35rem .85rem;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--bs-secondary-color);
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    transition: background-color .25s, color .25s;
}

.lightbox-view:hover,
.lightbox-view:focus-visible {
    color: #fff;
}

.lightbox-view[aria-pressed="true"] {
    background: var(--bs-primary);
    color: #16181d;
}

@media (max-width: 575.98px) {
    .lightbox-view span {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
    }

    .lightbox-counter {
        display: none;
    }
}

/* Vue 3D */
.model-stage {
    position: relative;
    width: 100%;
    height: calc(100vh - 10rem);
    height: calc(100dvh - 10rem);
    border-radius: .6rem;
    background: radial-gradient(ellipse at 50% 40%, rgba(255, 118, 118, .07), transparent 65%);
    cursor: grab;
    touch-action: none;
    animation: model-in .6s var(--cct-ease-out);
}

.model-stage:active {
    cursor: grabbing;
}

.model-stage[hidden] {
    display: none;
}

.model-stage canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
    outline: none;
}

@keyframes model-in {
    from { opacity: 0; transform: scale(.985); }
}

.model-hint {
    position: absolute;
    bottom: .75rem;
    left: 50%;
    margin: 0;
    padding: .35rem .9rem;
    border-radius: 999px;
    background: rgba(8, 10, 14, .7);
    color: var(--bs-secondary-color);
    font-size: .75rem;
    white-space: nowrap;
    transform: translateX(-50%);
    pointer-events: none;
    transition: opacity .6s var(--cct-ease);
}

.model-stage.is-touched .model-hint {
    opacity: 0;
}

.model-reset {
    position: absolute;
    right: .75rem;
    bottom: .75rem;
    z-index: 1;
}

.model-error {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    margin: 0;
    color: var(--bs-secondary-color);
}

.lightbox-progress {
    position: absolute;
    top: calc(50% + 2.25rem);
    left: 50%;
    width: 7rem;
    height: 2px;
    margin-left: -3.5rem;
    border-radius: 2px;
    background: rgba(255, 255, 255, .12);
    overflow: hidden;
    opacity: 0;
    transition: opacity .3s;
    pointer-events: none;
}

.lightbox-progress::after {
    content: "";
    display: block;
    height: 100%;
    background: var(--bs-primary);
    transform-origin: left;
    transform: scaleX(var(--progress, 0));
    transition: transform .2s linear;
}

.lightbox-figure.is-model.is-loading .lightbox-progress {
    opacity: 1;
}

.lightbox-description {
    min-height: 1.5rem;
    max-width: 48rem;
    margin: .75rem auto 1.25rem;
    padding: 0 1rem;
    text-align: center;
    color: var(--bs-secondary-color);
}

@media (min-width: 768px) {
    .lightbox-stage {
        padding: 0 4.75rem;
    }
}

@media (max-width: 767.98px) {
    .lightbox-nav {
        top: auto;
        bottom: -3.75rem;
        transform: none;
    }

    .lightbox-nav:hover,
    .lightbox-nav:focus-visible {
        transform: scale(1.06);
    }

    .lightbox-stage {
        margin-bottom: 3.5rem;
    }
}

/* ---------- Mouvements réduits ---------- */

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        transition-delay: 0s !important;
    }

    .hero-media {
        transform: none;
    }
}
