/* CSS Reset */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    line-height: 1.15;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: sans-serif;
}

main {
    display: block;
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
figure,
pre,
table {
    margin: 0;
}

a {
    text-decoration: none;
    color: inherit;
}

ul,
ol {
    list-style: none;
    margin: 0;
    padding: 0;
}

img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
    height: auto;
}

button,
input,
select,
textarea {
    font: inherit;
}

table {
    border-collapse: collapse;
    border-spacing: 0;
}

blockquote,
q {
    quotes: none;
}

blockquote::before,
blockquote::after,
q::before,
q::after {
    content: '';
}

hr {
    border: 0;
    border-top: 1px solid #ccc;
}

code,
kbd,
pre,
samp {
    font-family: monospace, monospace;
}


@font-face {
    font-family: 'Fjalla One';
    src: url("font/FjallaOne-Regular.ttf") format('truetype');
}

/*Contenu*/

p {
    font-size: 12pt;
    line-height: 1.2;
    margin-bottom: 5px;
}

h1,
h2,
h3 {
    font-family: 'Fjalla One', sans-serif;
    letter-spacing: 1px;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 5px;
}

h1 {
    font-size: 20pt;
}

h3 {
    font-size: 16pt;
}

h4 {
    margin-bottom: 5px;
    letter-spacing: 0.5pt;
    font-weight: 600;
    font-size: 14pt;
}

.headerTop {
    width: 100%;
    position: fixed;
    display: flex;
    z-index: 999;
    height: 80px;
    background-color: #BFB895;
}

.headerBlanc {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    padding: 0px 20px;
    height: 80px;
    width: 25%;
    background-image: url("https://20km.ch/images/header/menu/background-blanc-sponsor.webp");
    background-repeat: no-repeat;
    background-position: right;
    background-size: cover;
}

.headerSponsor {

    max-height: 40px;
    max-width: 100%;
}

.headerLogo img {
    height: 112px;
    max-width: 100%;
    margin: 7px 35px;
}

.footerBlanc{
    display: none;
}

.headerAriane {
    width: 100%;
    height: 47px;
    background-color: #F2EFDF;
    position: fixed;
    margin-top: 80px;
    z-index: 998;
}

.textAriane {
    display: flex;
    justify-content: end;
    flex-direction: row;
    align-items: center;
    height: 100%;
    padding-right: 50px;
}

.textAriane p {
    font-size: 14px;
}

.gris {
    color: #6c757d !important;
}

main {
    position: relative;
    max-width: 100%;
    margin: auto;
}

.espace-vide {
    height: 127px;

}

.container {
    padding: 30px 200px;
}

.lienRapide {
    display: flex;
    align-items: center;
    padding: 10px;
    background-color: #0D0D0D;
    color: #F2EFDF;
    border: solid 2px #0D0D0D;
    height: 60px;
    font-size: 32px;
    border-radius: 10px;
    margin-bottom: 20px;
    transition: 0.5s;
}

.lienRapide:hover {
    background-color: #F2EFDF;
    color: #0D0D0D;
    border: solid 2px #0D0D0D;
    text-decoration: none !important;
}

footer {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    width: 100%;
    padding: 20px 200px;
    background-color: #735A45;
    color: #ffffff;
}

.infomaniak {
    position: relative;
    background-color: #BFB895;
    height: 50px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: right;
}

.infomaniak img {
    height: 50px;
}

.titreAccueil {
    padding: 40px 0px;
}

.titreAccueil h3,
h1 {
    text-transform: uppercase;
}

.bannerAccueil {
    position: relative;
    width: 100%;
    height: auto;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: -1;
    background-image: url('https://20km.ch/images/header/banner_20km_2025.webp'), url('https://20km.ch/images/header/banner_20km_2025.jpg');
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

.titleDate {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 180px;
}

.titleDate h1 {
    font-size: 70px !important;
    color: #fff;
    text-align: center;
    letter-spacing: 3px;
}

/*Grid Accueil*/

.btn {
    padding: 12px 20px;
    font-size: 16px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    border-radius: 5px;
    cursor: pointer;
    border: none;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s !important;
    box-sizing: border-box;
    display: inline-block;
    width: auto;
}

.lvl1 {
    background-color: #F3E9A7 !important;
    border: 2px solid #F3E9A7;
    color: #000000 !important;
}

.lvl1:hover {
    background-color: #BFB895 !important;
    border: 2px solid #F3E9A7;
    color: #000000 !important;
}

.lvl1:focus {
    background-color: #ffffff !important;
    border: 2px solid #E3032E;
    color: #E3032E !important;
}

.lvl2 {
    background-color: #F2EFDF !important;
    color: #735A45 !important;
    border: 2px solid #735A45;
}

.lvl2:hover {
    background-color: #735A45 !important;
    color: #F2EFDF !important;

}

.lvl2:focus {
    background-color: #534133 !important;
    border: 2px solid #534133;
    color: #F2EFDF !important;
}

.lvl3 {
    background-color: #F2EFDF !important;
    color: #735A45 !important;
}

.lvl3:hover {
    background-color: #C2BFB2 !important;
    color: #735A45 !important;

}

.lvl3:focus {
    background-color: #534133 !important;
    color: #F2EFDF !important;
}

.lvl4 {
    background-color: transparent;
    color: #735A45;
    border: none;
}

.lvl4:hover {
    color: #000000 !important;
}

.lvl4:focus {
    color: #000000;
}

.lvlFooter {
    background-color: transparent;
    color: #fff !important;
    border: none;
    text-decoration: underline;
}

.siteOrigine{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 60%;
    margin: 0 auto;
    text-align: center;
}

/*Grid Accueil*/

.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    grid-auto-flow: dense;
}

.article-background {
    background-size: cover;
    background-position: center;
    padding: 20px;
    color: white;
    position: relative;
    height: 350px;
    border-radius: 6px;
    display: flex;
    align-items: flex-end;
}

.article-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
    z-index: 1;
    border-radius: 6px;
}

.article-content {
    position: relative;
    z-index: 2;
    color: #fff;
}

.article-content p {
    margin: 0;
}

.article-content h2 {
    color: #fff;
    text-align: start;
    text-transform: none;
    padding-bottom: 10px;
}

.article-content .introtext {
    font-size: 0.95em;
    padding-bottom: 25px;
}

.article-link {
    grid-column: span 1;
}

.article-link.double-col {
    grid-column: span 2;
}


.article-link.triple-col {
    grid-column: span 3;
}


/* 
    ##Device = Laptops, Desktops
    ##Screen = B/w 1025px to 1280px
  */

@media (min-width: 1025px) and (max-width: 1280px) {

    .container {
        padding: 30px 100px;
    }

    footer {
        grid-template-columns: repeat(4, 1fr);
        padding: 20px 100px;
    }

}

/* 
    ##Device = Tablets, Ipads (portrait)
    ##Screen = B/w 768px to 1024px
  */

@media (min-width: 768px) and (max-width: 1024px) {

    .headerBlanc {
        display: none;
    }

    .headerLogo img {
        margin: 10px 0px;
    }

    .container {
        padding: 30px 40px;
    }

    footer {
        grid-template-columns: repeat(4, 1fr);
        padding: 20px 40px;
    }

    .titleDate h1 {
        font-size: 40px !important;
    }

    .textAriane {
        padding-right: 40px;
    }

    .headerLogo {
        padding-left: 40px;
    }

    .footerBlanc{
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        background-color: #fff;
        width: 100%;
        padding: 20px;
    }
    
    .footerSponsor {
        height: 40px;
        max-width: 100%;
        margin: 7px 35px;
    }

    .infomaniak{
        display: none;
    }

    /*Grid Accueil*/

    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .article-link.double-col {
        grid-column: span 1;
    }

    .article-link.triple-col {
        grid-column: span 2;
    }

}

/* 
    ##Device = Tablets, Ipads (landscape)
    ##Screen = B/w 768px to 1024px
  */

@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {

    .headerBlanc {
        display: none;
    }

    .headerLogo img {
        height: 5rem;
        margin: 10px 0px;
    }

    .container {
        padding: 30px 40px;
    }

    footer {
        grid-template-columns: repeat(4, 1fr);
        padding: 20px 40px;
    }

    .titleDate h1 {
        font-size: 55px !important;
    }

    .textAriane {
        padding-right: 40px;
    }

    .headerLogo {
        padding-left: 40px;
    }

    /*Grid Accueil*/

    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .article-link.double-col {
        grid-column: span 1;
    }

    .article-link.triple-col {
        grid-column: span 2;
    }

    .footerBlanc{
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        background-color: #fff;
        width: 100%;
        padding: 20px;
    }
    
    .footerSponsor {
        height: 40px;
        max-width: 100%;
        margin: 7px 35px;
    }

    .infomaniak{
        display: none;
    }

}

/* 
    ##Device = Low Resolution Tablets, Mobiles (Landscape)
    ##Screen = B/w 481px to 767px
  */

@media (min-width: 481px) and (max-width: 767px) {

    .headerBlanc {
        display: none;
    }

    .headerLogo img {
        height: 5rem;
        margin: 10px 0px;
    }

    .container {
        padding: 20px 20px;
    }

    footer {
        grid-template-columns: repeat(1, 1fr);
        padding: 20px 20px;
    }

    .titleDate h1 {
        font-size: 45px !important;
    }

    .textAriane {
        padding-right: 20px;
    }

    .headerLogo {
        padding-left: 20px;
    }

    .footerBlanc{
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        background-color: #fff;
        width: 100%;
        padding: 20px;
    }
    
    .footerSponsor {
        height: 40px;
        max-width: 100%;
        margin: 7px 35px;
    }

    .infomaniak{
        display: none;
    }

    /*Grid Accueil*/

    .articles-background {
        height: auto;
        aspect-ratio: 1/1;
    }

    .articles-grid {
        grid-template-columns: 1fr;
    }

    .article-link.double-col {
        grid-column: span 1;
    }

    .article-link.triple-col {
        grid-column: span 1;
    }

}

/* 
    ##Device = Most of the Smartphones Mobiles (Portrait)
    ##Screen = B/w 320px to 479px
  */

@media (max-width: 480px) {

    .headerBlanc {
        display: none;
    }

    .headerLogo img {
        height: 5rem;
        margin: 10px 0px;
    }

    .container {
        padding: 20px 10px;
    }

    footer {
        grid-template-columns: repeat(1, 1fr);
        padding: 20px 10px;
    }

    .titleDate h1 {
        font-size: 36px !important;
    }

    .textAriane {
        padding-right: 10px;
    }

    .headerLogo {
        padding-left: 10px;
    }

    .footerBlanc{
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        background-color: #fff;
        width: 100%;
        padding: 20px;
    }
    
    .footerSponsor {
        height: 40px;
        max-width: 100%;
        margin: 7px 35px;
    }

    .infomaniak{
        display: none;
    }

    /*Grid Accueil*/

    .articles-background {
        height: auto;
        aspect-ratio: 1/1;
    }

    .articles-grid {
        grid-template-columns: 1fr;
    }

    .article-link.double-col {
        grid-column: span 1;
    }

    .article-link.triple-col {
        grid-column: span 1;
    }

}

/* 1. Conteneur principal */

.headerMenu {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 50px;
}

.headerMenu .nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    position: relative;
    height: 100%;
}

/* 2. Liens du menu */
.nav-links {
    display: flex;
    gap: 1.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-links.active {
    transform: translateY(0);
}

.nav-links li a {
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;

}

/* 3. Burger (caché sur desktop) */
.burger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    z-index: 1001;
}

.burger span {
    width: 25px;
    height: 2px;
    background: #333;
    margin: 3px 0;
    transition: all 0.3s ease;
}

/* 4. Styles pour écrans ≤ 1024px */
@media screen and (max-width: 1024px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        width: 40%;
        height: 100vh;
        background-color: #000;
        color: #fff;
        flex-direction: column;
        justify-content: start;
        align-items: start;
        padding: 100px 30px;
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
        z-index: 1000;
    }

    .nav-links.active {
        transform: translateX(0);
    }

    .burger {
        display: flex;
    }

}

@media screen and (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        width: 80%;
        height: 100vh;
        background-color: #000;
        color: #fff;
        flex-direction: column;
        justify-content: start;
        align-items: start;
        padding: 100px 30px;
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
        z-index: 1000;
    }
    .siteOrigine{
        width: 100%;
    }

    .img-inline{
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 100%;
        gap: 30px;
    }
}

.burger.toggle span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.burger.toggle span:nth-child(2) {
    opacity: 0;
}

.burger.toggle span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.burger.toggle span {
    background-color: #fff;
}

/* empêcher le scroll page lorsque menu mobile est ouvert */
body.nav-open {
    overflow: hidden;
}

/* 1) Quand le corps a la classe nav-open, on floute le contenu */
body.nav-open .headerTop> :not(.headerMenu),
body.nav-open .headerAriane,
body.nav-open main,
body.nav-open footer,
body.nav-open .infomaniak {
    filter: blur(4px);
    transition: filter 0.3s ease-in-out;
    pointer-events: none;
}

.inf-content {
    display: inline-flex;
    width: 100%;
    justify-content: space-between !important;
}


.inf-input.inf-input-text {
    position: relative;
}

.inf-input.inf-input-text input[type="text"] {
    padding: 10px 14px;
    border: 1px solid #000;
    border-radius: 5px;
    font-size: 14pt;
    transition: border-color 0.3s, box-shadow 0.3s;
    margin-right: 10px;
}

.inf-input.inf-input-text input[type="text"]:focus {
    border-color: #007BFF;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.3);
    outline: none;
}

.inf-input.inf-input-text input[type="text"]::placeholder {
    color: #000;
}

.inf-submit input[type="submit"] {
    background-color: #F2EFDF ;
    color: #735A45;
    padding: 12px 12px;
    font-size: 16px;
    font-weight: bold;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    border: 1px solid #F2EFDF;
}

.inf-submit input[type="submit"]:hover {
    background-color: #C2BFB2;
}

.inf-submit input[type="submit"]:focus {
    background-color: #F3E9A7;
}

.img-inline{
    display: inline-flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}