feat(index): ajouter hero carousel avec images et script dedie

This commit is contained in:
2026-05-28 17:48:45 +02:00
parent 4c958b448a
commit ba31d6447a
7 changed files with 342 additions and 12 deletions
+129 -6
View File
@@ -16,14 +16,51 @@ main[data-page-content] {
.hero {
background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
position: relative;
overflow: hidden;
background: #0b1324;
box-shadow: var(--shadow);
border-radius: 1rem;
padding: clamp(2rem, 4.5vw, 3.5rem);
color: var(--text);
min-height: clamp(24rem, 56vw, 34rem);
}
.hero-inner { width: 100%; }
.hero-carousel-track {
position: absolute;
inset: 0;
}
.hero-slide {
position: absolute;
inset: 0;
background-size: cover;
background-position: center;
opacity: 0;
transform: scale(1.02);
transition: opacity 700ms ease, transform 1000ms ease;
}
.hero-slide::before {
content: "";
position: absolute;
inset: 0;
background:
linear-gradient(110deg, rgba(2, 6, 23, 0.78) 18%, rgba(2, 6, 23, 0.28) 58%, rgba(2, 6, 23, 0.66) 100%),
radial-gradient(circle at 72% 20%, rgba(56, 189, 248, 0.2), transparent 48%);
}
.hero-slide.is-active {
opacity: 1;
transform: scale(1);
}
.hero-inner {
width: 100%;
max-width: 52rem;
position: relative;
z-index: 2;
}
.eyebrow {
color: var(--accent);
@@ -36,22 +73,26 @@ main[data-page-content] {
.hero-title {
font-family: "Georgia", "Palatino Linotype", serif;
font-size: clamp(3rem, 8vw, 5rem);
line-height: 0.95;
line-height: 1;
margin: 0 0 0.25rem;
color: var(--text);
color: #f8fbff;
text-shadow: 0 10px 28px rgba(2, 6, 23, 0.38);
}
.hero-subtitle {
font-size: clamp(1rem, 2.2vw, 1.3rem);
color: var(--muted);
color: #e7edf9;
margin: 0 0 1rem;
font-weight: 600;
text-shadow: 0 4px 18px rgba(2, 6, 23, 0.35);
}
.lead {
color: var(--muted);
color: #d8e1f3;
max-width: 68ch;
margin: 0 0 1.25rem;
text-wrap: pretty;
text-shadow: 0 2px 14px rgba(2, 6, 23, 0.34);
}
.hero-actions {
@@ -60,6 +101,62 @@ main[data-page-content] {
flex-wrap: wrap;
}
.hero-controls {
position: absolute;
right: clamp(1rem, 2.5vw, 2rem);
bottom: clamp(1rem, 2.8vw, 1.75rem);
z-index: 3;
display: inline-flex;
align-items: center;
gap: 0.45rem;
padding: 0.4rem 0.55rem;
border-radius: 999px;
backdrop-filter: blur(10px);
background: rgba(2, 6, 23, 0.46);
border: 1px solid rgba(148, 163, 184, 0.28);
}
.hero-control {
width: 2.2rem;
height: 2.2rem;
border: 0;
border-radius: 999px;
display: grid;
place-items: center;
font-size: 1.32rem;
color: #e2e8f0;
background: rgba(148, 163, 184, 0.22);
cursor: pointer;
transition: transform 180ms ease, background 180ms ease;
}
.hero-control:hover {
transform: translateY(-1px);
background: rgba(125, 211, 252, 0.36);
}
.hero-dots {
display: inline-flex;
align-items: center;
gap: 0.4rem;
margin: 0 0.15rem;
}
.hero-dot {
width: 0.6rem;
height: 0.6rem;
border-radius: 999px;
border: 0;
background: rgba(226, 232, 240, 0.55);
cursor: pointer;
transition: transform 180ms ease, background 180ms ease;
}
.hero-dot.is-active {
background: #7dd3fc;
transform: scale(1.18);
}
.button {
display: inline-flex;
@@ -178,6 +275,15 @@ main[data-page-content] {
@media (max-width: 980px) {
.hero-title { font-size: clamp(2.2rem, 7vw, 4rem); }
.hero {
min-height: 27rem;
}
.hero-controls {
left: 1rem;
right: auto;
}
.features {
flex-direction: column;
}
@@ -202,4 +308,21 @@ main[data-page-content] {
box-shadow: none;
pointer-events: auto;
}
}
@media (max-width: 640px) {
.hero {
min-height: 29rem;
padding: 1.5rem;
}
.hero-inner {
max-width: 100%;
}
.hero-controls {
left: 0.8rem;
right: 0.8rem;
justify-content: space-between;
}
}