/* Desktop */
@media screen and (min-width : 1280px) {
    main {
        margin-top: 12vh;
        margin-left: 12vw;
        width: 88vw;
        display: grid;
        grid-template-columns: repeat(22, 4vw);
        grid-template-rows: repeat(10, 4vw);
    }
    #dec {
        grid-area: 5/2/8/9;
        display: flex;
        flex-direction: column;
        gap: 1vh;
    }
    .deco-link {
        font-size: 1.8em;
        font-weight: 900;
        font-family: 'rocket';
        cursor: pointer;
    }
    #trait {
        grid-area: 6/10/7/22;
        border-top: 2px solid var(--main-color);
    }
    #dec-img {
        grid-area: 2/10/10/22;
        display: grid;
        grid-template-columns: repeat(24, 2vw);
        grid-template-rows: repeat(16, 2vw);
        cursor: pointer;
    }
    #dec-img > img {
        cursor: pointer;
        scale: 0.85;
        transition: all 1s ease;
    }
    #dec-img > img:first-of-type {
        grid-area: 1/1/8/8;
    }
    #dec-img > img:nth-of-type(2) {
        grid-area: 1/19/8/25;
    }
    #dec-img > img:nth-of-type(3) {
        grid-area: 3/9/8/16;
    }
    #dec-img > img:nth-of-type(4) {
        grid-area: 10/1/17/16;
        transform: translate(0.5turn);
    }
    #dec-img > img:last-of-type {
        grid-area: 10/16/17/25;
    }
    .zindx {
      z-index: 20;
    }
    .underline {
      text-decoration: underline;
    }
}
/* Tablette */
@media  screen and (min-width : 768px) and (max-width : 1279px) {
    #deco {
        width: 80%;
        margin-left: 10%;
        height: 70vh;
        display: flex;
        flex-direction: column;
        gap: 2vh;
        align-items: center;
        justify-content: space-around;
    }
    #dec-img {
        position: relative;
        overflow: hidden;
        width: 100%;
        height: 60vh;
        display: flex;
        justify-content: center;
        align-items: center;
        order: -1;
    }
    .deco-img {
        position: absolute;
        left: 0; top: 0;
        width: 100%;
        height: 60vh;
        object-fit: contain;
        opacity: 0;
        pointer-events: none;
        transition: transform 0.5s, opacity 0.5s;
        z-index: 1;
    }
    .deco-img.active {
        opacity: 1;
        pointer-events: auto;
        transform: translateX(0);
        z-index: 2;
    }
    .deco-img.slide-left {
        transform: translateX(-100%);
        opacity: 0;
    }
    .deco-img.slide-right {
        transform: translateX(100%);
        opacity: 0;
    }
    .deco-link {
        display: none;
        font-size: 1.5em;
        font-weight: 900;
        font-family: 'rocket';
        text-align: center;
        opacity: 0;
        transition: opacity 0.5s;
    }
    .deco-link.active {
        display: block;
        opacity: 1;
        z-index: 10;
    }
}

/* Mobile */
@media screen and (max-width : 767px) {
    #deco {
        width: 96%;
        margin-left: 2%;
        height: 70vh;
        display: flex;
        flex-direction: column;
        gap: 2vh;
        align-items: center;
        justify-content: space-around;
    }
    #dec-img {
        position: relative;
        overflow: hidden;
        width: 100%;
        height: 60vh;
        display: flex;
        justify-content: center;
        align-items: center;
        order: -1;
    }
    .deco-img {
        position: absolute;
        left: 0; top: 0;
        width: 100%;
        height: 60vh;
        object-fit: contain;
        opacity: 0;
        pointer-events: none;
        transition: transform 0.5s, opacity 0.5s;
        z-index: 1;
    }
    .deco-img.active {
        opacity: 1;
        pointer-events: auto;
        transform: translateX(0);
        z-index: 2;
    }
    .deco-img.slide-left {
        transform: translateX(-100%);
        opacity: 0;
    }
    .deco-img.slide-right {
        transform: translateX(100%);
        opacity: 0;
    }
    .deco-link {
        display: none;
        font-size: 1.5em;
        text-align: center;
        font-weight: 900;
        font-family: 'rocket';
        opacity: 0;
        transition: opacity 0.5s;
    }
    .deco-link.active {
        display: block;
        opacity: 1;
        z-index: 10;
    }
}