:root{
    --coul : #333;
    --coul_bk : #FFF;
    --coulActif : var(--coul);
    --coulBtn : red;
};


html{
      width: 100%;
      height: 100%;
}
body {
    margin: 0;
    padding: 0px;
    color: var(--coul);
    background-color: var(--coul_bk);
    width: 100%;
    height: 100%;
    font-family: "Space Grotesk", sans-serif;
    font-optical-sizing: auto;
    font-weight: 500;
    font-style: normal;
    font-size: 18px;
    min-height: 100vh;
}

img, video {
  max-width: 100%;
}
.space-grotesk-thin {
  font-family: "Space Grotesk", sans-serif;
  font-optical-sizing: auto;
  font-weight: 300;
  font-style: normal;
}

.space-grotesk-light {
  font-family: "Space Grotesk", sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
}

.space-grotesk-regular {
    font-family: "Space Grotesk", sans-serif;
    font-optical-sizing: auto;
    font-weight: 500;
    font-style: normal;
}

.space-grotesk-bold {
    font-family: "Space Grotesk", sans-serif;
    font-optical-sizing: auto;
    font-weight: 600;
    font-style: normal;
}

.space-grotesk-black {
    font-family: "Space Grotesk", sans-serif;
    font-optical-sizing: auto;
    font-weight: 700;
    font-style: normal;
  }




/* Affiche "liste" au lieu de "li" au survol */

.btn_deroul{
    --maxw : 200px;
    text-decoration: none; /* Retire le soulignement */
    color: inherit;
    display: inline-block;
    padding: 13px 15px;/* Espace intérieur */
    border: 3px solid var(--coulBtn); 
    color: var(--coulBtn); 
    border-radius: 50rem; /* Coins arrondis */
    background-color: var(--coul_bk); /* Couleur de fond */
    font-size: 2rem;
    font-weight: 450;
    line-height: 1;
    text-align: left; /* Centre le texte si plusieurs lignes */
    align-items: center;
    position: relative;
    pointer-events: none;
    user-select: none;
    /*min-width: 71px;*/
    /*text-align: center;*/
}

.btn_deroul:hover,
.btn_deroul.active{
    /*--coulBtn : var(--coulActif);*/

}
.btn_deroul.medium{
    font-size: 1.4rem;
}
.btn_deroul.small{
    font-size: 1.25rem;
    padding: 7px 7px;

}
.btn_deroul span{
    display: inline-block;
    padding: 0;
    overflow: hidden;
    margin: 0;
    line-height: 1;
    padding: 2px 0;
}

.btn_deroul span.material{
    min-width: 36px;
    text-align: center;
}
.btn_deroul .end {
    display: none;
    transition: all .2s;
}

.btn_deroul.on:not(.active) .end,
.btn_deroul:not(.active):hover .end{
    width:  var(--maxw) !important;
    max-width: var(--maxw);
}

.btn_deroul.active .end {
    display: inline-block;
    width:  auto;
    max-width: auto;
}

main{
  max-width: 100%;
  margin: 20px;
}

footer{
    margin: 20px;
    text-align: right;
    position: sticky;
    top: 100vh;
}

header {
    position: sticky;
    top: -200px;
    left: 10px;
    padding: 10px;
    z-index: 1000;
    transition: 500ms;
    font-family: "Space Grotesk", sans-serif;
    font-optical-sizing: auto;
    font-weight: 500;
    font-style: normal;
    pointer-events: all;
}

header nav{
    margin: 10px 0;
    display: flex;
    gap: 10px;
    flex-flow: row wrap;
}

section{  
  position: relative;
  width: 100%;

}

div.contenu{
  margin:80px auto 50px ;
  max-width: 700px;
}

figure{
  width: 100%;
  margin: 0;
}

figure.gallery{
  margin: 0;
  display: flex;
  justify-content: space-between;
}

figure.gallery img{
  width: 32.8%;
  object-fit: cover;
}
div.fancybox-content{
  border: 3px solid var(--coul);
  border-radius: 35px;
  padding:30px;
  width: 800px;
  margin-top: 60px;
  margin-bottom: 60px;
}
.fancybox-content>*:first-child{
  margin-top: 0;
}

/* boutons */

button.btnBig {
    padding: 0.75rem 1rem; /* Espace intérieur */
    border: 3px solid #333; /* Bordure autour de chaque élément */
    border-radius: 50rem; /* Coins arrondis */
    background-color: var(--coul_bk); /* Couleur de fond */
    min-width: 2.6rem;  /* Largeur minimale du cercle */
    min-height: 2.6rem; /* Hauteur minimale du cercle */
    text-align: center; /* Centre le texte si plusieurs lignes */
    align-items: center;
    
}
button.btnBig span{
  font-family: "Space Grotesk", sans-serif;
  font-optical-sizing: auto;
  font-weight: 500;
  font-style: normal;
  font-size: 2rem;
}

button{
  padding: 0.75rem 1rem;
  border: 2px solid #333;
  border-radius: 50rem;
  background-color: var(--coul_bk);
  min-width: 2.6rem;
  min-height: 2.6rem;
  text-align: center;
  align-items: center;
  cursor: pointer;
  font-size: 18px;
  font-weight: 600;
  margin: auto;
}

div.voir_plus{
  text-align: center;
}
.acces_reserve form{
  display: none;
}

.acces_reserve.on form{
  display: inline-block;
  vertical-align: 5px;
}
.acces_reserve.on .end{
  display: none !important;
}
.acces_reserve form input{
  padding: 0;
  border: none;
  background-color: transparent;
  font-family: "Space Grotesk", serif;
  font-size: 2rem;
  color: var(--coulBtn);
  font-weight: 450;
  font-size: inherit;
  outline: none
}

.acces_reserve form input.input{
  width: 150px;
}

.acces_reserve form input.input:-webkit-autofill,
.acces_reserve form input.input:-webkit-autofill:hover,
.acces_reserve form input.input:-webkit-autofill:focus,
.acces_reserve form input.input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px white inset !important;
  box-shadow: 0 0 0 1000px white inset !important;
  -webkit-text-fill-color: #000 !important;
}


/* ---- textes ---- */

h1{
  font-family: "Space Grotesk", sans-serif;
  font-optical-sizing: auto;
  font-weight: 600;
  font-style: normal;
  font-size: 32px;
}
h2{
  font-family: "Space Grotesk", sans-serif;
  font-optical-sizing: auto;
  font-weight: 600;
  font-style: normal;
  font-size: 26px;
}
    
a, p a, h2 a, h3 a, h4 a,
.text-content a {
    color: var(--cool); /* Couleur du texte */
    /*text-decoration: none; */
    transition: color 0.3s ease; /* Transition pour l'effet */
    font-size: inherit;
}
p a:hover, h2 a:hover, h3 a:hover, h4 a:hover,
.text-content a:hover {
    color:var(--cool); /* Change de couleur au survol */
     text-decoration: underline; 
}


.material{
  font-family: 'Material Icons'
}

.btn {
  padding: 0.75rem 0.75rem;
  border: 3px solid var(--coulBtn);
  color: var(--coulBtn);
  border-radius: 50rem;
  background-color: var(--coul_bk);
  min-width: 2.6rem;
  min-height: 2.6rem;
  text-align: center;
  align-items: center;
  font-size: 2rem;
  justify-content: center;
}

#search_btn{
  display: inline-block;
  line-height: 1;
  cursor: pointer;
  user-select: none;
/*position: fixed;
  top: 100px;
  right: 30px;*/
}
#search_btn.active{
  padding: 0.75rem 0.75rem;
  cursor:default;
  display: inline-block;
}

#mirror {
  position: absolute;
  visibility: hidden;
/*  white-space: pre;
*/  font-size: 2rem;
  font-weight: normal;
  padding: 0;
}


#search_btn .clear{
  display: none;
}

#search_btn .material{
  display: inline-block;
transform: translate(0px, 4px);
}
#search_btn input{
  max-width: 0px;
  padding: 0;
  border: none;
  outline: none;
  font-size: 2rem;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 500;
  display: inline-block;
  transition: min-width 200ms;
}

#search_btn.active input {
  max-width: none;
  min-width: 130px;
  padding-left:.75rem;
}
#search_btn.active .material{
  /*display: none;*/
}
/* ---- isotope ---- */

.grid {
}

/* clear fix */
.grid:after {
  content: '';
  display: block;
  clear: both;
}

/* ---- .grid-item ---- */

.grid-sizer,
.grid-item {
  width: 33%;
}

.grid-item {
  float: left;
}

.page-projets{
  --nbrCol : 3;
  --gap : 0px;
}

#projets .grid-sizer,
#projets .grid-item {
  width: 33.333%;
  width: calc(
    (100% - (var(--gap) * (var(--nbrCol) - 1)))
    / var(--nbrCol)
  );
  margin-bottom: var(--gap);
}

.page-archive{
  --nbrCol : 3;
  --gap : 20px;
}
.page-archive .grid-sizer,
.page-archive .grid-item{
  /*width: calc((100% - 40px)/3);*/
  /*display: none;*/
  width: calc(
    (100% - (var(--gap) * (var(--nbrCol) - 1)))
    / var(--nbrCol)
  );
  margin-bottom: var(--gap);

  /*box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);*/
}
.page-archive .grid-item.on{
  /*display: block*/
}
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    color: var(--coul_bk);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    opacity: 0; /* Initialement invisible */
    transition: opacity 0.3s ease; /* Effet de transition lors du survol */
    padding: 20px;
    box-sizing: border-box;
    overflow: hidden;
    user-select: none;
}

.overlay div{max-height: 100%;}


/*--- filtres (page projets, archive) *---/

/* Bouton de filtre */
.filter-button {
    position: absolute;
    right: 0px;
    top: 0px;
    padding: 10px 15px;
    border: 1px solid #000;
    border-radius: 20px;
    background-color: rgb(255, 255, 255);
    font-size: 1em;
    cursor: pointer;
    z-index: 1001; /* Assure que le bouton est au-dessus des images */

}

.filter-button .sousmenu{
  display: none;
  text-align: left;
}
.filter-button:hover .sousmenu{
  display: block;
}
.filter-button:hover .titre{
  display: none;
}
.filter-button .sousmenu a{
  display: block;
}
.filter-button .sousmenu a.actif{
  font-weight: bold;
}



#modal_mdp{
  border: 1px solid #000;
  background-color: black;
  color: white;
  border-radius: 5px;
  width: 300px;
  padding: 20px;
  text-align: center;
  font-size: 18px;
}


input.btn, 
button.btn{
  padding: 10px 15px;
  border: 1px solid black;
  border-radius: 30px;
  background: white;
  cursor: pointer;
  font-size: 16px;
}

.prev_next_article{
  display: flex;
  justify-content: space-between;
  margin: 20px;
  padding-bottom: 20px;
}


/* ---- page Projets ---- */

#projets .filter-button{
  position: fixed;
  top: 100px;
  right: 30px;
}


/* Titre en haut de l'overlay */
#projets .titre-overlay {
  font-weight: bold;
  margin: 0;
  align-items: self-start;
  justify-content: flex-start;
  text-align: left;
  color: inherit;
  font-size: 24px; /* Taille du texte */
  font-family: "Space Grotesk", sans-serif;
  display :flex;
  position:sticky;
  width: 330%;
  max-width: 80%;
  text-overflow: ellipsis; 
  margin-bottom: 10px;
  line-height: 1.1;
}

/* Texte explicatif en bas de l'overlay */
#projets .texte-overlay {
  font-weight: bold;
  margin: 0;
  align-items: self-start;
  justify-content: left;
  text-align: left;
  color: inherit;
  font-size: 16px; /* Taille du texte */
  font-family: "Space Grotesk", sans-serif;
  display :flex;
  position:sticky;
  width: 330%;
  max-width: 80%;
  overflow: hidden; /* Limite le texte au cadre */
}

#projets .image-container:hover .overlay {
  opacity: 1; /* Affiche l'overlay quand on survole l'image */
}

#projets .image-container img {
  width: 100%; /* L'image prend toute la largeur de son parent */
  height: auto; /* Garde les proportions de l'image */
  display: block; /* Supprime les marges invisibles sous les images */
}

 /* ---- page home ---- */



body.page-home{
min-height: 100vh;
  display: flex;
  flex-flow: column;
  justify-content: center;
}

section.page_home{
  max-width: 700px;
  margin: auto;
}
section.page_home .button-container{
  text-align: center;
}

/* page Section (graphisme/animation) */

section.section{
    max-width: 700px;
  margin: auto;
}
/* ---- page Projet ---- */

.tmp-projet main .container {
  display: flex;
  width: 100%;
  min-height: calc(100vh - 90px); /* Hauteur totale moins l'en-tete */
}
.tmp-projet main .container video{
  width: 100%;

}
.tmp-projet main .left-section {
  width: 33%;
  padding-right: 20px;
  /*background-color: #f5f5f5;*/
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  text-align: left;
  position: sticky;
  top: 0; 
  height: fit-content; 
}

/* Section images */
.tmp-projet main .right-section {
  width: 66%;
  display: flex;
  flex-direction: column; /* Empile les images en colonne */
  align-items: center;
  justify-content: left;
}

/* Style du texte */
.tmp-projet main .text-content {
  max-width: 80%;
}

/* Ajuster images */
.tmp-projet main .right-section img {
  width: 100%;
  height: auto; /* adapter l'hauteur de l'image */
  object-fit: cover;
  margin-bottom: 0 px; /* Espace entre les images */
}

/* ---- page Actu (nouvelle) ---- */

section#actualites{
  margin-bottom: 100px;
}
article.actu{
  width: 500px;
  height: 400px;
  max-width: 100%;
  margin: 50px auto;
  transition: all .3s;
  cursor: pointer;
}
article.actu.off{
  transform: scale(0);
  height: 0;
  margin: 0px auto;

  visibility: hidden;
  opacity: 0;
}

article.actu .image_cover{
   width: 100%;
  height: 350px;
  background-size: cover;
}

nav.filter_actu{
  width: 100vw;
  text-align: center;
  position: fixed;
  bottom: 15px;
}

section#actualites.prespective{
 width: 100%;
  height: 100vh;
  perspective: 1000px;
  /*overflow: hidden;*/
}
section#actualites.prespective article.actu {
  position: absolute;
  transform-style: preserve-3d;
  transition: opacity .2s;
  }
/* ---- page Évènements (ancienne) ---- */


main#evenements{margin-top: 0px;}

body.tmp-evenements {
  width: 100vw;
  overflow-x: hidden;
}
  #evenements .image-cloud {
  position: relative;
  width: 100vw;
  height: 100vh;
  perspective: 1000px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  }

  #evenements .image-container {
  position: absolute;
  transform-style: preserve-3d;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: opacity .2s;
  }
  #evenements .image-container.hide{
  opacity: .1;
  }

  #evenements .image-container>.container {
  transition: transform .5s;
  transform: scale(1);
  }

  #evenements .image-container:hover{
  z-index: 10000;
  }

  #evenements .image-container:hover>.container {
  transform: scale(1.2);
  }

  #evenements .image-item {
  width: 150px;
  height: 100px;
  background-size: cover;
  background-position: center;
  /*border: 2px solid var(--coul_bk);*/
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  display: flex;
  align-items: flex-end;
  transition: z-index 0.3s ease; /* Transition fluide pour le z-index */
  position: relative; /* Nécessaire pour que le z-index fonctionne */
  }

  #evenements .image-item.hovered {
  z-index: 10000000; /* Applique un z-index plus élevé lors du survol */
  }

  #evenements  .caption {
  color: black;
  font-size: 12px;
  text-align: center;
  padding: 5px;
  width: 100%; /* S'assure que la légende fait la même largeur que l'image */
  box-sizing: border-box;
  background: rgba(255, 255, 255, 1);
  overflow: hidden; /* Évite que le texte déborde */
  white-space: nowrap; /* Empêche le texte de passer à la ligne */
  text-overflow: ellipsis; /* Ajoute des points de suspension si le texte est trop long */
  }


  #evenements .image-item.back {
  pointer-events: none;
  }


  #evenements .filter-menu {
  position: fixed;
  bottom: 20px;
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 10px;
  }

  #evenements .filter-btn {
  padding: 10px 15px;
  border: 1px solid black;
  border-radius: 30px;
  background: white;
  cursor: pointer;
  font-size: 16px;
  }

  #evenements .filter-btn.active {
  font-weight: bold;
  border: solid black 2px;
  }


/* ---- page Archive ---- */



#archive section{margin: 30px 0; min-height: 100px;}


#archive .card {
    position: relative;
    overflow: hidden;
}

#archive .card img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 16/9;
}

#archive .card div.intro {
  margin:10px 0;
  height: 122px;
}

#archive .card h3 {
  margin:10px 0 5px;
  line-height: 18px;
  font-size: 18px;
}

#archive .card p {
  font-size: 16px;
  line-height: 18px;
   margin:0;
}

/* Style pour l'effet de survol */
#archive .overlay {
    position: absolute;
    height: calc(100% - 45px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
    line-height: 1;
    text-align: center; /* Centre le texte horizontalement */
}

/* Afficher le texte de l'overlay au survol */
#archive .card:hover .overlay {
    opacity: 1;
}

/* Centrer le texte sous l'image */
#archive .card-title {
    text-align: center;
    padding: 10px;
    font-size: 1em;
    color: #333;
    height: 25px;
}


/* Page Search */

span.rubrique{
  text-decoration: none;
  color: var(--coul);
}
span.rubrique+ a div.texte h2{
  margin-top:0;
}







/* Responsive adjustments for smaller screens */

    @media (min-width: 1024px) {
      .page-archive{
          --nbrCol: 5;
          --gap: 20px;
      }
    }

    @media (min-width: 1280px) {
      .page-archive{
          --nbrCol: 6;
          --gap: 20px;
      }
    }
    @media (max-width: 600px) {
      .btn_deroul .end {
        display: none;
        transition: all .2s;
        width: auto !important;
      }
      header nav {
        align-items: start;
      }
      #search_btn.active {
        padding: 0.68rem 0.75rem;
        font-size: 1.5rem;
      }
      .btn {
        padding: 0.68rem 0.75rem;
        min-width: 2rem;
        min-height: auto;
        font-size: 1.5rem;
      }
      #search_btn input,
       #mirror {
        font-size: 1.5rem;
      }
      .btn_deroul {
        padding: 11px 12px 10px;
        font-size: 1.5rem;
      }
      .page-archive{
          --nbrCol: 2;
          --gap: 20px;
      } 
        .page-projets{
        --nbrCol : 2;
        --gap : 0px;
      }
      .tmp-projet main .container{
        flex-flow: column;
      }
      .tmp-projet main .left-section,
      .tmp-projet main .right-section{
        position: relative;
        width: 100%;
      }
      .tmp-projet main .text-content{
        max-width: 100%;
      }

   }

    @media (max-width: 480px) {
      .page-archive{
          --nbrCol: 1;
          --gap: 20px;
      } 
     .page-projets{
        --nbrCol : 1;
        --gap : 0px;
      }
    }
