:root {
  font-family: InterVariable, Inter, sans-serif;
  font-feature-settings: 'liga' 1, 'calt' 1;
}
@supports (font-variation-settings: normal) {
  :root { font-family: InterVariable, sans-serif; }
}

body {
  background: #e0e0e0;
}

.page {
  padding-left: 30px;
  padding-right: 30px;
}

/* PAGE D’ACCUEIL ------------------------- */

.home-page .grid .item img,
.home-page .img-default {
  aspect-ratio: 6016 / 4000;
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 12px;
}

/* INTRO ------------------------- */

.intro p {
  color: #000000;
  text-align: end;
  padding-left: 20px;
  line-height: 1;
  font-size: 100px;
  margin-top: 400px;
  font-weight: 550;
}

/* HEADER ------------------------- */

.header {
  position: sticky;
  top: 12px;
  margin: 15px 30px 20px;
  padding: 1px 15px;
  background-color: #00000011;
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border-radius: 62px;
  z-index: 9999;

  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 15px;
}

.header h1 {
  color: #000000;
  margin-left: 20px;
}

.header a {
  text-decoration: none;
  color: #000000;
}

/* NAVIGATION ------------------------- */

.nav-links {
  list-style: none;
  display: flex;
  gap: 15px;
  margin-right: 30px;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  color: #000000;
  font-weight: 300;
  padding: 9px 15px;
  border-radius: 150px;
  backdrop-filter: blur(8px);
  outline-style: solid;
  outline-width: 1.7px;
  transition: 0.3s ease;
}

.nav-links a:hover {
  background: rgba(189, 189, 189, 0.661);
  transform: translateY(-2px);
}


/* ITEMS ------------------------- */

.item {
  position: relative;
  overflow: hidden;
  z-index: 0;
  border-radius: 12px;
  overflow: hidden;
}

.item.large {
  width: 100%;
  margin: 20px 0;
}

.item.large img {
  width: 100%;
  height:auto;
  object-fit: cover;
  border-radius: 12px;
}

/* GRID ------------------------- */

.grid {
  display: grid;
  gap: 15px;
  grid-template-columns: repeat(3, 1fr);
}

.grid .item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  margin-bottom: 12px;
}

.grid .item img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  border-radius: 12px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  margin-top: 15px;
}

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

.grid-4 .item .img{
  background: #e0e0e0;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 12px;
  overflow: hidden;
}

.grid-4 .item img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 12px;
  display: block;
}



/* PROJECT ------------------------- */

.project-intro {
  display: flex;
  gap: 40px;
  margin-top: 10px;
  margin-bottom: 50px;
  align-items: flex-start;
}

.project-intro img{
  width: 40%;
  border-radius: 12px;
}

.project-text {
  width: 55%;
  line-height: 1.5;
  color: #000;
}

.details {
  font-size: 0.9rem;
  margin-top: -5px;
  opacity: 0.8;
  color: #00000089;
}

a {
  color: #4d0202d3;
}

/* IMG ------------------------- */

.item img{
  transition: transform 0.4s ease;
}

.item:hover img {
  transform: scale(1.03);
}

/* OVERLAY ------------------------- */

.overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 3;
  border-radius: 12px;
  transition: transform 0.4s ease;
}

.item:hover .overlay {
  background: rgba(0, 0, 0, 0.45);
  opacity: 1;
}

.overlay .title {
  color: white;
  font-size: 20px;
  font-weight: 300;
  padding: 9px 15px;
  border-radius: 150px;
  outline: 1.7px solid rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.item:hover img {
  transform: scale(1.03);
}


/* LIGHTBOX ----------------------- */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  justify-content: center;
  align-items: center;
  z-index: 999999;
}

.lightbox-img {
  max-width: 95vw;
  max-height: 95vh;
  border-radius: 0;
  box-shadow: 0 0 20px rgba(0,0,0,0.3);
}

.lightbox-close {
  position: absolute;
  top: 30px;
  right: 40px;
  width: 25px;
  height: 25px;
  cursor: pointer;
  opacity: 0.9;
  transition: opacity 0.2s ease;
}

.lightbox-close::before,
.lightbox-close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 2px;
  background: white;
  transform-origin: center;
}

.lightbox-close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.lightbox-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.lightbox-close:hover {
  opacity: 1;
}

.lightbox-arrow {
  position: absolute;
  top: 50%;
  width: 25px;
  height: 25px;
  transform: translateY(-50%);
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.lightbox-arrow:hover {
  opacity: 1;
}

.lightbox-arrow.left {
  left: 40px;
}

.lightbox-arrow.left::before {
  content: "";
  position: absolute;
  inset: 0;
  border-left: 3px solid white;
  border-bottom: 3px solid white;
  transform: rotate(45deg);
}

.lightbox-arrow.right {
  right: 40px;
}

.lightbox-arrow.right::before {
  content: "";
  position: absolute;
  inset: 0;
  border-right: 3px solid white;
  border-bottom: 3px solid white;
  transform: rotate(-45deg);
}

/* Supprime le contour bleu de la lightbox sur Chrome */
.lightbox:focus {
  outline: none;
}
.lightbox-img:focus {
  outline: none;
  box-shadow: none;
}


/* FOOTER ------------------------- */

.footer {
  text-align: center;
  padding: 30px 0;
  margin-top: 60px;
  font-size: 13px;
  font-weight: 300;
  color: #000;
  opacity: 0.45;
}

.footer a {
  color: inherit;
  text-decoration: underline;
  opacity: 0.7;
}

.footer a:hover {
  opacity: 1;
}


/* FORMULAIRE CONTACT ------------------------- */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.contact-form label {
  font-weight: 500;
  color: #000;
}

.contact-form input,
.contact-form textarea {
  padding: 12px 15px;
  border: 1.7px solid rgba(0,0,0,0.3);
  border-radius: 22px;
  font-family: InterVariable, sans-serif;
  font-size: 14px;
  outline: none;
  backdrop-filter: blur(8px);
  background-color: rgba(255, 255, 255, 0.5);
  transition: 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: #000;
  background-color: rgba(255, 255, 255, 0.7);
}

.contact-form button {
  padding: 12px 25px;
  border-radius: 150px;
  border: 1.7px solid rgba(0,0,0,0.3);
  background-color: rgba(0,0,0,0.05);
  backdrop-filter: blur(8px);
  font-family: InterVariable, sans-serif;
  font-weight: 500;
  cursor: pointer;
  transition: 0.3s ease;
  width: max-content;
  align-self: center;
}

.contact-form button:hover {
  background-color: rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

/* CV ------------------------- */
.cv-link {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 150px;
  border: 1.7px solid rgba(0,0,0,0.3);
  backdrop-filter: blur(8px);
  background-color: rgba(0,0,0,0.05);
  text-decoration: none;
  color: #000;
  font-weight: 500;
  transition: 0.3s ease;
}

.cv-link:hover {
  background-color: rgba(0,0,0,0.1);
  transform: translateY(-2px);
}


/* MEDIA ------------------- */
/* TABLETTE */
@media (max-width: 900px) {
  .project-intro {
    flex-direction: column;
    gap: 18px;
  }
  .project-intro img,
  .project-text {
    width: 100%;
  }
}

/* MOBILE */
@media (max-width: 600px) {
  .header {
    position: sticky;
    left: 0;
    right: 0;
    width: 100%;
    margin: 0;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 10px;
    border-radius: 62px;
    background-color: #00000011;
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    box-sizing: border-box;
    z-index: 9999;
  }

  .header h1 {
    margin: 0;
    font-size: 18px;
  }

  .header h1::after {
    content: "s ndb";
  }

  .header h1 span.full-name {
    display: none;
  }

  .nav-links {
    margin: 0;
    gap: 8px;
  }

  .nav-links a {
    padding: 6px 10px;
    font-size: 13px;
    white-space: nowrap;
  }

  /* GRID -------------------- */
  .grid, .grid-2, .grid-4 {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .project-intro {
    padding: 0 15px;
  }
  
  .contact-form input,
  .contact-form textarea,
  .contact-form button {
    font-size: 13px;
    padding: 10px 12px;
  }
}

@media (max-width: 1200px) {
  .grid-4 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 800px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .grid-4 { grid-template-columns: 1fr; gap: 12px; }
}