body {
    background: var(--blanc);
}

#projects-wrapper { 
    display: flex; 
}

.projects-left { 
    position: fixed;
    top: 0;
    left: 0;
    width: 50%;
    height: 100vh;
    padding: 0px;
    overflow: auto; 
}

.projects-right {
    margin-left: 55% !important;
    margin-top:10%; 
    padding: 0;
}

.projects-right::after {
    content: '';
    display: block;
    height: 4rem;
}

.side { 
    position: absolute;
	top: 50%;
	left: 5rem;
	transform: translateY(-50%);
	opacity: 0;
    animation: fadeIn 1s ease-out 0.3s forwards;
}

.project {
    position: relative;
    border-radius: 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #fff;
    margin: 2rem 0;
    width: 70%;
    aspect-ratio: 1100 / 1200;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-image: url('../img/back.svg');
    transform: translateY(100vh);
    opacity: 0;
}

.project img {
    position: absolute;
    top: 7% ;
    right: 0px;
    transform: translateY(0);
}

.project h2, .project h3, .cover h3 {
    color: var(--blanc);
    font-family: 'Lato', sans-serif;	
}

.project h2 {
    padding: 16rem 0 1rem 1.5rem;
    font-size: 2.5rem;
    margin-bottom: 0 !important;
    line-height: 2.7rem;
    font-weight: 900;
}

.project h2 a {
  text-decoration: none;
  color: inherit;
}

.project:hover h2 a {
  text-decoration: underline;
}

.project h3 {
    font-style: normal;
    font-weight: 700;
}

.project p {
    color: var(--blanc);
}

.project-cta {
    width: 100%;
    box-sizing: border-box;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 30px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.project-cta-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.project-cta h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
}

.project-cta p {
    margin: 0;
    opacity: 0.8;
}

.project-cta a {
    background: #fff;
    color: #000;
    border: none;
    border-radius: 30px;
    padding: 10px 10px;
    margin-left: 0.5rem;
}

.project-cta-content img {
    position: relative;
    width: 1.5rem;
    height: auto;
    display: block;
    margin: 0 auto;
    left: 0;
    border-radius: 0;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(100vh); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

.project.animate {
    animation: slideUp 0.8s ease-out forwards;
}

/* ≤1200 */

@media (max-width: 1200px) {
.side {
    left: 4rem
}
.projects-left {
    width: 60%;
}
.projects-right {
    width: 40%;
    margin-left: 60% !important; 
}
.project {
    width: 80%;
}
}

/* ≤1050 */

@media (max-width: 1050px) {
  #projects-wrapper {
    position: static !important;
    display: flex !important;
    flex-direction: column !important;
    width: auto !important;
    height: auto !important;
  }

  .projects-left,
  .projects-right {
    position: static !important;
    float: none !important;
    clear: both !important;
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    transform: none !important;
    animation: none !important;
    height: auto !important;
    overflow: visible !important;
  }

  .projects-left {
    padding: 3rem 0 1.5rem 3rem !important;
  }

  .projects-right {
    padding: 0 0 0 3rem !important;
  }

  .projects-right {
    margin-top: 0rem !important;
  }

  .projects-right {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(400px, 0fr)) !important;
    gap: 3.5rem !important;
  }

  .projects-right .project {
    width: 100% !important;
    max-width: 400px !important;
    margin: 0 auto !important;
  }

  .project {
    margin-right: 1rem !important;
  }

  .project p {
    font-size: 0.9rem;
  }

  .projects-left .side,
  .projects-right .side {
    position: static !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    opacity: 1 !important;
    animation: none !important;
    margin-bottom: 1rem !important;
  }
}


/* ≤975 */
@media (max-width: 975px) {
    .projects-left {
        padding: 6rem 2rem 3rem 2rem !important;
    }
    
    .projects-right {
        grid-template-columns: 1fr !important;
    }

    .projects-right .project {
        max-width: none !important;
        width: 100% !important;
        margin-bottom: 2rem !important;
    }

    .projects-right {
        padding: 0 2rem !important;
        display: block !important;
    }

    .project h2 {
        font-size: 2rem;
        line-height: 2.2rem;
        padding-top: 12rem !important;
    }
}

/* Page projet */

  #project-wrapper {
  display: flex;
  min-height: 100vh;
}
.project-left, .project-right {
  width: 50%;
  min-height: 100vh;
}

.project-left .side {
  max-width: 40%;
  box-sizing: border-box;
}

.project-left .side a {
    color: #000;
}

.cover {
    position: relative;
    color: #fff;
    width: 100%;
    min-height: 100vh;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-image: url('../img/back.svg');
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5rem;
}

  .cover .project-icon {
    width: 65%;
  }

.cover .project-cta {
  width: 80%;
  margin: 0 auto;
}

.cover .project-cta-content h3 {
  font-style: normal;
  font-weight: 700;
  color: var(--blanc);
  font-family: 'Lato', sans-serif;
}
.cover .project-cta-content p {
  color: var(--blanc);
}

.store-links {
  display: flex;
  gap: 0.5rem;
}

.back-to-projects, .back-to-home {
  position: fixed;
  margin: 5rem;
  z-index: 1000;
  color: var(--bleu);
  font-family: 'Lato', sans-serif;	
  line-height: 1.3rem;
  text-decoration: none;
}

.back-to-projects:hover, .back-to-home:hover {
  text-decoration: underline;
}

@media (max-width: 900px) {
  #project-wrapper {
    flex-direction: column;
  }
  .back-to-projects {
    color: var(--blanc);
    margin:2rem;
  }

  .back-to-home {
    margin: 2rem;
  }
  .project-right {
    order: -1;  
    width: 100%;
    min-height: 40vh;
    z-index: 1;
  }
  .project-left {
    order: 0;
    width: 100%;
    min-height: auto;
  }
  .project-left .side {
    max-width: 680px;
    width: 100%;
    padding: 2rem;
    margin: 0 auto;
    box-sizing: border-box;
    position: relative;
    transform:none;
    left:0;
  }
  .cover {
    min-height: calc(40vh + env(safe-area-inset-top));
    padding-top: env(safe-area-inset-top);
    gap: 1rem;
  }

  .cover .project-icon {
    padding-top: 6rem;
    width: 80%;
  }

   .cover .project-cta {
    width: auto;
    margin: 2rem;
    box-sizing: border-box;
    border-radius: 20px;
    padding: 1rem;
  }

  .cover .project-cta-content h3 {
    font-size: 1rem;
  }

  .cover .project-cta-content p {
    font-size: 0.7rem;
    line-height: 0.8rem;
  }

  .store-links {
    gap: 0;
  }

  body::before {
    content: "";
    position: fixed;
    top: 0; left: 0; right: 0;
    height: constant(safe-area-inset-top);
    height: env(safe-area-inset-top);
    background: #000;
    z-index: 2;
    pointer-events: none;
  }
}