* {
  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: #D9D9D9;
}

/*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: black;
  background-color: #D9D9D9;
  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;
 }
}



/* ============ Page inscription ============ */
#body {
    font-family: "montserrat", sans-serif;
    max-width: 100%;
    margin:auto;
    background-color: #E0DDE5;
}
#couleur-fond-inscription{
  background-color: #CFCDD3;
  border-radius: 30px;
  margin: 0 10px;

}
#section-info-personnel{
  padding-top: 100px;
  margin:0 50px ;
}
#organis-n-p-e {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.champ.demi {
    grid-column: span 1;
}

.champ.full {
    grid-column: 1 / 3;
}

textarea {
    width: 100%;
    height: 30px;
}

#bloc-boutons {
    background: #bfbfbf;
    padding: 15px;
    border-radius: 7.5px;
    width: 190px; 
    margin: 15px;
    display: flex;
    flex-direction: column;
    gap: 7.5px;
}


#bloc-boutons button {
    background: #e0e0e0; 
    border: none;
    border-radius: 15px; 
    padding: 7.5px 15px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
}
.contenu {
  max-height: 0;     
  overflow: hidden;
  margin: 10px 0;
  padding: 0 15px; 
  border-radius: 7.5px;
}

.contenu.show {
  max-height: 350px;
  padding: 15px;
}
.grid-carré-cocher {
  display: grid;
  grid-template-columns: 1fr 1fr; 
  gap: 10px 30px;
  max-width: 400px;
}
#texte-entrainement{
  text-align: center;
  margin-top: 20px;
  margin-bottom: 20px;
}
#bouton-entrainement{
  background-color: #f0f0f0; 
  padding: 10px;
  border-radius: 5px;
}
.grid-checkboxes label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  cursor: pointer;
}
textarea{
  background-color: #D9D9D9;
}

 /* Style du bouton */
.btn-envoyer {
  color: black;
  margin-top: 10px;
  padding: 12px 20px;
  border: none;
  border-radius: 5px;
  font-size: 16px;
}

#footer-qui-veux-pas-fonctionner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%; 
}

@media screen and (min-width: 1024px) {
  nav {
    display: flex;
    gap: 30px;
  }

  .a_menu {
    text-decoration: none;
    font-weight: bold;
    color: black;
    font-size: 16px;
  }

  /* Cacher le burger en desktop */
  #menu-toggle, .burger {
    display: none;
  }
    #section-info-personnel {
    max-width: 900px;
    margin: 0 auto;
    padding-top: 150px;
  }

  #organis-n-p-e {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }

  textarea {
    height: 40px;
    font-size: 16px;
  }
  #bloc-boutons {
    flex-direction: row;
    justify-content: center;
    width: auto;
    margin: 30px auto;
  }

  #bloc-boutons button {
    font-size: 16px;
    padding: 10px 30px;
  }
  .contenu {
    max-width: 800px;
    margin: 20px auto;
  }

  .grid-carré-cocher {
    grid-template-columns: repeat(3, 1fr);
    max-width: 600px;
  }
}



/*================ page competition ================*/
#titre1-competition{
  padding-top: 200px;
}
.h1-competition{
text-align: center;
margin-bottom: 50px;
padding-top: 50px;
}
#section-liens{
  display: flex;
  align-items: center;
  width: 100%;
}

.btn-sous-titre-competition{
  text-align: center; 
  margin: auto;

}

.btn-sous-titre-competition a{
  display: inline-block;
  padding: 10px 10px;
  color: white;
  background-color: #593859;
  border-radius: 10px;
  margin: 2px;
}

#section-galerie{
  margin-left: 2%;
}

/*images galeries*/
#img-champ-suisse1{
  background-image: url(image/img-galerie/start-haie.jpg);
}
#img-champ-suisse2{
  background-image: url(image/img-galerie/beaucoup-de-metre.jpg);
}
#img-champ-suisse3{
  background-image: url(image/img-galerie/start-400m.jpg);
}
#img-champ-suisse4{
  background-image: url(image/img-galerie/3000-stiple.jpg);
}

#img-champ-romand1{
  background-image: url(image/img-galerie/400mhaie.jpg);
}
#img-champ-romand2{
  background-image: url(image/img-galerie/noir-et-blanc.jpg);
}
#img-champ-romand3{
  background-image: url(image/img-galerie/start-relai.jpg);
}
#img-champ-romand4{
  background-image: url(image/img-galerie/mesure-longueur.jpg);
}

#img-champ-vaudois1{
  background-image: url(image/img-galerie/avant-start-relai.jpg);
}
#img-champ-vaudois2{
  background-image: url(image/img-galerie/jonathan-chng-HgoKvtKpyHA-unsplash.jpg);
}

#img-champ-vaudois3{
  background-image: url(image/img-galerie/relais-long.jpg);
}

#img-champ-vaudois4{
  background-image: url(image/img-galerie/course-pied.jpg);
}
.grid-galerie-photos div {
  margin-top: 20px;
  background-color: #ccc; /* couleur de fond par défaut */
  background-size: cover; /* l’image couvre tout le carré */
  background-position: center; /* centrage de l’image */
  height: 160px;
  width: 200px;
  border-radius: 20px;
}

.grid-galerie-photos {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 2 colonnes */
  grid-template-rows: repeat(2, 200px);  /* 2 lignes avec hauteur fixe */
  gap: 10px;
}

#section-habits-club{
  margin-left: 1%;
  min-height: 950px;
}
#couleur-fond-habits{
  background-color: #E0DDE5;
}
.habits-club div{
  height: 160px;
  width: 200px;
  background-size: cover;
}
#img-short{
  background-image: url(image/img-maillots/short.jpg);
}
#img-pantalon{
 background-image: url(image/img-maillots/pantalon.jpg);
}
#img-t-shirt{
 background-image: url(image/img-maillots/t-shirt.jpg);
}
#img-pull{
 background-image: url(image/img-maillots/pull.jpg);
}
#img-liquette{
 background-image: url(image/img-maillots/liquette.jpg);
}
#img-braciere{
 background-image: url(image/img-maillots/braciere.jpg);
}
#arrengement-habits-club {
  margin-top: 50px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  row-gap: 40px;  
}

.habits-club {
  width: 48%;
}

.habits-club h2{
  text-align: center;
}
.habits-club div{
  border-radius: 20px;
}

@media screen and (min-width: 1024px) {
  nav {
    display: flex;
    gap: 30px;
  }

  .a_menu {
    text-decoration: none;
    font-weight: bold;
    color: black;
    font-size: 18px;
  }

  /* Cacher le burger en desktop */
  #menu-toggle, .burger {
    display: none;
  }

  /* Section liens */
  #section-liens {
    justify-content: center;
    gap: 40px;
    margin: 40px 0;
  }

  .btn-sous-titre-competition a {
    font-size: 16px;
    padding: 12px 20px;
  }

  /* Galerie photos : reste en 2 colonnes */
  #section-galerie {
    margin: 0 auto;
    max-width: 900px;
  }

  .grid-galerie-photos {
    grid-template-columns: repeat(2, 1fr); 
    gap: 20px;
    justify-items: center;
  }

  .grid-galerie-photos div {
    height: 160px;
    width: 260px;
    background-size: cover;
  }

  /* Section habits club : reste en 2 colonnes */
  #section-habits-club {
    margin: 50px auto;
    max-width: 900px;
  }

  #arrengement-habits-club {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 colonnes fixes */
    gap: 40px;
    justify-items: center;
  }

  .habits-club {
    width: 60%; /* chaque bloc occupe sa colonne */
  }

  .habits-club div {
    height: 220px;
    width: 260px;
  }
}
