@import url('https://fonts.googleapis.com/css2?family=Jost:ital,wght@0,100..900;1,100..900&display=swap');

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

body {
  background-color: #f6f3f3;
  font-family: "Jost", sans-serif;
  font-optical-sizing: auto;
  font-style: normal;
  font-size: 1.1rem;
  font-weight: 400;
}

html, body {
  overflow-x: hidden;
  width: 100%;
}

a { /* style des liens */
  text-decoration: none;
  color: black;
}

button{
  padding: 0.3rem;
  border : solid;
  border-width: 0.1rem;
  border-radius: 20px;
  border-color: #000000;
  background-color: #ffffff;
}

.footer{
  width: 100%;
  font-size: 0.7em;
  bottom: 0px;
  padding-bottom:1rem;
  margin-top: 3rem;
  text-decoration: underline;
  text-align: center;
}


/* === NAVBAR === */
.navbar {
  position: fixed;
  font-size: 2rem;
  font-weight: 400;
  top: 0;
  background: rgba(255,255,255,1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-left: 2rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
  padding-right: 2rem;
  box-shadow: 0 2px 5px rgba(0,0,0,0,2);
  z-index: 10;
  width: 100%;
}

.bio-btn {
  color: #000000;
  font-size: 1.2rem;
  font-weight: 400;
  margin-left:2rem;
  cursor: pointer;
  padding-left: 3rem;
  padding-right: 3rem;

}

.bio-btn:hover {
  color: rgb(0, 196, 255);
  border-color: #00c4ff;
  transition: all 0.5s ease;
  opacity: 70%;
}

/* === MODAL BIO === */
.modal {
  display: none;
  position: fixed;
  z-index: 60;
  top:0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.3);
  opacity: 1;
  margin-top:4.9rem;
}

.modal-content {
  background: white;
  padding: 10rem;
  width: 100%;
  animation: fadeIn 0.4s ease;
}

.close {
  float: right;
  font-size: 2rem;
  cursor: pointer;
  margin-left: 1rem;
  margin-top: -0.4rem;
}

.close:hover{
  opacity: 30%;
  color:#00c4ff;
}

.a-propos {
  display: grid;
  grid-template-columns: 3fr;
  gap: 3rem;
  grid-template-areas:
  "logo text-bio contacts";
}

.a-propos h2{
  font-size: 1.6rem;
  line-height: 2.5rem;
  font-weight: 400;
  margin-bottom: 0.7rem;
}

.contacts {
  border-left:solid;
  border-left-width: 0.1rem;
  border-left-color: #00c4ff;
  padding-left: 1rem;
  margin-right: 1.5rem;
  margin-top:0.5rem;
  height: 3.5rem;
  font-size: 1.2rem;
  font-weight: 500;
  line-height: 1.5rem;
}

.reseaux{
  width: 1rem;
}

.reseaux:hover{
  opacity: 30%;
}

/* === SLIDER NEW === */

.slider {
  position: relative;
  margin: 4rem auto;
  overflow: hidden;
}

.slides {
  display: flex;
  transition: transform 1s ease;
  touch-action: pan-y;
}

.slide {
  position: relative;
  min-width: 100%;
}

.slider .overlay {
  position: absolute;
  width: 100%;
  padding: 20px;
  background: rgba(0,0,0,0.55);
  justify-content: center;
  align-items: center;
  transition: opacity 0.3s ease;
  color: #f6f3f3;
  font-size: 1.5rem;
  font-weight: 400;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .4s ease, transform .4s ease;
  pointer-events: none;
}

.slide:hover .overlay {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.slider .overlay h2 {
  font-size: 3rem;
  font-weight: 300;

}

/* Desktop */
.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 16/8; /* Ratio large et panoramique */
}

/* === PORTFOLIO === */

.anchor{
  display: block;
  height: 115px; /*same height as header*/
  margin-top: -120px; /*same height as header*/
  visibility: hidden;
}

.portfolio {
  text-align: center;
  line-height: 2rem;
  font-weight: 400;
  font-size: 1rem;
  margin-top: 6rem;
  border-radius: 2rem;
}

.projets{
  font-size: 4rem;
  line-height: 4rem;
  margin-bottom: 1rem;
  font-weight: 300;
}

.filter-btn {
  background: #ffffff;
  border:#00c4ff;
  margin: 0.3rem ;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  cursor: pointer;
  transition: 0.3s;
  font-size: 1rem;
}

.filter-btn.active,
.filter-btn:hover {
  background-color: #00c4ff;;
  color: #ffffff;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  margin-top: 1rem;
}

.project-card {
  position: relative;
  overflow: hidden;
}

.project-card img {
  width: 100%;
  height: 100%; /* changer plus horizontal ? */
  transition: transform 0.5s ease;
}

.overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  color: #f6f3f3;
  font-size: 1.5rem;
  font-weight: 400;
}

.project-card:hover .overlay {
  opacity: 1;
}

/* page descriptive des projets */
.page-description {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: auto auto;  /* 2 lignes */
  grid-template-areas:
    "visuels description"
    "visuels nextprev";
  gap: 4rem;
  margin: 5rem;
  margin-top: 8rem;
  grid-auto-rows: min-content;
  align-items: start; 
}

/* Colonne des visuels sur deux colonnes */
.visuels {
  gap: 1.5rem;
  grid-area: visuels;
  grid-row: 1 / 3;     /* IMPORTANT : span 2 rows */
  align-self: start; 
}

.visuels p{
  margin-bottom: 0.5rem;
  margin-top: 0.5rem;
}

/* Texte dans la colonne de droite */
.description {
    grid-area: description;
    position: sticky;
    top: 6rem;
    align-self: start; 
  }

.nextprevious {
  padding-top: 0.5rem;
  display: grid;
  grid-template-columns: repeat(2,1fr);
  grid-gap: 1rem;
  border-top: solid;
  border-top-width: 0.08rem;
  border-top-color: #000000;
}

.description h1{
  font-size: 3.5rem; 
  font-weight: 200;
  line-height: 3.5rem;
  margin-bottom: 1rem;
 }

 .description h2{
  font-size: 1rem; 
  line-height: 1.3rem;
  margin-bottom: 0.5rem;
  font-weight: 500;
 }

.description h3{
  font-size: 1rem;
  line-height: 1.3rem;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.description ul{
  margin-left:1rem;
  margin-bottom: 1.5rem;
}

.taille {
  width: 100%;
  padding: 0rem 0rem 1rem 0rem;
}

/* Next & previous buttons */ 

.nextprevious p{
  font-size: 5rem;
  font-weight: 100;
  margin-top: -2.5rem;
  margin-bottom: -1.5rem;
}

.next {
  position: inline;
  text-align: right;
}

.next:hover{
  opacity: 40%;
}

.prev:hover{
  opacity: 40%;
}

#texteprev, #textenext {
  font-size: 1.2rem;
  line-height: 1.2rem;
  font-weight: 300;
}

.textementions{
  max-width: 100%;
  margin: 8rem;
}

.textementions h3{
  font-size: 1.3rem;
  font-weight: 600;
  margin-top: 2rem;
}

.textementions h2{
  font-size: 3rem;
  font-weight: 300;
}

/* ========== PAGE PROJET OPTIMISATION MOBILE ========== */

/* MODAL BIO */
@media (max-width: 1000px) {
  .a-propos {
    grid-template-columns: 1fr;
    grid-template-areas:
      "logo"
      "text-bio"
      "contacts";
  }
}

/* MENTIONS LEGALES */
@media (max-width: 1000px) {

  .textementions{
    margin: 8rem 3rem ;
  }

  .textementions h2{
  font-size: 2rem;
  font-weight: 300;
  }

  .textementions h3{
    font-size: 1.3rem;
    line-height: 2rem;
    font-weight: 600;
  }
}

/* Page de chaque projet - 1 colonne */
@media (max-width: 1000px) {
  .page-description {
    display: flex;           /* simple et prévisible pour mobile */
    flex-direction: column;
    gap: 1rem;
  }

  .description {
    position: static !important;
    order: 1;
    top: auto;
  }

  .description h1 {
    font-size: 3rem;
    line-height: 2.8rem;
  }

  .description ul{
    margin:0.8rem;
    font-size: 1rem;
    line-height: 1.2rem;
}

  .description h2 {
    font-size: 1rem;
    margin-bottom: 1rem;
    font-weight: 600;
  }

  .description p {
    font-size: 1rem;
    line-height: 1.3rem;
    margin-bottom: 1rem;
    font-weight: 400;
  }

  .description h3 {
    font-size: 1rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
  }

  .visuels {
    order: 2;
    width:100%;
    margin: none;
  }

  .nextprevious {
    order: 3;
    width: 100%;
  }

  .nextprevious p{
    font-size: 5rem;
    font-weight: 100;
    margin-top: -2.5rem;
  }

  #texteprev, #textenext {
    font-size: 1.6rem;
    font-weight: 300;
    line-height: 1.6rem;
    margin-top: 0rem;
  }
}

/* SLIDESHOW */
@media (max-width: 767px) {

  .slider .overlay h2 {
    font-size: 2rem;
    line-height: 2rem;
  }
  
  .slides {
    display: flex;
  }
  
  .slide img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 16/16; /* Ratio plus vertical */
  }

  .slider, .slides, .slide {
    width: 100%;
    max-width: 100%;
  } 
}


#slider {
  overflow-x: hidden;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 767px) {
  .modal-content {
    padding: 3rem;
    margin-top: -1rem;
  }

  .a-propos {
    gap: 1rem;
  }

  .a-propos h2 {
    font-size: 1.2rem;
    line-height: 1.5rem;
  }

  .contacts {
    margin-top: 1rem;
    font-size: 1rem;
    height: auto;
    padding-left: 0.8rem;
  }

  .logo {
    width: 100px;
  }
}

/* TEXTES GLOBAUX */
@media (max-width: 767px) {
  body {
    font-size: 1.4rem;
    line-height: 1.8rem;
    font-weight: 400;
  }

  .navbar {
    font-size: 1.3rem;
    padding: 1rem 1rem;
  }

  .bio-btn {
    padding: 0.3rem 0.8rem;
    font-size: 1rem;
  }
}


@media (max-width: 767px) {
  .grid {
    width:100%;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    grid-template-columns: 1fr !important;
  }

  .page-description {
    margin:0;
  }

  .description {
    position: static !important;
    order: 1;
    top: auto;
    margin: 8rem 3rem 0rem 3rem;
  }
}

/* FILTRES : plus gros + scroll horizontal */
@media (max-width: 767px) {

  .filters-wrapper {
    margin-left: 0.8rem;
    margin-right: 0.8rem;
  }
  
  .filters {
    overflow-x: auto;
  }

  .filter-btn {
    flex: 0 0 auto;
    font-size: 0.7rem;
    padding: 0.5rem 0.5rem;
    color: #000000;
    white-space: nowrap;
  }

  .overlay {
   font-size: 1rem;
  }
}

/* NEXT PREVIOUS */
@media (max-width: 767px) {
  #texteprev, #textenext {
    font-size: 1.6rem;
    font-weight: 300;
    line-height: 1.6rem;
    margin-top: 2rem;
  }

  .nextprevious {
    padding: 0rem 2rem 3rem 2rem;
    max-width: 100%;
    border-top: none;
  }

  .nextprevious p{
    font-size: 3rem;
    font-weight: 100;
    margin-top: 0rem;
  }
}