:root{
  --main-color: rgb(22, 37, 24);
  --secondary-color: rgb(58, 66, 57);
  --third-color: rgb(3, 14, 0);
  --compte-color:rgb(204, 195, 187);
}

  html{
  scroll-behavior: smooth;
  }

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
   font-family: "Lexend Exa", sans-serif;
  min-height: 100vh;
  background-color: var(--main-color);
}

h1{
  font-size: 3rem;
  line-height: 1.1;
  color: white;
}

h2{
  font-size: 1.5rem;
  line-height: 1.2;
  color: white;
}

p{
  font-size: 1.2rem;
  line-height: 1.4;
  color: white;
  max-width: 600px;
  margin-bottom: 2rem;
}

#navbar{
  position:fixed;
  transition: top 0.3s ease;
}

nav{
    padding-top:20px;
    padding-bottom:20px;
    background-color: var(--secondary-color);
    /* background: linear-gradient(90deg,rgba(42, 123, 155, 0.2) 0%, rgba(87, 199, 133, 0.2) 50%, rgba(237, 221, 83, 0.2) 100%); */
    justify-content: right;
    width:80%;
    height:8vh;
    z-index: 999;
}

nav ul{
    width: 100%;
    height: 100%;
    list-style: none;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

nav li{
   height: 50px;
   font-size: 1rem;
}

nav a{
    height:100%;
    color: rgb(255, 255, 255);
    display: flex;
    padding: 0 30px;
    align-items: center;
    text-decoration: none;
}

nav a:hover {
    font-weight: Bold;
}

.menu-icon{
    display: none;
}

.lab-logo{
    height: 50px;
    margin-right:10px;
}

.sidebar {
    position: fixed;
    top: 0;
    right: -250px; /* hidden off-screen */
    height: 100vh;
    width: 250px;
    background-color: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(25px);
    box-shadow: -10px 0 10px rgba(0, 0, 0, 0.3);
    display: flex; /* keep flex for content */
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    z-index: 999;
    transition: right 0.4s ease;
}

/* When sidebar is open */
.sidebar.open {
    right: 0;
}

.sidebar li{
    width:100%;
}

.sidebar a{
    width:100%;
}

.home{
  flex-direction: column;
  margin: 1rem;
  background-image: url('../assets/Bune_2.jpg');
  background-size: cover;
  background-position:top right;
  height: calc(100vh - 2rem);
  align-items: center;
}

.text-block{
  position: relative;
  top: 30vh;
  max-width: 800px;
  padding: 4rem;
}

.footer{
  position: relative;
  bottom: 0;
  width: 100%;
  padding: 1rem;
  height: 3rem;
  background-color: var(--secondary-color);
  color: white;
  text-align: center;
  justify-self: baseline;
}

.projects{
  padding: 1rem;
}

.projects-grid{
  position: relative;
  display: grid;
  grid-template-rows: repeat(4, minmax(calc((100vw - 4rem) / 3), 1fr));
  grid-template-columns: repeat(3, minmax(calc((100vw - 4rem) / 6), 1fr));
  grid-auto-flow: row;
  grid-auto-rows:1fr; 
  gap:1rem;
}

.project-card{
  position: relative;
  background-color: var(--secondary-color);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#openfield{
  grid-area: span 1 / span 2 ;
}

#insectimage{
  grid-area: span 2 / span 1 ;
}

#greenutopia{
  grid-area: span 1 / span 2 ;
}

#marginofsilence{
  grid-area: span 2 / span 1 ;
}

#emergences{

  grid-area: span 1 / span 2;
}


.project-pictures-compte{
  background-color: var(--compte-color) ;
  width: 100%;
  padding: 1rem;
  display:grid;
  grid-template-rows: repeat(1, minmax(calc((66vh - 2rem) / 3), 1fr));
  grid-template-columns: repeat(6, minmax(calc((100vw - 2rem) / 7), 1fr));
  grid-auto-flow: row;
  grid-auto-rows: minmax(300px, 1fr);
  gap: 1rem;
}

.compte1{
  background-color: var(--compte-color);
  grid-area: span 1 / span 1 ;
}

.project-card:hover .project-image{
  transform: scale(1.05);
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2);
}

.project-card:hover .project-mito{
  transform: scale(1.05);
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2);
}

.project-image{
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit:cover;
    transition: transform 0.2s;
}

.project-mito{
  background-color:rgb(51, 51, 51);
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit:contain;
    transition: transform 0.2s;
}

.project-emergences{
  background-color: rgb(16, 16, 16);
  width: 100%;
  padding: 1rem;
  display:grid;
  height:66vh;
  grid-template-rows: repeat(2, minmax(calc((66vh - 2rem) / 3), 1fr));
  grid-template-columns: repeat(2, minmax(calc((100vw - 2rem) / 3), 1fr));
  grid-auto-flow: row;
  grid-auto-rows: minmax(300px, auto);
  gap: 0.5rem;

}

.project-link{
  position: absolute;
  width: 100%;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

#futures{
  grid-area: span 1 / span 2  ;
}

#switzerland{

grid-area:span 2 / span 1;

}

.panorama{
  grid-area: span 1 / span 4 ;
}

#maison{
  grid-area: span 1 / span 2  ;
}

#diplome{
  grid-area: span 2 / span 1 ;
}

.caption{
  position: absolute;
  bottom: 0;
  width: 100%;
  backdrop-filter: blur(25px);
  background: rgba(7, 7, 7, 0.5);
  color: white;
  padding: 10px;
  display: flex;
  justify-content: space-between;
  font-size: 1rem;
}

.section-title{
  color: white;
  margin-bottom: 2rem;
}

.aboutme{
  margin:1rem;
}

.aboutme-content{
  list-style: none;
}

.skills-title{
  font-size: 1.5rem;
  color: white;
}

.aboutme-text{
  background-color: var(--secondary-color);
  display:flex;
  flex-direction: row;
  gap:1rem;
}

.about{
  margin:1rem;
  font-size: 1.2rem;
  align-content: center;
}

.aboutme-skills{
  background-color: var(--secondary-color);
  grid-area: span 1 / span 1 ;
  padding:1rem;
  display:flex;
  flex-direction: column;
}

.aboutme-experience{
  background-color: var(--secondary-color);
  grid-area: span 1 / span 1 ;
}

.skill-list-cv{
  position: relative;
  align-self: flex-start;
  display: grid;
  grid-template-rows: repeat(1, minmax(calc((10% - 1rem) / 2), 1fr));
  grid-template-columns: repeat(1, minmax(calc((15% - 2rem) / 4), 1fr));
  gap: .5rem;
  list-style: none;
}

.photo{
  position: relative;
  width:25vw;
  height:33vh;
  object-fit: contain;
  background-color: var(--secondary-color);
}

.pdp{
  width: 100%;
  height: 100%;
  filter: saturate(0);
  object-fit: cover;
}

.project-phones{
  background-color: var(--third-color);
  width: 100%;
  padding: 1rem;
  display:grid;
  grid-template-rows: repeat(2, minmax(calc((66vh - 2rem) / 3), 1fr));
  grid-template-columns: repeat(6, minmax(calc((100vw - 2rem) / 7), 1fr));
  grid-auto-flow: row;
  grid-auto-rows:1fr;
  gap: 1rem;
}

.project-pictures{
  background-color: rgb(16, 16, 16);
  width: 100%;
  padding: 1rem;
  display:grid;
  grid-template-rows: repeat(2, minmax(calc((66vh - 2rem) / 3), 1fr));
  grid-template-columns: repeat(4, minmax(calc((100vw - 2rem) / 5), 1fr));
  grid-auto-flow: row;
  grid-auto-rows: minmax(300px, auto);
  gap: 0.5rem;
}

.project-maison{
  background-color: rgb(16, 16, 16);
  width: 100%;
  padding: 1rem;
  display:grid;
  grid-template-rows: repeat(2, minmax(calc((66vh - 2rem) / 3), 1fr));
  grid-template-columns: repeat(3, minmax(calc((100vw - 2rem) / 4), 1fr));
  grid-auto-flow: row;
  grid-auto-rows: minmax(300px, auto);
  gap: 0.5rem;
}

.project-mito1{
  background-color: rgb(16, 16, 16);
  width: 100%;
  height: 70vh;
  padding: 1rem;
  display:grid;
  grid-template-rows: repeat(2, minmax(calc((66vh - 2rem) / 3), 1fr));
  grid-template-columns: repeat(2, minmax(calc((100vw - 2rem) / 3), 1fr));
  grid-auto-flow: row;
  grid-auto-rows: minmax(300px, auto);
  gap: 0.5rem;
}
  
.picture1{
  grid-area: span 1 / span 2;
}

.picture2{
  grid-area: span 1 / span 1;
  
}

.picture3{
  grid-area: span 1 / span 1;
}

.pictures1{
  background-color: #525252;
  border-radius: 8px;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.project-ygg{
  background-color: rgb(16, 16, 16);
  width: 100%;
  padding: 1rem;
  display:grid;
  grid-template-rows: repeat(2, minmax(calc((66vh - 2rem) / 3), 1fr));
  grid-template-columns: repeat(4, minmax(calc((100vw - 2rem) / 5), 1fr));
  grid-auto-flow: row;
  grid-auto-rows: minmax(300px, auto);
  gap: 0.5rem;
}

#insect{
  background-color: rgb(16, 16, 16);
  width: 100%;
  height: 60vh;
  padding: 1rem;
  display:flex;
  justify-content: center;
  grid-auto-flow: row;
  grid-auto-rows: minmax(300px, auto);
  gap: 1rem;
}

.insect{

  width:100%;
  height: 100%;
  object-fit:scale-down;
  border-radius: 8px;
}

.insect1{
  grid-area:  span 2  / span 1 ;
}
.insect2{
  grid-area:  span 2  / span 1 ;
}
.insect3{
  grid-area:  span 2 / span 1 ;
} 

.pictures{
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.video{
  grid-area:  span 2  / span 2 ;
}

.video-margin{
  grid-area: span 3/ span 4;
}

.yggdrasil1{
  grid-area:  1  / 2 / span 2 / span 2 ;
  /* move at the second part of the grid */

}

.videoYgg{
    grid-area:  span 2  / span 2 ;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.drawings{
  padding: 1rem;
}

.drawings-grid{
  position: relative;
  display: grid;
  grid-template-rows: repeat(1, minmax(calc((25vw - 1rem) / 1), 1fr));
  grid-template-columns: repeat(4, minmax(calc((100vw - 2rem) / 5), 1fr));
  gap:1rem;
}

.drawing-image{
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.drawing-card{
  background-color: rgb(62, 86, 86);
  grid-area: span 2/ span 4;
}



.more-drawings-link{
  margin-top: 1rem;
  font-size: 1.25rem;
  color: white;
  text-decoration: none;
}




/* projects style */

.project-trouble{
  background-color: rgb(16, 16, 16);
  width: 100%;
  padding: 1rem;
  display:grid;
  grid-template-rows: repeat(1, minmax(calc((66vh - 2rem) / 2), 1fr));
  grid-template-columns: repeat(6, minmax(calc((100vw - 2rem) / 7), 1fr));
  grid-auto-flow: row;
  grid-auto-rows: minmax(300px, auto);
  gap: 1rem;

}

.project-text{
  padding: 2rem;
  border-radius: 10px;
  background-color: var(--main-color);
}

.project-header{
  display:flex;
  justify-content: space-between;
  flex-direction: row;
}

.project-year{
  margin-bottom: 1rem;
}

.project-title{
  color: white;
  margin-bottom: 0.2rem;
}

.project-subtitle{
  font-size: 1rem;
  color: white;
  margin-bottom: 1rem;
}

.project-description{
  font-size: 1.25rem;
  line-height: 1.6;
  color: white;
  max-width: 35vw;
}

.trouble{
grid-area:  span 1  / span 1 ;
}

.video-phone{
  grid-area:  1 / 3 / span 2 / span 2 ;
}

.phone1{
  grid-area:  span 2  / span 1 ;
}
.phone2{
  grid-area:  span 2  / span 1 ;
}
.phone3{
  grid-area:  span 2 / span 1 ;
}
.phone4{
  grid-area:  span 2 / span 1 ;
}


.back-button{
  color: white;
  text-decoration: none;
  font-size: 1.25rem;
  display: inline-block;
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  border: 2px solid white;
  border-radius: 8px;
  transition: background-color 0.3s, color 0.3s;
}

.back-button:hover{
  background-color: white;
  color: var(--main-color);
}

.skill-list{
  position: relative;
  align-self: flex-start;
  direction: rtl;
  display: grid;
  grid-template-rows: repeat(1, minmax(20px, 1fr));
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 10px;
  list-style: none;
}

.skill-item{
  background-color: var(--secondary-color);
  color: white;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 0.9rem;
  text-align: center;
}

.contact{
  padding: 1rem;
  text-align: center;
}

.simple-contact-links {
    display: flex;
    backdrop-filter: blur(25px);
    padding:2rem;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2.5rem;
}

/* Individual contact item */
.simple-contact-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    transition: text-shadow 0.3s ease;
}

.simple-contact-item:hover,
.simple-contact-item:focus {
    text-shadow: 0 0 1px #fff, 0 0 1px #fff;
    outline: none;
}

.simple-contact-item:focus-visible {
    outline: 2px solid var(--titles-color);
    outline-offset: 4px;
}

/* Contact icon styling */
.simple-contact-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 0.5rem;
}

/* Contact label text */
.simple-contact-label {
    color: white;
    font-size: var(--font-size-body);
    text-align: center;
}

.cvs{
display:flex;
gap:1rem;


}

.modal {
    display: none; /* Caché par défaut */
    position: fixed;
    z-index: 2000; /* Doit être au-dessus du header */
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.9);
    align-items: center; justify-content: center;
}

.modal-content {
    max-width: 90%;
    max-height: 80%;
    border-radius: 10px;
    animation: zoom 0.3s ease;
}

.close-modal {
    position: absolute;
    top: 20px; right: 35px;
    color: white;
    font-size: 40px;
    cursor: pointer;
}

@keyframes zoom {
    from {transform: scale(0.7); opacity: 0;}
    to {transform: scale(1); opacity: 1;}
}

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

    nav{
    padding-top:20px;
    padding-bottom:20px;
    background-color: var(--secondary-color);
    /* background: linear-gradient(90deg,rgba(42, 123, 155, 0.2) 0%, rgba(87, 199, 133, 0.2) 50%, rgba(237, 221, 83, 0.2) 100%); */
    width:calc(100vw - 2rem);
    height:8vh;
    z-index: 999;
}

}



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

    .hideonmobile{
    display: none;
    }

    .menu-icon{
        display:flex;
    }

    h1{
        line-height: 1.1;
        color: white;
        font-size: clamp(2rem, 8vw, 3rem);
    }


    p{
      font-size: clamp(0.8rem, 8vw, 1.2rem);
      line-height: 1.4;
      color: white;
      max-width: 600px;
      margin-bottom: 2rem;
    }


  nav{
    padding-top:20px;
    padding-bottom:20px;
    background-color: var(--secondary-color);
    /* background: linear-gradient(90deg,rgba(42, 123, 155, 0.2) 0%, rgba(87, 199, 133, 0.2) 50%, rgba(237, 221, 83, 0.2) 100%); */
    justify-content: middle;
    width:15%;
    justify-self: right;
    height:8vh;
    z-index: 999;
}

nav ul{
    width: 100%;
    height: 100%;
    list-style: none;
    display: flex;
    justify-content: center;
    align-items: center;
}


nav li{
   font-size: 1rem;
}

#maison{
  grid-area: span 1 / span 1  ;
}

#diplome{
  grid-area: span 1 / span 1 ;
}

.text-block{
  position: relative;
  top: 30vh;
  max-width: 800px;
  padding: 2rem;
}

.projects-grid{
  position: relative;
  display: grid;
  grid-template-rows: repeat(3, minmax(calc((100vw - 4rem) / 2), 1fr));
  grid-template-columns: repeat(2, minmax(calc((100vw - 4rem) / 6), 1fr));
  grid-auto-flow: row;
  grid-auto-rows:1fr; 
  gap:0.2rem;
}

#openfield{
  grid-area: span 1 / span 2 ;
}

#switzerland{

grid-area:span 1 / span 1;

}

#emergences{

  grid-area: span 1 / span 1;
}

#insectimage{
  grid-area: span 1 / span 1 ;
}

#greenutopia{
  grid-area: span 1 / span 1 ;
}

#marginofsilence{
  grid-area: span 1 / span 1 ;
}

.caption{
  position: absolute;
  bottom: 0;
  width: 100%;
  backdrop-filter: blur(0);
  background: rgba(7, 7, 7, 0);
  color: transparent;
  padding: 10px;
  display: flex;
  justify-content: space-between;
  font-size: 1rem;
}

.photo{
  position: relative;
  width:100%;
  height:33vh;
  object-fit: contain;
  background-color: rgb(56, 56, 56);
}

.aboutme-text{
  background-color: var(--secondary-color);
  display:flex;
  flex-direction: column;
  gap:0;
}

.about{
  margin:1rem;
  align-content: center;
}

.project-pictures{
  background-color: rgb(16, 16, 16);
  width: 100%;
  padding: 0.5rem;
  display:grid;
  grid-template-rows: repeat(3, minmax(calc((66vh - 2rem) / 3), 1fr));
  grid-template-columns: repeat(2, minmax(calc((100vw - 2rem) / 5), 1fr));
  grid-auto-flow: row;
  grid-auto-rows: minmax(300px, auto);
  gap: 0.2rem;
}

.video{
  grid-area:  span 1  / span 2 ;
}

#insect{
  background-color: rgb(16, 16, 16);
  width: 100%;
  height: 40vh;
  padding: 0.5rem;
  display:flex;
  justify-content: space-evenly;
}

.insect1{
  grid-area:  span 1  / span 1 ;
}
.insect2{
  grid-area:  span 1  / span 1 ;
}
.insect3{
  grid-area:  span 1 / span 1 ;
} 

.panorama{
grid-area: span 1 / span 2 ;
}

.project-trouble{
  background-color: rgb(16, 16, 16);
  width: 100%;
  padding: 1rem;
  display:grid;
  grid-template-columns: repeat(2, 1fr); 
  /* Hauteur auto mais avec un minimum pour le look */
  grid-auto-rows: minmax(100px, auto); 
  /* Espacement entre les images */
  gap: 0.5rem;

}

.project-mito1{
  background-color: rgb(16, 16, 16);
  width: 100%;
  padding: 1rem;
  display:grid;
  grid-template-rows: repeat(2, minmax(calc((66vh - 2rem) / 3), 1fr));
  grid-template-columns: repeat(2, minmax(calc((100vw - 2rem) / 3), 1fr));
  grid-auto-flow: row;
  grid-auto-rows: minmax(300px, auto);
  gap: 0.2rem;
}

.skill-list {
  display: grid;
  width: 70%;
  align-content: right;
  grid-template-columns: repeat(2, 1fr); 
  grid-auto-rows: auto; 
  gap: 15px; /* Un peu plus d'espace pour la lisibilité */
  margin-bottom: 1rem;
  list-style: none;
  direction: rtl;
  padding: 0; /* Important pour enlever le décalage par défaut des <ul> */
}

.skill-item{
  background-color: var(--secondary-color);
  color: white;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 0.9rem;
  text-align: center;
}


.project-header{
  display:flex;
  justify-content: space-between;
  flex-direction: row;
}

.project-year{
  margin-bottom: 1rem;
}

.project-title{
  color: white;
  font-size: 2.5rem;
  margin-bottom: 0.2rem;
  margin-top: 1rem;
}

.project-subtitle{
  font-size: 1rem;
  color: white;
  margin-bottom: 1rem;
}

.project-description{
  font-size: 1.25rem;
  line-height: 1.6;
  color: white;
  max-width: 100vw;
}

.project-ygg{
  background-color: rgb(16, 16, 16);
  width: 100%;
  padding: 0.5rem;
  display:flex;
  gap: 0.2rem;
}

.yggdrasil1{
  grid-area:  span 2 / span 2 ;

}

#yggdrasil{

  grid-area: span 2/ span 1;
}

.project-maison{
  background-color: rgb(16, 16, 16);
  width: 100%;
  padding: 1rem;
  display:grid;
  grid-template-rows: repeat(3, minmax(calc((66vh - 2rem) / 4), 1fr));
  grid-template-columns: repeat(2, minmax(calc((100vw - 2rem) / 3), 1fr));
  grid-auto-flow: row;
  grid-auto-rows: minmax(300px, auto);
  gap: 0.2rem;
}

.project-phones{
  background-color: var(--third-color);
  width: 100%;
  padding: 1rem;
  display:grid;
  grid-template-rows: repeat(2, minmax(calc((66vh - 2rem) / 3), 1fr));
  grid-template-columns: repeat(4, minmax(calc((100vw - 2rem) / 7), 1fr));
  grid-auto-flow: row;
  grid-auto-rows:1fr;
  gap: 0.5rem;
}

.video-phone{
  grid-area:  span 1 / span 4 ;
}

.phone1{
  grid-area:  span 1  / span 1 ;
}
.phone2{
  grid-area:  span 1  / span 1 ;
}
.phone3{
  grid-area:  span 1 / span 1 ;
}
.phone4{
  grid-area:  span 1 / span 1 ;
}

.project-pictures-compte{
  background-color: var(--compte-color) ;
  width: 100%;
  padding: 1rem;
  display:grid;
  grid-template-rows: repeat(1, minmax(calc((10vh - 2rem) / 2), 1fr));
  grid-template-columns: repeat(2, minmax(calc((100vw - 2rem) / 3), 1fr));
  gap: 0rem;
}

.back-button{
  color: white;
  text-decoration: none;
  font-size: 1rem;
  display: inline-block;
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  border: 2px solid white;
  border-radius: 8px;
  transition: background-color 0.3s, color 0.3s;
}

  
  } 

