.home-projets {
width: 100%;
}
.home-projets__item {
position: sticky;
top: 0;
height: calc(100 * var(--vp-unit));
width: 100%;
overflow: hidden;
background-color: var(--color-black);
}
.home-projets__lien-global {
display: block;
height: 100%;
color: inherit;
text-decoration: none;
}
.home-projets__lien-global:focus-visible {
outline: none;
}
.home-projets__lien-global:focus-visible .home-projets__overlay {
outline: 2px solid var(--color-white);
outline-offset: -8px;
}
.home-projets__frame {
position: relative;
height: 100%;
width: 100%;
overflow: hidden;
}
.home-projets__image {
position: absolute;
left: 50%;
top: 50%;
width: auto;
height: auto;
min-width: 100%;
min-height: 100%;
max-width: none;
display: block;
transform: translate3d(-50%, calc(-50% + var(--parallax-y, 0px)), 0);
transform-origin: center center;
will-change: transform;
}
@media (hover: none) {
.home-projets__image {
left: 0;
top: 0;
width: 100%;
height: 100%;
min-width: 0;
min-height: 0;
object-fit: cover;
object-position: center;
transform: none;
will-change: auto;
}
}
.home-projets__placeholder {
position: absolute;
inset: 0;
background-color: var(--color-gray-800);
}
.home-projets__overlay {
position: absolute;
inset: 0;
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: center;
padding: calc(var(--header-padding-y) + 48px) var(--header-padding-x) 48px;
background: color-mix(in srgb, var(--color-black) 30%, transparent);
pointer-events: none;
}
.home-projets__pills {
display: flex;
gap: 4px;
list-style: none;
margin: 0;
padding: 0;
}
.home-projets__pill {
position: relative;
font-family: var(--font-body);
font-size: 12px;
font-weight: var(--font-weight-medium);
color: var(--color-white);
text-transform: uppercase;
line-height: 1;
padding: var(--space-xs);
padding-left: 20px;
border-radius: var(--radius-sm);
background-color: var(--pill-image-bg);
backdrop-filter: var(--glass-blur);
-webkit-backdrop-filter: var(--glass-blur);
border: none;
border-top: 1px solid var(--pill-image-border);
box-shadow: var(--glass-shadow);
}
.home-projets__pill::before {
content: "";
position: absolute;
left: 8px;
top: 50%;
transform: translateY(-50%);
width: 4px;
height: 4px;
border-radius: 50%;
background-color: var(--color-white);
}
.home-projets__nom {
font-family: var(--font-display), var(--font-body), sans-serif;
font-size: 56px;
font-weight: var(--font-weight-book);
line-height: 0.8;
letter-spacing: 0.06em;
color: var(--color-white);
text-align: center;
text-transform: uppercase;
margin: 0;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.home-projets__cursor {
position: fixed;
top: 0;
left: 0;
width: 338px;
display: flex;
flex-direction: column;
align-items: center;
gap: 24px;
pointer-events: none;
z-index: 100;
opacity: 0;
transition: opacity 300ms ease-out;
will-change: transform;
}
.home-projets__cursor--visible {
opacity: 1;
}
.home-projets__cursor-label {
transition: opacity 300ms ease-out;
}
.home-projets__cursor--sans-lien .home-projets__cursor-label {
opacity: 0;
}
.home-projets__cursor-image-wrapper {
position: relative;
width: 100%;
height: 358px;
overflow: hidden;
border-radius: 16px;
box-shadow: 0 16px 24px color-mix(in srgb, var(--color-black) 25%, transparent);
background-color: var(--color-gray-200);
}
.home-projets__cursor-half {
position: absolute;
left: 0;
width: 100%;
overflow: hidden;
}
.home-projets__cursor-half--top {
top: 0;
height: 100%;
}
.home-projets__cursor-half--bottom {
bottom: 0;
height: 0;
}
.home-projets__cursor-image {
width: 100%;
height: 358px;
object-fit: cover;
display: block;
transform: scale(1.4);
will-change: transform;
}
.home-projets__cursor-image--top {
position: absolute;
top: 0;
left: 0;
}
.home-projets__cursor-image--bottom {
position: absolute;
bottom: 0;
left: 0;
}
.home-projets__cursor-label {
display: inline-flex;
align-items: center;
gap: 4px;
font-family: var(--font-body);
font-size: 16px;
font-weight: var(--font-weight-medium);
line-height: 1;
text-transform: uppercase;
color: var(--color-white);
}
.home-projets__cursor-arrow {
display: inline-flex;
width: 20px;
height: 20px;
}
.home-projets__cursor-arrow svg {
width: 100%;
height: 100%;
stroke: currentColor;
fill: none;
}
@media (hover: none) {
.home-projets__cursor {
display: none;
}
}
@media (max-width: 767px) {
.home-projets__overlay {
padding: var(--header-clearance) 24px 24px;
}
.home-projets__pills {
flex-wrap: wrap;
gap: var(--space-xs);
}
.home-projets__pill {
flex: 0 0 auto;
white-space: nowrap;
}
.home-projets__nom {
font-size: 36px;
line-height: 1.1;
}
}
@keyframes parallaxe-projet {
from { translate: 0 var(--parallaxe-amp, 0px); }
to { translate: 0 calc(-1 * var(--parallaxe-amp, 0px)); }
}
@supports (animation-timeline: view()) and (timeline-scope: none) {
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
body.mode-navigateur .home-projets {
view-timeline: --projets block;
view-timeline-inset: 0;
}
body.mode-navigateur .home-projets__image {
animation: parallaxe-projet linear both;
animation-timeline: --projets;
animation-range: exit-crossing var(--parallaxe-debut, 0px) exit-crossing var(--parallaxe-fin, 1px);
}
}
}
