* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
/*header*/
:root {
  --bg: rgba(224, 221, 229, 0.6);
  --text: #fff;
  --accent: #f2a33c;
}

header {
  position: fixed;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0px 16px;
  background: var(--bg);
  color: var(--text);
}

#logo{
    height: 75px;
}

.a_menu{
    text-align: center;
    padding: 5px;
    margin-right: 20px;
    background-color: rgba(217,217,217,0.6); 
}
.a_menu:hover{
  background-color:  #b2b0b4;
}

/* Checkbox invisible mais accessible */
#menu-toggle {
opacity: 0;

}

/* menu burger */
.burger {
  width: 92px;
  height: 30px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
 /* -webkit-tap-highlight-color: transparent;*/
  z-index: 30;
  color: black;
}

.burger .line {
  width: 24px;
  height: 3px;
  background: var(--text);
  border-radius: 2px;
  position: relative;
  transition: transform 0.35s ease, opacity 0.25s ease;
}

.burger .line::before,
.burger .line::after {
  content: "";
  position: absolute;
  left: 0;
  width: 24px;
  height: 3px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.35s ease, top 0.35s ease, bottom 0.35s ease, opacity 0.25s ease;
}

.burger .line::before { top: -8px; }
.burger .line::after  { bottom: -8px; }

/*navigation mobile*/
nav {
  position: fixed;
  top: 0;
  right: 0;
  height: 300px;
  width: 240px;
  background-color:#E0DDE5;
  transform: translateX(100%);
  transition: transform 0.35s ease;
  flex-direction: column;
  display: flex;
  padding-top: 80px;
  gap: 20px;
  padding-left: 24px;
  z-index: 20;
}

nav a {
  color: black;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.05rem;
}

/*Menu ouvert*/
#menu-toggle:checked ~ nav {
  transform: translateX(0);
}

/* Animation burger */
#menu-toggle:checked + label .line {
  opacity: 0;
}


/* --- VERSION DESKTOP --- */
@media (min-width: 1024px) {
  .burger {
    display: none;
  }

  nav {
    position: static;
    transform: none;
    background: none;
    flex-direction: row;
    align-items: center;
    padding: 0;
    gap: 18px;
    height: auto;
    width: auto;
  }

  nav a {
    font-size: 1rem;
  }
}

/*body*/
body {
    font-family: "montserrat", sans-serif;
    max-width: 100%;
    margin: 0 auto;
    background-color: #fff;
}

/*text*/
h1 {
    font-family: "chloe", sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: 28px;
}

h2 {
    font-weight: 700;
    font-size: 18px;
}

h3 {
    font-weight: 400;
    font-size: 12px;
}

/* ============ SECTION 1 ============ */
#section1 {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    background: url(image/stade-vide-pendant-la-journee.jpg) center/cover no-repeat;
    padding: 20px;
}

#résaux {
    background-color: #d9d9d9;
    width: 100%;
    max-width: 550px;
    text-align: center;
    border-radius: 20px;
    padding: 10px;
}

#aligne-résaux {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

i{
    font-size: 20px;
    color: black;
}


/* ============ SECTION 2 ============ */
#section2 {
    background-color: #d9d9d9;
    padding: 25px;
    text-align: justify;
}

/* ============ SECTION 3 ============ */
#section3 {
    padding: 25px;
    background-color: white;
}

.Competitions {
    display: flex;
    
    margin-bottom: 15px;
    border-radius: 10px;
    overflow: hidden;    
}

.Competitions div {
    flex : 1;
}

#img-competition1,
#img-competition2,
#img-competition3,
#img-competition4 {
    height: 180px;
    background-size: cover;
    background-position: center;
}

#img-competition1 {
    background-image: url(image/start.jpg);
    margin-right: 5px;
}
#img-competition2 {
    background-image: url(image/hauteur.jpg);
    margin-right: 5px;
}
#img-competition3 {
    background-image: url(image/longueur.jpg);
    margin-right: 5px;
}
#img-competition4 {
    background-image: url(image/podium.jpg);
    margin-right: 5px;
}

.h2compet {
    font-family: "arial-rounded-mt-pro", sans-serif;
    font-size: 14px;
    margin: 8px 0 4px 0;
}

.h1compet {
    font-size: 12px;
    margin-bottom: 8px;
}

/* ============ SECTION 4 ============ */
#section4 {

    padding: 25px;
    background-color: #d7d7c0;
    text-align: center;
    
}

.sponsors img {
    width: 100%;
    max-width: 300px;
    border-radius: 10px;
    display: block;
    margin: auto;
}
/* ============ SPONSORS ============ */
.carousel,#carousel1,#carousel2,#carousel3{
    display: flex;
    justify-content: center;
    align-items: center;
}

  #carousel1,#carousel3 {
    position: relative;
    width: 200px;
    height: 120px;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
  }
    #carousel2 {
    position: relative;
    width: 300px;
    height: 200px;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
  }


/*J'ai utiliser position: absolute  pour les quatres ID en dessous car je n'ai pas trouver d'autres solutions*/
    #carousel1 img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1s ease-in-out;
  }

    #carousel2 img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1s ease-in-out;
  }

    #carousel3 img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1s ease-in-out;
  }

  .carousel img.active {
    opacity: 1;
  }

    #carousel1 img.active {
    opacity: 1;
  }

    #carousel2 img.active {
    opacity: 1;
  }

    #carousel3 img.active {
    opacity: 1;
  }

/* ============ FOOTER ============ */
footer {
  color: white;
    background-color: rgb(75, 75, 75);
    height: 70px;
    text-align: center;
    padding-top: 20px;
}

/* ============ MEDIA QUERIES ============ */



/* DESKTOP */
@media (min-width: 1024px) {
  body {
    max-width: 100%;

  }

  h1 {
    font-size: 50px;
  }

  h2 {
    font-size: 22px;
  }

  #résaux{
    width: 80vh;
    height: 10vh;
  }
  
  #résaux h2{
    font-size: 20px;
  }

  #section2,#section3{
    background-color: #e0dde5;
  }
  #color-ordi{
    background-color: #b2b0b4;
  }

  header a{
    border-radius: 10px;
  }

  #section1 {
    min-height: 100vh;
  }
  #section1 h3{
    background-color: #D9D9D9;
  }

  #aligne-résaux {
    gap: 15px;
  }

  #section2{
    min-height: 70vh;
    padding: 100px;
  }

   #section2 h1 {
    font-size: 50px;
  }

 #section2 h2 {
    font-size: 30px;
  }

  #s2rg{
  background-color: #cfcdd3;

  padding: 100px;
  border-radius: 50px;
}

   #section3{
    min-height: 250vh;
  }

    #section3 h2{
    font-size: 40px;
  }

    #section3 h3{
    font-size: 30px;
  }

  .Competitions{
    min-height: 55vh;
  }

  #img-competition1,
  #img-competition2,
  #img-competition3,
  #img-competition4 {
    min-height: 60vh;
  }
 #background-competition{
    padding-top: 50px;
    background-color: #cfcdd3;
    border-radius: 50px;
 }
 #section4{
    background-color: #cfcdd3;
 }
}
