main {
  display: block;
  unicode-bidi: isolate !important;
}
#main{
  /* height: 600px; */
  /* margin: 0; */
  display: grid;
  grid-template-rows: 100px 700px 50px 300px 300px;
  grid-template-columns: 1fr repeat(13, 20px) 1fr;
  align-items: center;
  justify-items: center;
}

#main > *{
  border-top: 0;
}

main#carousel {
  grid-row: 2 / 3;
  grid-column: 1 / 16;
  width: 100vw;
  height: 450px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transform-style: preserve-3d;
  perspective: 600px;
  --items: 5;
  --middle: 3;
  --position: 1;
  pointer-events: none;
  transform: translate(-12rem, -3rem); 
  
  width: calc(100% - 4rem);
  height: 25vw;
  margin-left: 24em;
  padding: 0 5px;
}

main#carousel > .item {
  width: 40vw;
  height: 25vw;
}

main#carousel > .item > img{
  width: 40vw;
  height: 25vw;
  border: #000000 1px solid;
}





div.item {
  position: absolute;
  width: 500px;
    height: 400px;
    /* background-color: rgb(26, 156, 249); */
    --r: calc(var(--position) - var(--offset));
    --abs: max(calc(var(--r) * -1), var(--r));
    transition: all 0.25s linear;
    transform: rotateY(calc(-10deg * var(--r)))
    translateX(calc(-300px * var(--r)));
    z-index: calc((var(--position) - var(--abs)));
    }
    
div.item:nth-of-type(1) {
  --offset: 1;
}
div.item:nth-of-type(2) {
  --offset: 2;
  /* background-color: #f931a6; */
}
div.item:nth-of-type(3) {
  --offset: 3;
  /* background-color: #fd2222; */
}
div.item:nth-of-type(4) {
  --offset: 4;
  /* background-color: #fda72f; */
}
div.item:nth-of-type(5) {
  --offset: 5;
  /* background-color: #660a7a; */
}
div.item:nth-of-type(6) {
  --offset: 6;
  /* background-color: #199605; */
}
div.item:nth-of-type(7) {
  --offset: 7;
  /* background-color: #200a7a; */
}

input:nth-of-type(1) {
  grid-column: 2 / 3;
  grid-row: 3 / 4;
  height: 20px;
  width: 20px;
}
input:nth-of-type(1):checked ~ main#carousel {
  --position: 1;
}

input:nth-of-type(2) {
  grid-column: 4 / 5;
  grid-row: 3 / 4;
  z-index: 5;
  /* background-color: yellow; */
}
input:nth-of-type(2):checked ~ main#carousel {
  --position: 2;
}

input:nth-of-type(3) {
  grid-column: 6 /7;
  z-index: 5;
}
input:nth-of-type(3):checked ~ main#carousel {
  --position: 3;
}

input:nth-of-type(4) {
  grid-column: 8 / 9;
  z-index: 5;
}
input:nth-of-type(4):checked ~ main#carousel {
  --position: 4;
}

input:nth-of-type(5) {
  grid-column: 10 / 11;
  z-index: 5;
}
input:nth-of-type(5):checked ~ main#carousel {
  --position: 5;
}
    
input:nth-of-type(6) {
  grid-column: 12 / 13;
  z-index: 5;
}
input:nth-of-type(6):checked ~ main#carousel {
  --position: 6;
}

input:nth-of-type(7) {
  grid-column: 14 / 15;
  z-index: 5;
}
input:nth-of-type(7):checked ~ main#carousel {
  --position: 7;
}
  
#main > input[type="radio"]{
  grid-row: 3 / 4;
  opacity: 1;
  padding: 0 !important;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  cursor: pointer;
  border: #000000 1px solid;
  --r: calc(var(--position) - var(--offset));
  transform: translateY(calc(-8em + 4vw*0.85)); 
}


#main > input[type="radio"]:checked{
  background: #0077ff;
  border-color: #0077ff;
  }
  
  input[type="radio"]::before{
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    transform: scale(0);
    transition: 0.3s transform ease-in-out;
    box-shadow: inset 6px 6px #ffffff;
  }
  
  #main > input[type="radio"]:checked::before{
    transform: scale(1);
  }
    
  #paragraph-container .paragraphe {
    display: none;
    
    }

  #paragraph-container {
    padding: 0 20px;
    grid-row: 4 / 5;
    grid-column: 1 / 16;
    width: 100%;
    
    display: grid;
    /* grid-template-rows: 100px 500px 100px 10px 400px; */
    grid-template-columns: 200px 200px 200px 200px 200px;
    /* display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column; */
    /* border: red solid 1px; */
    
    }
    #paragraph-container div{
      grid-column: 2 / 6;
      }
      
input:nth-of-type(1):checked ~ #paragraph-container .paragraphe:nth-of-type(1),
input:nth-of-type(2):checked ~ #paragraph-container .paragraphe:nth-of-type(2),
input:nth-of-type(3):checked ~ #paragraph-container .paragraphe:nth-of-type(3),
input:nth-of-type(4):checked ~ #paragraph-container .paragraphe:nth-of-type(4),
input:nth-of-type(5):checked ~ #paragraph-container .paragraphe:nth-of-type(5),
input:nth-of-type(6):checked ~ #paragraph-container .paragraphe:nth-of-type(6),
input:nth-of-type(7):checked ~ #paragraph-container .paragraphe:nth-of-type(7) {
  display: block;
  font-size: 0.8em;
  width: 50vw;
  /* border: solid 1px blue;  */
}
  
b{
  font-size: 1em !important;
}
  
h3{
  line-height: 10px;
}
  /* Media query for smaller screens */
@media screen and (max-width: 1680px) {
  #main > input[type="radio"]{
    transform: translateY(calc(-28em + 20vw)) ; 
  }
}
@media screen and (max-width: 1300px) {
  main#carousel{
    transform: translate(-12rem, -8rem); 
  }

  
  #main > input[type="radio"]{
    transform: translateY(calc(-32em + 20vw)) ; 
  }

  .paragraphe {
    font-size: 0.8em;
    width: 50vw;
    transform: translate(2rem, -3rem); 
  }
}

@media screen and (max-width: 1100px) {
  main#carousel{
    transform: translate(-12rem, -8rem); 
    width: calc(70% - 4rem);
    height: 40vw;
  }
      
  main#carousel > .item, main#carousel > .item > img {
    width: 100%;
    height: 100%;
  }

  #main > input[type="radio"]{
    --pos: calc(-26em + 20vw); 
    transform: translateY(var(--pos)); 
  }

  .paragraphe{
    font-size: 0.8em;
    width: 60vw;
    transform: translate(-4rem, -5rem); 
  }
}

@media screen and (max-width: 700px) {
  main#carousel{
    transform: translate(-12rem, -11rem); 
    width: calc(80%);
    height: 50vw;
  }
  

  .paragraphe{
    font-size: 0.8em;
    width: 80vw !important;
    transform: translate(-12rem, -10rem); 
  }
}

@media screen and (max-width: 490px) {
  .credentials-link > button{
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

@media screen and (max-width: 365px) {
  .paragraphe{
    /* grid-column: 1 / 6 !important; */
    padding: 0 !important;
  }

  #paragraph-container{
    padding: 0;
  }

  
}

.credentials-link{
  border-bottom: none !important;
  text-align: center;
  display: block;
  margin-top: 3em;
}


.paragraphe{
  padding: 32px;
  height: 350px;
}