@import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400..900;1,400..900&display=swap");

:root {
  --lines-color: #e2e8f0;
  --secondary-color: #e6e6ff;
  --background-color: #f8faff;
  --text-color: #1e293b;
  --accentuation-color: #0000ff;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--background-color);
  font-family: "Roboto", sans-serif;
}

header {
  width: 100%;
  height: 70px;
  background-color: var(--background-color);
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 50px 10px 50px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: var(--background-color);
  & img {
    height: 52px;
  }
  & ul {
    display: flex;
    list-style: none;
    gap: 20px;

    & li {
      & p {
        cursor: pointer;
        font-weight: 500;
        font-size: 18px;
        transition: color 0.3s ease;
        &:hover {
          color: var(--accentuation-color);
        }
      }
      & a {
        text-decoration: none;
        color: var(--text-color);
        font-weight: 500;
        font-size: 18px;
        transition: color 0.3s ease;
        &:hover {
          color: var(--accentuation-color);
        }
      }
    }
  }
}

.dropdown {
  position: relative;
  display: inline-block;
}

.dropToggle {
  border: none;
  background: transparent;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--text-color);
  cursor: pointer;
  font-weight: 500;
  font-size: 18px;
  font-family: "Roboto", sans-serif;
  transition: color 0.3s ease;
}

.dropToggle ion-icon {
  font-size: 18px;
  transition: transform 0.3s ease;
}

.dropToggle:hover {
  color: var(--accentuation-color);
}

.dropToggle.arrow-open ion-icon {
  transform: rotate(90deg);
}

.dropToggle:focus-visible {
  outline: 2px solid var(--accentuation-color);
  outline-offset: 3px;
  border-radius: 4px;
}

.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 160px;
  background-color: white;
  border: 1px solid var(--lines-color);
  border-radius: 8px;
  padding: 20px 0 20px 10px;
  gap: 20px;
  z-index: 10;
  flex-direction: column;
}

.dropdown-content.dropdown-open {
  display: flex;
}

.btnContact {
  background-color: var(--accentuation-color);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 700;
  font-size: 16px;
  transition: background-color 0.3s ease;
  &:hover {
    background-color: color-mix(in srgb, var(--accentuation-color) 70%, black);
  }
}

.contactNavDynamic {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
}

.contactNavDynamic.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

/* Home Page */

.hero {
  padding: 50px;
  height: 85vh;
  color: var(--text-color);
  display: flex;
  flex-direction: row;
  justify-content: center;
  position: relative;
}

.hero-scroll-indicator {
  position: absolute;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  width: 38px;
  height: 38px;
  border: 1px solid color-mix(in srgb, var(--text-color) 20%, transparent);
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accentuation-color);
  background-color: color-mix(in srgb, white 70%, transparent);
  text-decoration: none;
  animation: hero-scroll-bounce 1.7s infinite;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.hero-scroll-indicator ion-icon {
  font-size: 22px;
}

.hero-scroll-indicator:hover {
  transform: translateX(-50%) translateY(-3px);
  border-color: var(--accentuation-color);
}

@keyframes hero-scroll-bounce {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(8px);
  }
}

.Titre {
  width: 45%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  & h1 {
    font-weight: 900;
    font-size: 56px;
    width: 80%;
    text-transform: uppercase;
    & span {
      color: var(--accentuation-color);
      font-family: "Playfair Display", serif;
      font-style: italic;
      font-weight: 400;
    }
  }
  & p {
    font-size: 18px;
    font-weight: 500;
    margin-top: 10px;
    margin-bottom: 35px;
    width: 80%;
  }
  & .contact {
    width: fit-content;
  }
}

.ImageHero {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 55%;
  & img {
    width: 95%;
    border-radius: 8px;
    border: 1px solid var(--lines-color);
  }
  & .imageBack {
    position: absolute;
    bottom: 16%;
    right: 0%;
    width: 95%;
    height: 60%;
    background-color: var(--accentuation-color, #e2e8f0);
    border-radius: 8px;
    z-index: -1;
  }
}

.era {
  border-top: 1px solid rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid rgba(0, 0, 0, 0.25);
  height: 100vh;
  display: flex;
  flex-direction: row;
  & .column {
    width: 33.333%;
    height: 100%;
    padding: 70px;
    display: flex;
    flex-direction: column;
    &:last-child {
      margin-right: 0;
    }
    & svg {
      width: 100%;
    }
    & h3 {
      font-weight: 700;
      font-size: 18px;
      margin-top: 150px;
    }
    & p {
      margin-top: 50px;
      & span {
        color: var(--accentuation-color);
        font-weight: 600;
      }
    }
  }
  & .col2 {
    border-left: 1px solid rgba(0, 0, 0, 0.25);
    border-right: 1px solid rgba(0, 0, 0, 0.25);
  }
}
.apropos {
  padding: 50px;
  height: 100vh;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 100px;
  & .textPorpos {
    width: 35%;
    display: flex;
    flex-direction: column;
    & h2 {
        font-size: 110px;
        text-transform: uppercase;
        font-weight: 700;
        font-style: italic;
        color: var(--text-color);
    }
    & p {
        font-size: 20px;
        font-weight: 600;
        color: var(--text-color);
    }
  }
  & .imagePropos {
    width: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    & img {
        width: 60%;
        border-radius: 8px;
        border: 1px solid var(--lines-color);
    }
    & .imageBack {
        position: absolute;
        background-color: var(--accentuation-color);
        width: 60%;
        height: 90%;
        bottom: 5%;
        right: 17.5%;
        z-index: -1;
        border-radius: 8px;
    }
    & p {
      margin-top: 20px;
      font-size: 18px;
      font-weight: 500;
      color: var(--text-color);
    }
  }
}

/* Contact Page */

.contactMain {
  height: calc(100vh - 100px);
  padding: 50px;
  display: flex;
  flex-direction: row;
  gap: 50px;
  align-items: center;
  justify-content: center;
  & form {
    background-color: white;
    border-radius: 8px;
    border: 1px solid var(--lines-color, #e2e8f0);
    display: flex;
    flex-direction: column;
    padding: 20px 50px 50px 50px;
    width: 35%;
    & label {
      margin-top: 30px;
      font-weight: 500;
    }
    & input {
      margin-top: 5px;
      padding: 10px;
      border: 1px solid var(--lines-color);
      border-radius: 5px;
      font-size: 16px;
    }
    & textarea {
      margin-top: 5px;
      padding: 10px;
      border: 1px solid var(--lines-color);
      border-radius: 5px;
      font-size: 16px;
      resize: vertical;
      min-height: 100px;
    }
    & button {
      margin-top: 20px;
      width: 100%;
      background-color: var(--accentuation-color);
      color: white;
      border: none;
      padding: 10px 20px;
      border-radius: 5px;
      cursor: pointer;
      font-weight: 700;
      font-size: 16px;
      transition: background-color 0.3s ease;
      &:hover {
        background-color: color-mix(
          in srgb,
          var(--accentuation-color) 70%,
          black
        );
      }
    }
  }
  & .leftContent {
    width: 35%;
    display: flex;
    flex-direction: column;
    gap: 50px;
    & h1 {
      font-weight: 900;
      font-size: 40px;
      & span {
        color: var(--accentuation-color);
        font-family: "Playfair Display", serif;
        font-style: italic;
        font-weight: 400;
      }
    }
    & p {
      font-size: 18px;
      font-weight: 500;
    }
  }
  & ion-icon {
    margin-right: 10px;
    color: var(--accentuation-color);
  }
}

/* Portfolio Page */

.portfolioMain {
  padding: 50px;
  padding-top: 100px;
  & h1 {
    font-size: 40px;
    font-weight: 900;
    margin-bottom: 40px;
    & span {
      color: var(--accentuation-color);
      font-family: "Playfair Display", serif;
      font-style: italic;
      font-weight: 400;
    }
  }
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.card {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  position: relative;
  border-radius: 8px;
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  color: var(--background-color);
  height: 100%;
  width: 100%;
  background: linear-gradient(0deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
  cursor: pointer;
  & ion-icon {
    position: absolute;
    top: 20px;
    right: 20px;
    color: var(--background-color);
    font-size: 30px;
  }
  & p {
    position: absolute;
    bottom: 20px;
    left: 20px;
    font-size: 16px;
    font-weight: 500;
    width: calc(100% - 40px);
  }
}

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

.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Modal */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background-color: var(--background-color);
  border-radius: 12px;
  width: 70%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 40px;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  background: none;
  border: none;
  font-size: 32px;
  cursor: pointer;
  color: var(--text-color);
  transition: color 0.3s ease;
  &:hover {
    color: var(--accentuation-color);
  }
}

.modal-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 30px;
  & img {
    width: calc(50% - 6px);
    border-radius: 8px;
    border: 1px solid var(--lines-color);
    object-fit: cover;
  }
  & img:first-child {
    width: 100%;
  }
}

.modal-info {
  & h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 15px;
  }
  & p {
    font-size: 16px;
    font-weight: 400;
    line-height: 1.6;
    color: var(--text-color);
  }
}

/* Responsive Design */

/* Contact link in nav - hidden on desktop, shown on mobile */
.nav-contact-mobile {
  display: none;
}

/* Hamburger button - hidden on desktop */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  z-index: 1100;
  margin-left: auto;
}

.hamburger span {
  display: block;
  width: 28px;
  height: 3px;
  background-color: var(--text-color);
  border-radius: 3px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ===== Tablet (max 1024px) ===== */
@media only screen and (max-width: 1024px) {
  nav {
    padding: 10px 30px;
  }

  .hero {
    padding: 30px;
    height: auto;
    min-height: 80vh;
  }

  .Titre {
    & h1 {
      font-size: 42px;
      width: 100%;
    }
    & p {
      width: 100%;
    }
  }

  .ImageHero {
    & img {
      width: 100%;
    }
    & .imageBack {
      width: 100%;
    }
  }

  .era {
    height: auto;
    & .column {
      padding: 40px;
      & h3 {
        margin-top: 80px;
      }
    }
  }

  .apropos {
    height: auto;
    padding: 50px 30px;
    gap: 50px;
    & .textPorpos {
      width: 45%;
      & h2 {
        font-size: 80px;
      }
      & p {
        font-size: 18px;
      }
    }
    & .imagePropos {
      width: 50%;
    }
  }

  .contactMain {
    height: auto;
    min-height: calc(100vh - 100px);
    padding: 30px;
    & form {
      width: 45%;
    }
    & .leftContent {
      width: 45%;
    }
  }

  .portfolio-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .modal {
    width: 85%;
    padding: 30px;
  }
}

/* ===== Small tablet / Large phone (max 768px) ===== */
@media only screen and (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav-contact-mobile {
    display: list-item;
  }

  nav {
    padding: 10px 20px;
    flex-wrap: wrap;

    & ul {
      display: none;
      flex-direction: column;
      width: 100%;
      order: 3;
      background-color: var(--background-color);
      padding: 20px 0;
      gap: 15px;
      border-top: 1px solid var(--lines-color);
    }

    & ul.nav-open {
      display: flex;
    }

    & .contactNav {
      display: none;
    }
  }

  .hero {
    flex-direction: column;
    padding: 20px;
    height: auto;
    gap: 40px;
  }

  .hero-scroll-indicator {
    position: static;
    transform: none;
    margin: 10px auto 0 auto;
  }

  .hero-scroll-indicator:hover {
    transform: translateY(-3px);
  }

  @keyframes hero-scroll-bounce {
    0%,
    100% {
      transform: translateY(0);
    }
    50% {
      transform: translateY(8px);
    }
  }

  .Titre {
    width: 100%;
    & h1 {
      font-size: 36px;
      width: 100%;
    }
    & p {
      width: 100%;
      font-size: 16px;
    }
  }

  .ImageHero {
    width: 100%;
    & img {
      width: 100%;
    }
    & .imageBack {
      width: 100%;
      right: -2%;
    }
  }

  .era {
    flex-direction: column;
    height: auto;
    & .column {
      width: 100%;
      padding: 40px 30px;
      & svg {
        width: 60%;
      }
      & h3 {
        margin-top: 40px;
      }
    }
    & .col2 {
      border-left: none;
      border-right: none;
      border-top: 1px solid rgba(0, 0, 0, 0.25);
      border-bottom: 1px solid rgba(0, 0, 0, 0.25);
    }
  }

  .apropos {
    flex-direction: column;
    height: auto;
    padding: 40px 20px;
    gap: 40px;
    & .textPorpos {
      width: 100%;
      & h2 {
        font-size: 64px;
      }
      & p {
        font-size: 16px;
      }
    }
    & .imagePropos {
      width: 100%;
      & img {
        width: 80%;
      }
      & .imageBack {
        width: 80%;
        right: 7.5%;
      }
    }
  }

  .contactMain {
    flex-direction: column;
    height: auto;
    padding: 100px 20px 40px 20px;
    gap: 30px;
    & .leftContent {
      width: 100%;
      gap: 20px;
      & h1 {
        font-size: 32px;
      }
    }
    & form {
      width: 100%;
      padding: 20px 30px 30px 30px;
    }
  }

  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .modal {
    width: 92%;
    padding: 25px;
  }

  .modal-gallery {
    & img {
      width: 100%;
    }
    & img:first-child {
      width: 100%;
    }
  }
}

/* ===== Mobile (max 600px) ===== */
@media only screen and (max-width: 600px) {
  nav {
    padding: 10px 15px;
    & img {
      height: 40px;
    }
  }

  .hero {
    padding: 15px;
    gap: 30px;
    & .ImageHero {
      & img {
        width: 100%;
      }
      & .imageBack {
        width: 100%;
        height: 100%;
        right: -2%;
        bottom: -4%;
      }
    }
  }

  .Titre {
    & h1 {
      font-size: 28px;
    }
    & p {
      font-size: 15px;
      margin-bottom: 20px;
    }
  }

  .era {
    & .column {
      padding: 30px 20px;
      & svg {
        width: 50%;
      }
      & h3 {
        margin-top: 30px;
        font-size: 16px;
      }
      & p {
        margin-top: 25px;
        font-size: 14px;
      }
    }
  }

  .apropos {
    padding: 30px 15px;
    & .textPorpos {
      & h2 {
        font-size: 48px;
      }
      & p {
        font-size: 15px;
      }
    }
    & .imagePropos {
      & img {
        width: 90%;
      }
      & .imageBack {
        width: 90%;
        right: 2%;
        bottom: 7%;
      }
      & p {
        font-size: 15px;
      }
    }
  }

  .contactMain {
    padding: 90px 15px 30px 15px;
    & .leftContent {
      & h1 {
        font-size: 26px;
      }
      & p {
        font-size: 15px;
      }
    }
    & form {
      padding: 15px 20px 25px 20px;
    }
  }

  .portfolioMain {
    padding: 30px 15px;
    padding-top: 90px;
  }

  .portfolio-grid {
    grid-template-columns: repeat(1, 1fr);
  }

  .modal {
    width: 96%;
    padding: 20px;
    max-height: 90vh;
  }

  .modal-info {
    & h2 {
      font-size: 22px;
    }
    & p {
      font-size: 14px;
    }
  }

  .btnContact {
    font-size: 14px;
    padding: 8px 16px;
  }

  .dropdown-content {
    min-width: auto;
    position: static;
    border: none;
    background-color: transparent;
    padding: 10px 0 0 15px;
  }
}