@import url(root.css);

@media (min-width: 691px) {
  .projectpage__data {
    padding-right: 2rem;
  }

  .project-carousel {
    flex: 1;
    min-width: 0;
    min-height: 0;
    display: flex;
    align-items: stretch;    
    margin: 1.4rem;
  }
  
  .project {
    flex: 1;
    min-width: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
  }
  
  .project__image-container {
    position: relative;
    flex: 1;                  
    min-height: 0;
    width: 100%;
  }
  
  .project__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;      
    object-position: center top;
    cursor: pointer;
  }
  
  .arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    padding: 0;
    border: 0;
    background: none;
    color: #000;
    line-height: 0;
    cursor: pointer;
    z-index: 2;
  }
  
  .arrow.prev { left: 0.5rem; }
  .arrow.next { right: 0.5rem; }
  
  .projectpage__data {
    position: fixed;
    bottom: 1.4rem;
    left: 1rem;
    max-width: 45dvw;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .project__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: right top; 
    cursor: pointer;
  }
  
}

@media (max-width: 690px) {
  .project-carousel {
    margin: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-height: calc(100dvh - 2rem);  /* image + légende tiennent dans l'écran */
    z-index: 100;
  }

  .project {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  .project__image-container {
    position: relative;
    flex: 1;
    min-height: 40dvh;
    width: 100%;
  }

  .project__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: left top;
  }

  .projectpage__data {
    position: static;
    max-width: none;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
  }

  .projectpage__data > * {
    width: 100%;
  }

  .arrow {
    display: none;
  }
}