TEC : Site pure CSS
This commit is contained in:
375
style.css
375
style.css
@@ -1,195 +1,202 @@
|
||||
.parallax {
|
||||
/* overflow: hidden; */
|
||||
position: relative;
|
||||
z-index: 0;
|
||||
min-height: 75vh;
|
||||
display: grid;
|
||||
grid-template-areas: "stack";
|
||||
background-color: #FFEDE5;
|
||||
}
|
||||
|
||||
.parallax > * {
|
||||
grid-area: stack;
|
||||
animation: parallax linear;
|
||||
animation-timeline: scroll();
|
||||
}
|
||||
|
||||
.parallax > img {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.primary-header,
|
||||
.hero {
|
||||
--parallax-speed: 10;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.parallax__bg {
|
||||
--parallax-speed: -10;
|
||||
|
||||
z-index: 1;
|
||||
min-height: 100%;
|
||||
width: 100%;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.parallax__dust {
|
||||
--parallax-speed: -20;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.parallax__luna {
|
||||
--parallax-speed: 50;
|
||||
z-index: 3;
|
||||
}
|
||||
|
||||
.parallax__manny {
|
||||
--parallax-speed: 30;
|
||||
z-index: 4;
|
||||
}
|
||||
|
||||
.parallax__jax {
|
||||
--parallax-speed: 10;
|
||||
z-index: 5;
|
||||
}
|
||||
|
||||
.parallax__rays {
|
||||
--parallax-speed: 50;
|
||||
z-index: 3;
|
||||
}
|
||||
|
||||
.parallax__foreground-front,
|
||||
.parallax__foreground-back {
|
||||
z-index: 999;
|
||||
align-self: end;
|
||||
}
|
||||
|
||||
.parallax__foreground-back {
|
||||
transform: scaleY(1.2);
|
||||
transform-origin: bottom;
|
||||
mix-blend-mode: hard-light;
|
||||
}
|
||||
|
||||
.main-content {
|
||||
position: relative;
|
||||
/* z-index: 1; */
|
||||
background: #FFEDE5;
|
||||
padding-block: 6rem;
|
||||
}
|
||||
|
||||
@keyframes parallax {
|
||||
to {
|
||||
transform:
|
||||
translateY(calc(var(--parallax-speed) * 200px));
|
||||
}
|
||||
}
|
||||
|
||||
/* general styling */
|
||||
|
||||
html {
|
||||
color-scheme: normal;
|
||||
/* Style de la bannière */
|
||||
.banner {
|
||||
background-image: url('assets/img/accueil.jpg');
|
||||
/* Remplace 'ton-image-de-fond.jpg' par le chemin de ton image */
|
||||
background-size: cover;
|
||||
/* L'image couvre tout l'espace disponible */
|
||||
background-position: center;
|
||||
/* Centre l'image */
|
||||
/*color: #fff;
|
||||
/* Texte en blanc sur l'image */
|
||||
/*text-align: center;
|
||||
padding: 4rem 2rem;
|
||||
Ajoute de l'espace intérieur
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
Centre le contenu horizontalement
|
||||
align-items: center;
|
||||
Centre le contenu verticalement */
|
||||
min-height: 50vh;
|
||||
/* Hauteur minimum de la bannière (50% de la hauteur de la fenêtre) */
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: "Rubik", sans-serif;
|
||||
font-size: 1.25rem;
|
||||
font-weight: 700; /* for demo only */
|
||||
text-transform: uppercase; /* for demo only */
|
||||
min-height: 300vh; /* for demo only */
|
||||
font-family: sans-serif;
|
||||
/* Police de caractères par défaut */
|
||||
line-height: 1.6;
|
||||
/* Espacement entre les lignes pour une meilleure lisibilité */
|
||||
margin: 0;
|
||||
/* Supprime les marges par défaut du body */
|
||||
padding: 0;
|
||||
/* Supprime les paddings par défaut du body */
|
||||
background-color: #F9E7DB;
|
||||
/* Couleur de fond légère */
|
||||
color: #333;
|
||||
/* Couleur de texte principale */
|
||||
}
|
||||
|
||||
img {
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
.header {
|
||||
background-color: #F9E7DB;
|
||||
box-shadow: 1px 1px 4px 0 rgba(0, 0, 0, .1);
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
z-index: 3;
|
||||
}
|
||||
|
||||
.wrapper {
|
||||
width: min(65rem, 100% - 4rem);
|
||||
margin-inline: auto;
|
||||
.header ul {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.flex-group {
|
||||
display: flex;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.button {
|
||||
font: inherit;
|
||||
font-style: italic;
|
||||
text-transform: uppercase;
|
||||
background: rgb(227, 195, 14);
|
||||
padding: 1em 2em;
|
||||
border: 0;
|
||||
border-radius: 0.125em;
|
||||
}
|
||||
|
||||
.primary-header {
|
||||
padding-block: 2rem;
|
||||
}
|
||||
|
||||
.primary-header__inner {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.primary-nav ul {
|
||||
flex: 1;
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
display: flex;
|
||||
gap: 1rem;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.primary-nav a {
|
||||
color: rgb(227, 195, 14);
|
||||
font-weight: 700;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.logo {
|
||||
max-width: 100px;
|
||||
position: relative;
|
||||
|
||||
&::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
inset: -3rem;
|
||||
z-index: -1;
|
||||
background: radial-gradient(hsl(0 0% 100% / 0.5), transparent 70%);
|
||||
}
|
||||
}
|
||||
|
||||
.hero {
|
||||
margin-block-start: max(20vh, 8rem);
|
||||
}
|
||||
|
||||
.hero__title {
|
||||
font-size: 2rem;
|
||||
max-width: 3ch;
|
||||
line-height: 1;
|
||||
font-style: italic;
|
||||
font-weight: 300;
|
||||
position: relative;
|
||||
|
||||
> span {
|
||||
font-style: normal;
|
||||
font-size: 0.5em;
|
||||
.header li a {
|
||||
display: block;
|
||||
}
|
||||
|
||||
&::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
background: white;
|
||||
z-index: -1;
|
||||
scale: 2;
|
||||
opacity: 0.5;
|
||||
filter: blur(5rem);
|
||||
translate: -50%;
|
||||
}
|
||||
padding: 0.5rem;
|
||||
border-right: 1px solid #F9E7DB;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.header li a:hover,
|
||||
.header .menu-btn:hover {
|
||||
background-color: #F9E7DB;
|
||||
}
|
||||
|
||||
.header .logo {
|
||||
display: block;
|
||||
float: left;
|
||||
padding: 10px 20px;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/* menu */
|
||||
|
||||
.header .menu {
|
||||
clear: both;
|
||||
max-height: 0;
|
||||
transition: max-height .2s ease-out;
|
||||
}
|
||||
|
||||
/* menu icon */
|
||||
|
||||
.header .menu-icon {
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
float: right;
|
||||
padding: 28px 20px;
|
||||
position: relative;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.header .menu-icon .navicon {
|
||||
background: #333;
|
||||
display: block;
|
||||
height: 2px;
|
||||
position: relative;
|
||||
transition: background .2s ease-out;
|
||||
width: 18px;
|
||||
}
|
||||
|
||||
.header .menu-icon .navicon:before,
|
||||
.header .menu-icon .navicon:after {
|
||||
background: #333;
|
||||
content: '';
|
||||
display: block;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
transition: all .2s ease-out;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.header .menu-icon .navicon:before {
|
||||
top: 5px;
|
||||
}
|
||||
|
||||
.header .menu-icon .navicon:after {
|
||||
top: -5px;
|
||||
}
|
||||
|
||||
/* menu btn */
|
||||
|
||||
.header .menu-btn {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.header .menu-btn:checked~nav .menu {
|
||||
max-height: 240px;
|
||||
}
|
||||
|
||||
.header .menu-btn:checked~.menu-icon .navicon {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.header .menu-btn:checked~.menu-icon .navicon:before {
|
||||
transform: rotate(-45deg);
|
||||
}
|
||||
|
||||
.header .menu-btn:checked~.menu-icon .navicon:after {
|
||||
transform: rotate(45deg);
|
||||
}
|
||||
|
||||
.header .menu-btn:checked~.menu-icon:not(.steps) .navicon:before,
|
||||
.header .menu-btn:checked~.menu-icon:not(.steps) .navicon:after {
|
||||
top: 0;
|
||||
}
|
||||
|
||||
main {
|
||||
padding: 2rem;
|
||||
max-width: 800px;
|
||||
/* Limite la largeur du contenu pour une meilleure lecture */
|
||||
margin: 0 auto;
|
||||
/* Centre le contenu horizontalement */
|
||||
}
|
||||
|
||||
section {
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
|
||||
h1,
|
||||
h2 {
|
||||
color: #CC4331;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
footer {
|
||||
background-color: #CC4331;
|
||||
text-align: center;
|
||||
padding: 0.5rem 0;
|
||||
/* Suppression de la propriété sticky */
|
||||
bottom: 0;
|
||||
/* Assure qu'il reste en bas du viewport initialement */
|
||||
width: 100%;
|
||||
font-size: 0.9rem;
|
||||
/* Optionnel */
|
||||
}
|
||||
|
||||
|
||||
/* Styles pour les écrans plus petits (téléphones) */
|
||||
@media (min-width: 48em) {
|
||||
.banner {
|
||||
padding: 2rem 1rem;
|
||||
min-height: 70vh;
|
||||
/* Prend plus de hauteur sur les petits écrans */
|
||||
}
|
||||
|
||||
.header li {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.header li a {
|
||||
padding: 0.5rem;
|
||||
}
|
||||
|
||||
.header .menu {
|
||||
clear: none;
|
||||
float: right;
|
||||
max-height: none;
|
||||
}
|
||||
|
||||
.header .menu-icon {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user