/* Général */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100%;
    background-color: #000;
    overflow: hidden;
}

.main-background {
    position: fixed;
    top: 0;
    left: 0;
    z-index: -1;
    width: 100%;
    height: 100%;
    min-width: 100vw;
    min-height: 100vh;
    background-image: url(../img/bg.gif);
    background-size: cover;
    background-position: center;
}

.main-background::before {
    content: "";
    display: block;
    position: relative;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
}


.grid-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    width: 80vw;
    max-width: 1600px;
}

.rectangle,
.rectangle-mobile {
    background-size: contain;
    background-repeat: no-repeat;
    width: 100%;
    height: auto;
    background-position: center;
    cursor: pointer;
    position: relative;
    z-index: 1;
    aspect-ratio: 16 / 9;
    transition: box-shadow 300ms ease-out;
    box-shadow: 10px 10px 10px rgba(0,0,0,.35);
}

.rectangle::before {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.35);
    transition: background-color 300ms ease-out;
}

.rectangle:hover::before {
    background-color: transparent;
}

/* Flèches */
.arrow {
    position: absolute;
    top: 50%;
    width: 3rem;
    height: 3rem;
    cursor: pointer;
    transform: translateY(-50%);
    z-index: 110;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    backdrop-filter: blur(6px);
    transition: background 200ms ease, transform 200ms ease, border-color 200ms ease;
}

.arrow svg {
    width: 40%;
    height: 40%;
}

.arrow.left {
    left: 4rem;
}

.arrow.right {
    right: 4rem;
}

.arrow.left:hover {
    transform: translate(-3px, -50%);
}

.arrow.right:hover {
    transform: translate(3px, -50%);
}

.arrow:hover {
    background: var(--arrow-color, #fff);
    border-color: var(--arrow-color, #fff);
}

.arrow:hover svg path {
    fill: #fff;
}


/* Points d'ancrage */
#rect1 {
    background-image: url('../img/kanto.png');
    transform-origin: top left;
}

#rect2 {
    background-image: url('../img/johto.png');
    transform-origin: top right;
}

#rect3 {
    background-image: url('../img/hoenn.png');
    transform-origin: bottom left;
}

#rect4 {
    background-image: url('../img/sinnoh.png');
    transform-origin: bottom right;
}

/*
#rect5 {
    background-image: url('../img/TheFallen-shiny-card.png');
    transform-origin: center center;
}

#rect6 {
    background-image: url('../img/kalos.png');
    transform-origin: center right;
}

#rect7 {
    background-image: url('../img/alola.png');
    transform-origin: bottom left;
}

#rect8 {
    background-image: url('../img/galar.png');
    transform-origin: bottom center;
}

#rect9 {
    background-image: url('../img/hisui.png');
    transform-origin: bottom right;
}
*/


#rect1:hover {
    box-shadow: 3px 3px 4px rgba(0,101,176, .45);
}

#rect2:hover {
    box-shadow: -3px 3px 4px rgba(236,128,30, .45);
}

#rect3:hover {
    box-shadow: 3px -3px 4px rgba(3,144,52, .45);
}

#rect4:hover {
    box-shadow: -3px -3px 4px rgba(226,68,68, .45);
}

/*
#rect5:hover {
    box-shadow: 0px 0px 8px rgba(80,0,120, .6);
}

#rect6:hover {
    box-shadow: -3px 0px 4px rgba(234,96,75, .45);
}

#rect7:hover {
    box-shadow: 3px -3px 4px rgba(151,198,228, .45);
}

#rect8:hover {
    box-shadow: 0px -3px 4px rgba(231,10,90, .45);
}

#rect9:hover {
    box-shadow: -3px -3px 4px rgba(137,202,146, .45);
}
*/

@keyframes skeleton-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

#skeleton-screen {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    pointer-events: none;
}

.skeleton-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    width: 80vw;
    max-width: 1600px;
}

.skeleton-card {
    aspect-ratio: 16 / 9;
    width: 100%;
    background: linear-gradient(90deg, #161616 25%, #222 50%, #161616 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
}
.skeleton-card:nth-child(2) { animation-delay: 0.15s; }
.skeleton-card:nth-child(3) { animation-delay: 0.3s; }
.skeleton-card:nth-child(4) { animation-delay: 0.45s; }

.mobile {
    display: none;
    width: 100vw;
    height: auto;
}

.leftsocials,
.rightsocials {
    position: absolute;
    top: 50%;
    left: 1.5vw;
    transform: translateY(-50%);
    height: 20%;
    width: 3%;
    display: flex;
    justify-content: space-between;
    flex-direction: column;
}

.rightsocials {
    left:auto;
    right: 0;
}

.leftsocials > a,
.rightsocials > a {
    display: flex;
    width: 50%;
    text-decoration: none;
    opacity: 0.85;
    transition: transform 300ms ease-out, opacity 300ms ease-out;
}

.leftsocials > a svg,
.rightsocials > a svg {
    width: 100%;
    height: auto;
    display: block;
}

.leftsocials > a:hover,
.rightsocials > a:hover {
    transform: scale(1.2);
    opacity: 1;
}