@font-face {
  font-family: "Regilla";
  src: url("fonts/Regilla-Regular.otf") format("opentype");
}

@font-face {
  font-family: "AvantGarde";
  src: url("fonts/ITCAvantGardePro-Md.ttf") format("truetype");
}

@font-face {
  font-family: "DM-sans";
  src: url("fonts/dm-sans-v17-latin-regular.woff2") format("woff2");
}



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

body {
  background-color: #F6E3D4;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

h1 {
  font-family: AvantGarde, sans-serif;
  font-size: 2rem;
  max-width: 700px;
  margin-bottom: 10px;
}

@media (max-width: 900px) {
  .chevron {
    display: none;
  }
}

.footer {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  font-family: DM-sans, sans-serif;
  font-size: 0.9rem;
  color: #F6E3D4;
  background-color: #8698EB;
  padding: 40px;
}

/* HEADER */
.header {
  min-height: 65vh;
  display: flex;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
}

.header.portfolio-only {
  height: 100%;
}

.header.portfolio-only .header-left {
  width: 100%;
  padding-inline: clamp(2rem, 6vw, 8rem);
}

.header.portfolio-only .header-right {
  width: 0;
  padding: 0;
  overflow: hidden;
  pointer-events: none;
}

/* GAUCHE */

.header:not(.portfolio-only) .header-left {
  width: 45%;
}

.header:not(.portfolio-only) .header-right {
  width: 55%;
}

.header-left {
  background-color: #8698EB;
  color: #fff;
  padding: clamp(2rem, 4vw, 4rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: width 0.4s ease, padding 0.4s ease;
  min-height: 65vh;
}

.logo {
  margin: 40px;
  max-width: 100%;
  height: auto;
  display: block;
}

/* NAVIGATION */

.nav {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  align-items: center;
}

.nav a {
  opacity: 70%;
  line-height: 1.1;
  display: block;
  text-decoration: none;
  color: #F6E3D4;
  font-family: AvantGarde, sans-serif;
  font-weight: 500;
  font-size: 2rem;
  letter-spacing: 0rem;
  transition: all 0.3s ease;
}

.nav a:hover {
  opacity: 100%;
  transition: all 0.3s ease;
}

.nav a.active {
  opacity: 100%;
  transform: scale(1.1);
  letter-spacing: 0.1rem;
  transition: all 0.3s ease;
}

.chevron {
  top: -0.3rem;
  position: absolute;
  left: -2.5rem;
  font-size: 2rem;
  color: #F6E3D4;
  transition: transform 0.3s ease;
  transition: transform 0.35s cubic-bezier(.4,0,.2,1);
}

.reseaux {
  display: flex;
  margin: 50px;
  gap: 2rem;
}

.iconeRS {
  opacity: 100%;
  transform: scale(1.0);
  transition: all 0.3s;
}

.iconeRS:hover {
  opacity: 80%;
  transform: scale(1.15);
  transition: all 0.3s;
}

    /* DROITE */

.header-right {
  position: relative;
  overflow: hidden;
}

.header-right {
  width: 55%;
  background-color: #F6E3D4;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(3rem, 6vw, 8rem);
  overflow: hidden;
  transition: opacity 0.s ease, transform 0.3s ease;
  animation-delay: 2s;
}

.content {
  max-width: 800px;
  text-align: center;
}

.quote {
  font-family: Regilla,sans-serif;
  font-size: clamp(1rem, 3vw, 3rem);
  text-align: center;
  color: #656D34;
  line-height: 1.4;
}

.about {
  word-break: keep-all;
  font-family: DM-sans,sans-serif;
  font-weight: 500;
  text-align: justify;
  font-size: clamp(0.7rem, 1.4vw, 1.4rem);
  color: #656D34;
  margin-bottom: 1rem;
}

#about {
  padding-inline: clamp(2rem, 5vw, 6rem);
}

.author {
  font-family: Regilla,sans-serif;
  font-size: clamp(1.5rem, 2.5vw, 2.5rem);
  color: #656D34;

}

/* PANELS */

.panel {
  padding-inline: 60px;
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation-delay: 2s;
}

.panel.about {
  flex-direction: column;
  align-items: center;
}

.thumbnail {
  margin-bottom: 1.5rem;
}

.panel.about p {
  max-width: 700px;
}

.panel.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  animation-delay: 2s;
}

.panel > * {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}


.panel.active > * {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.1s;
}


/* TEXTE VERTICAL */

.panel.contact {
  display: flex;
  flex-direction: column;
}

.contact-title {
  font-family: Regilla, serif;
  font-size: 6rem;
  color: #8698EB;
  writing-mode: sideways-rl;
  transform: rotate(180deg);
}



/* FORMULAIRE */

.contact-wrapper {
  max-width: 1200px;
  width: 100%;
  margin-inline: auto;
  display: flex;
  align-items: flex-start;
}


/* FORM */

.contact-form p {
  color: #8698EB;
  padding-bottom: 20px;
  text-align: center;
  font-family: DM-sans, sans-serif;
  font-size: 1.2rem;
}

@media (max-width: 900px) {
  .contact-form p {
    display: none;
  }
}


.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  width: 100%;
  max-width: 900px;
}

.contact-form label {
  display: flex;
  flex-direction: column;
  font-family: AvantGarde, sans-serif;
  color: #656D34;
  font-size: 0.9rem;
  gap: 0.5rem;
}

.contact-form input,
.contact-form textarea {
  font-family: AvantGarde, sans-serif;
  margin-top: 0.3rem;
  padding: 0.8rem 1rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
}

.contact-form textarea {
  width: 100%;
  max-width: 100%;
  min-height: 130px;
  max-height: 320px;
  resize: vertical;
}

.contact-form button {
  margin-top: 1rem;
  align-self: flex-end;
  background: #656D34;
  color: #F6E3D4;
  border: none;
  padding: 0.6rem 1.5rem;
  border-radius: 20px;
  cursor: pointer;
}

#contact.panel p {
  font-size: 1.2rem;
  padding: 0rem 4rem 2rem 11rem;
  text-align: center;
  font-family: DM-sans, sans-serif;
  color: #8698EB;
}

@media (max-width: 900px) {
  #contact.panel p {  display: none;}
}


.redimensionable{
  resize: both;
}

@media (max-width: 900px) {
  .contact-wrapper {
    flex-direction: column;
  }

  .contact-title {
    writing-mode: horizontal-tb;
    transform: none;
    font-size: 3rem;
  }
}



.portfolio-grid {
  column-count: 5;
  column-gap: 0;
}

.project {
  cursor: pointer;
  position: relative;
  overflow: hidden;
  break-inside: avoid;
}

.project img {
  width: 100%;
  height: auto;
  display: block;
}

.project-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  padding: 4px 8px;
  border-radius: 20px;
  background: rgba(0,0,0,0.65);
  color: #fff;
  font-family: DM-sans, sans-serif;
  transition: all 0.1s ease;
  opacity: 80%;
}

@media (max-width: 900px) {
  .project-badge {  font-size: 0.5rem;}
}


.project:hover .project-badge {
  font-size: 0.8rem;
  transition: all 0.1s ease;
  opacity: 100%;
}

.project-badge.pro {
  background: rgba(101, 109, 52, 0.85);
}

.project-badge.perso {
  background: rgba(134, 152, 235, 0.85);
}

.modal-info .project-badge {
  position: static;     
  margin: 8px 0 12px;
  display: inline-block;
}

@media (max-width: 1200px) {
  .portfolio-grid { column-count: 3; }
}

@media (max-width: 900px) {
  .portfolio-grid { column-count: 2; }
}


.project-title {
  position: absolute;
  inset: 0; 
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 5rem;
  padding-inline: 1rem;
  font-family: AvantGarde, sans-serif;
  font-size: 1.6rem;
  color: #F6E3D4;
  letter-spacing: 0.15rem;
  text-align: center;
  background: linear-gradient(
  to top,
  rgba(134, 152, 235, 1),
  rgba(134, 152, 235, 0.6)
  ); 
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project:hover .project-title {
  opacity: 1;
}


/* ===== MODALE PROJET ===== */

.modal {
  overscroll-behavior: contain;
  position: fixed;
  inset: 0;
  display: none; /* cachée par défaut */
  z-index: 9999;
}

.modal-overlay {
  z-index: 1;
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}

.modal-content {
  z-index: 2;
  border-radius: 10px;
  position: relative;
  background: #F6E3D4;
  width: 100%;
  max-width: 1700px;
  height: 80vh;
  margin: auto;
  padding: 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.modal-close {
  z-index: 3;
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: #656D34;
}

.modal-grid {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  align-items: center;
}

.modal-info {
  margin: 2rem;
  overflow-y: auto;
}

.modal-title {
  font-family: AvantGarde, sans-serif;
  font-size: 2rem;
  color: #656D34;
  margin-bottom: 1rem;
}


.modal-description {
  text-align: justify;
  font-family: DM-sans, sans-serif;
  font-weight: 500;
  font-size: 1.3rem;
  color: #656D34;
  line-height: 1.2;
  margin-top: 2rem;
}

.modal-description p {
  margin-bottom: 1.2rem;
}

/* ===== SLIDER MODALE ===== */

.modal-images {
  border-radius: 10px;
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  align-items: center;
  padding: 0;
  height: auto;
}

.modal-images img {
  max-height: 60vh;
  height: 100%;
  width: auto;
  display: block;
}


.slider-window {
  overflow: hidden;
  width: 100%;
  height: 100%;
}


.slider-track {
  display: flex;
  height: auto;
  transition: transform 0.4s ease;
  align-items: center;
  touch-action: pan-y;
}


.slider-track img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  flex-shrink: 0;
  transition: transform 0.40s ease;
  will-change: transform;
}



.slider-btn {
  background: none;
  border: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.8rem;
  cursor: pointer;
  color: #656D34;
  padding: 1.2rem;
  transition: all 0.25s ease;
}

.slider-btn.prev {
 left: 8px; 
}

.slider-btn.next { 
  right: 8px; 
}

.slider-btn:hover {
  transform: translateY(-50%) scale(1.3);
  opacity: 0.85;
}

@media (max-width: 678px) {
  .slider-btn {
    display: none !important;
    pointer-events: none !important;
  }
}

.slider-indicators {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 30px;
}

.slider-indicators span {
  border-radius: 50px;
  width: 15px;
  height: 15px;
  background: #8698EB;
  opacity: 0.5;
  transition: all 0.3s ease;
}

.slider-indicators span.active {
  opacity: 1;
  transform: scale(1.5);
}

.slider {
  border-radius: 10px;
  width: 100%;
  max-width: 750px; 
  overflow: hidden;
  position: relative;
  cursor: zoom-in;
  touch-action: pan-y;
}

.slider img {
  border-radius: 10px;
  transition: transform 0.2s ease-out; 
  transform-origin: center center; 
}



@media (max-width: 900px) {
  .project:hover .project-title {
  opacity: 0;
}

}

                                  /* HEADER MOBILE */


@media (max-width: 900px) {

  h1 {
    font-size: 1rem;
  }

  .header:not(.portfolio-only) .header-left {
  width: 100%;
  }

  .header:not(.portfolio-only) .header-right {
  width: 100%;
  }

  /* HEADER */
  .header {
    flex-direction: column;
    height: auto;
  }

  .header-left {
    width: 100%;
  }

  .header-right {
    width: 100%;
    padding: 1.5rem;
    display: block;
  }


  .header.portfolio-only .header-right {
    display: none;
  }

 
  .panel {
    position: static;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    display: none;
    margin-top: 1.5rem;
  }

  .panel.active {
    display: block;
  }

}



                                  /* MODALE MOBILE*/


@media (max-width: 900px) {

  .modal-close {
    position: static;
    align-self: flex-end;
    margin-bottom: 0.3rem;
    margin-top: 1rem;
  }

 
  .modal-content {
    height: 92dvh;
    padding: 0.8rem;
  }


  .modal-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 0.8rem;
    height: 100%;
    align-items: stretch;
  }

  
  .modal-images {
  }

  .slider {
    max-width: 100%;
  }

  .modal-images img {
    max-height: 48dvh;
  }

  /* TEXTE */
  .modal-info {
    padding: 1rem;
    overflow-y: auto;
    min-height: 0;
    overscroll-behavior: contain;
  }

  .modal-title {
    font-size: 1.4rem;
    margin-bottom: 0.6rem;
  }

  .modal-description {
    font-size: 1.05rem;
    line-height: 1.4;
    margin-top: 0.6rem;
  }

  .slider-indicators {
    margin: 15px;
  }

  .slider-indicators span {
    width: 10px;
    height: 10px;
  }
}

@media (hover: none) and (pointer: coarse) {
  .slider {
    cursor: default;
  }

  .slider-track img {
    transform: scale(1) !important;
  }
}

.modal-info::-webkit-scrollbar {
  width: 6px;
}

.modal-info::-webkit-scrollbar-track {
  background: transparent;
}

.modal-info::-webkit-scrollbar-thumb {
  background-color: rgba(101, 109, 52, 0.4);
  border-radius: 10px;
}

.modal-info::-webkit-scrollbar-thumb:hover {
  background-color: rgba(101, 109, 52, 0.7);
}

.modal-info {
  scrollbar-width: thin;
  scrollbar-color: rgba(101, 109, 52, 0.5) transparent;
}

.back-to-portfolio {
  display: none;
  margin: 1.2rem;
  padding: 0.3rem 0.7rem;
  background-color: rgba(134, 152, 235, 1);
  border-radius: 100px;
  border: none;
  font-family: DM-sans, sans-serif;
  font-size: 0.9rem;
  color: #F6E3D4;
  opacity: 1;
  cursor: pointer;
}

.back-to-portfolio:hover {
  opacity: 1;
}


@media (max-width: 900px) {
  .back-to-portfolio {
    display: inline-block;
  }
}