165 lines
2.8 KiB
CSS
165 lines
2.8 KiB
CSS
/* Style pour le header */
|
|
.header {
|
|
background-color: #F9E7DB;
|
|
position: fixed;
|
|
width: 100%;
|
|
z-index: 3;
|
|
align-items: center;
|
|
display: block;
|
|
}
|
|
|
|
.header ul {
|
|
margin: 0;
|
|
padding: 0;
|
|
list-style: none;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.header li {
|
|
display: block;
|
|
padding: 0.5rem;
|
|
border-right: 1px solid #F9E7DB;
|
|
text-decoration: none;
|
|
|
|
}
|
|
|
|
.header li a {
|
|
position: relative;
|
|
text-decoration: none;
|
|
color: inherit;
|
|
padding-bottom: 4px; /* pour éviter que la ligne touche le texte */
|
|
}
|
|
|
|
.header li a::after {
|
|
content: "";
|
|
position: absolute;
|
|
left: 0;
|
|
bottom: 0;
|
|
width: 0%;
|
|
height: 2px;
|
|
background-color: #CC4331;
|
|
transition: width 0.3s ease;
|
|
}
|
|
|
|
.header li a:hover::after {
|
|
width: 100%;
|
|
}
|
|
|
|
.header li a:hover,
|
|
.header .menu-btn:hover {
|
|
background-color: #F9E7DB;
|
|
}
|
|
|
|
.header .logo {
|
|
max-width: 380px;
|
|
text-overflow: ellipsis;
|
|
vertical-align: middle;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.header .logo img {
|
|
display: inline-block;
|
|
max-height: 40px;
|
|
padding: 8px 4px 8px 12px;
|
|
vertical-align: middle;
|
|
}
|
|
|
|
.header nav {
|
|
margin-left: auto;
|
|
}
|
|
|
|
/* 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;
|
|
}
|
|
|
|
/* Styles pour les écrans plus grand (hors téléphones) */
|
|
@media (min-width: 48em) {
|
|
|
|
.header {
|
|
display: flex;
|
|
}
|
|
.header li {
|
|
float: left;
|
|
}
|
|
|
|
.header li a {
|
|
padding: 0.5rem;
|
|
}
|
|
|
|
.header .menu {
|
|
clear: none;
|
|
float: right;
|
|
max-height: none;
|
|
}
|
|
|
|
.header .menu-icon {
|
|
display: none;
|
|
}
|
|
} |