/* Style pour empêcher le lien global de modifier les styles des éléments internes */
.card-grid a {
    text-decoration: none;
    color: inherit;
}

.card-grid a:hover .card__title,
.card-grid a:hover .card__date,
.card-grid a:hover .card__img,
.card-grid a:hover .card__link {
    color: inherit;
}

/* Existing CSS rules here... */
*,
*::after,
*::before {
    box-sizing: border-box;
}

:root {
    font-size: 12px;
    --color-text: rgba(255, 252, 252, 0.95);
    --color-bg: #000000;
    --color-link: rgb(124 20 244 / 90%);
    --color-bg-date: rgb(96 56 178 / 48%);
    --color-link-hover: rgb(94 54 176 / 75%);
    --color-border: rgba(177,177,177,0.3);
}

body {
    margin: 0;
    color: var(--color-text);
    background-color: var(--color-bg);
    font-family: "ocr-a-std", monospace;
    text-transform: uppercase;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/* Page Loader */
.js .loading::before,
.js .loading::after {
    content: '';
    position: fixed;
    z-index: 1000;
}

.js .loading::before {
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-bg);
}

@keyframes loaderAnim {
    0% {
        transform: rotateY(0deg) rotateX(0deg);
    }
    50% {
        transform: rotateY(180deg) rotateX(180deg);
    }
    100% {
        transform: rotateY(360deg) rotateX(360deg);
    }
}

.js .loading::after {
    content: "\221E"; /* le symbole de l'infini */
    font-size: 100px; /* Taille du symbole */
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--color-link); /* Couleur du symbole */
    animation: loaderAnim 2s linear infinite;
    transform-style: preserve-3d; /* Permet à l'élément de conserver ses transformations 3D */
}

a {
    text-decoration: none;
    color: var(--color-link);
    outline: none;
    cursor: pointer;
}

a:hover {
    color: var(--color-link-hover);
    outline: none;
}

/* Styles des sections */
#projects,
#contact,

/* Styles pour le canvas */
#canvas1 {
    max-width: 400px;
    aspect-ratio: 1 / 1;
    height: auto;
    margin: 0 auto;
    grid-row: 2 / 3;
}

/* Styles pour les images du jeu */
#Player,
#Floor,
#FloorLeft,
#FloorRight {
    text-align: center;
    display: none;
}

/* Better focus styles from https://developer.mozilla.org/en-US/docs/Web/CSS/:focus-visible */
a:focus {
    /* Provide a fallback style for browsers
    that don't support :focus-visible */
    outline: none;
    background: lightgrey;
}

a:focus:not(:focus-visible) {
    /* Remove the focus indicator on mouse-focus for browsers
    that do support :focus-visible */
    background: transparent;
}

a:focus-visible {
    /* Draw a very noticeable focus style for
    keyboard-focus on browsers that do support
    :focus-visible */
    outline: 2px solid red;
    background: transparent;
}

.unbutton {
    background: none;
    border: 0;
    padding: 0;
    margin: 0;
    font: inherit;
    cursor: pointer;
}

.unbutton:focus {
    outline: none;
}

.frame {
    z-index: 1000;
    position: relative;
    width: 100%;
    display: grid;
    grid-template-columns: 100%;
    grid-template-areas: 'title' 'back' 'prev' 'sponsor';
    grid-gap: 1rem;
    justify-items: start;
    align-self: start;
    justify-self: start;
    pointer-events: none;
    align-items: center;
    padding: 2rem;
}

body #cdawrap {
    justify-self: start;
}

.frame a {
    pointer-events: auto;
}

.frame__title {
    grid-area: title;
    font-size: 1.25rem;
    margin: 0;
    font-weight: inherit;
}

.frame__back {
    grid-area: back;
}

.frame__prev {
    padding-bottom: 20px;
    color: aliceblue;
    grid-area: prev;
}

.marge {
    padding-bottom: 10px;
}

.contact-container {
    display: flex;
    align-items: center;
    justify-content: center; /* Centrer horizontalement */
    margin-bottom: 10px; /* Espacement sous l'image */
}

#contact2 {
    width: 50px; /* Ajustez la largeur de l'image si nécessaire */
    height: 50px; /* Ajustez la hauteur de l'image si nécessaire */
    filter: invert(100%);
    text-align: center;
}

.frame__prev2 {
    margin-left: 10px; /* Ajouter un espacement entre l'image et le lien */
    color: aliceblue;
    grid-area: prev;
}

.frame__demos {
    grid-area: demos;
    display: flex;
    gap: 1rem;
}

.title {
    font-weight: 400;
    font-size: clamp(2rem,8.5vw,8rem);
    text-align: center;
    margin: 14vh auto 5vh;
    display: flex;
    justify-content: center;
    width: min-content;
    border-bottom: 1px solid var(--color-border);
}

.title span::first-letter {
    opacity: 0.5;
}

.subtitle {
    text-align: center;
    font-weight: 400;
    font-size: clamp(1rem,4.25vw,4rem);
}

.card-grid {
    display: grid;
    margin: 8vh 0;
    grid-template-columns: 1fr;
    border-top: 1px solid var(--color-border);
}

.card:nth-child(3n - 1) {
    border-left: 1px solid var(--color-border);
    border-right: 1px solid var(--color-border);
}

.card {
    display: grid;
    grid-template-rows: auto 1fr auto;
    cursor: pointer;
    position: relative;
    min-height: 60vh;
    padding: 4vw;
    overflow: hidden;
    border-bottom: 1px solid var(--color-border);
    border-right: 1px solid var(--color-border);
}

#games {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    min-height: 60vh;
    padding: 4vw;
    overflow: hidden;
    border-bottom: 1px solid var(--color-border);
    border-right: 1px solid var(--color-border);
}

.card__img,
.card__img-wrap,
.card__img-inner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    filter: brightness(0.5); 
}

.card__img,
.card__img-inner {
    background-size: cover;
    background-position: 50% 50%;
}

.card__img,
.card__img-wrap {
    overflow: hidden;
}

.card__img {
    z-index: -1;
    pointer-events: none;
    --columns: 0;
    --rows: 0;
}

.js .card__img {
    opacity: 0;
    background-image: none !important;
}

.card__img-inner {
    filter: brightness(0.6);
    width: calc(100% + (var(--columns) - 1) * 1px);
    height: calc(100% + (var(--rows) - 1) * 1px);
}

.card__date {
    display: flex;
    align-content: center;
    align-items: center;
    line-height: 1;
    position: relative;
}

.card__date::before {
    content: '';
    width: 15px;
    height: 15px;
    border: 1px solid var(--color-link);
    background: var(--color-bg-date);
    margin: 0 10px 4px 0;
}

.card__date2 {
    align-content: center;
    align-items: center;
    line-height: 1;
}

.card__date2::before {
    content: '';
    width: 30px;
    height: 30px;
    border: 2px solid var(--color-link);
    background: var(--color-bg-date);
    margin: 0 10px 10px 20;
}

/* Styles pour la section d'informations supplémentaires */
.info {
    max-width: 800px;
    margin: 0 auto;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    padding: 30px;
    border-radius: 10px;
    background: var(--color-bg-date);
}

.info p {
    margin-bottom: 20px;
    font-size: 18px;
    line-height: 1.6;
}

.card__title {
    font-weight: 400;
    font-size: clamp(1.5rem,5vw,2.5rem);
    --color-text: rgba(255, 252, 252, 0.95);
}

.card__link {
    position: relative;
}

.card__link::before {
    content: '+';
    margin-right: 10px;
}

@media screen and (min-width: 33em) {
    .grid {
        grid-template-columns: repeat(2,1fr);
    }
}

@media screen and (min-width: 60em) {
    .frame {
        grid-template-columns: auto 1fr 1fr;
        grid-template-rows: auto auto auto;
        grid-template-areas: 'title title sponsor' 'back prev ...';
        align-content: space-between;
        justify-items: start;
        grid-row-gap: 1.5rem;
    }
    .card-grid {
        grid-template-columns: repeat(3,1fr);
    }
    body #cdawrap {
        justify-self: end;
    }
}

#footer {
    text-align: right;
}

:root::-webkit-scrollbar {
    display: none;
}

:root {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

#flèche {
    filter: invert(100%);
    margin: 0 -10px -10px 20;
    cursor: pointer;
}
#flèche2 {
    filter: invert(100%);
    position: absolute;
    right: 0px; /* Position horizontale fixe de la flèche 2 */
    margin: 0;
    cursor: pointer;
}

#image1 {
    transition: transform 0.5s ease, filter 0.5s ease;
}

#image1:hover {
    transform: translateY(-5px); /* Translation vers le haut de l'image de 5 pixels */
    filter: grayscale(50%) brightness(120%); /* Effet de décoloration et d'augmentation de luminosité */
}

#background-video {
    height: 130vh;
    width: 100%;
    object-fit: cover;
    position: fixed;
    left: 0;
    opacity: 0.1;
    top: 0;
    z-index: -1;
    margin: 0;
}
