@import url('https://fonts.googleapis.com/css2?family=Bungee&family=Bungee+Spice&display=swap');
@font-face {font-family: Poppins-Medium; src: url('../font/Poppins-Medium.ttf');}

html {
    scroll-behavior: smooth;
}

html, body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

h1, h2{
    margin: 0;
    padding: 0;
}

:root {
    --blue-color : #004E98;
    --green-color : #549B57;
    --red-color : #BA3737;
    --light-grey-color : #D9D9D9;
    --dark-grey-color : #3D3D3D;
}

body {
    height: 2920px;
    width: 100%;

    position: absolute;
    top: 0;
    left: 0;

    display: flex;
    flex-direction: column;

    font-family: 'Poppins', sans-serif;
    background: #f4f4f4;
    color: black;

    opacity: 0;
    transition: opacity 1s ease;
}

/* Fade in body */
body.loaded {
    opacity: 1;
}

/* Annimation LIST */

/* Animation pour fade-in */
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

/* Animation pour fade-out */
.fade-out {
    animation: fadeOut 0.5s ease-in-out;
}

/* Keyframes pour fade-in */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Keyframes pour fade-out */
@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}
/* Fin annimation */


/* Header Section */

header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 250px;
}

header .logo-section{
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
}

header .logo-section img {
    z-index: 1;
}

header .title-section {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

header .title-section .title {
    /* font-family: 'Bungee', sans-serif;
    font-size: 70px;
    text-shadow: 4px 4px 4px black;
    margin: 0;
    color: white; */
    max-width: 500px;
    width: 100%;
    padding-top: 50px;
    margin-left: 10px;
    margin-right: 10px;
}

header .navigation-section{
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 50px;
    padding-top: 10px;
    
    display: flex;
    justify-content: flex-end;
    flex-direction: row;
}

/* Menu navigation */

header nav .nav-list {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
}

header nav .nav-list li {
    list-style: none;
    margin: 0 10px;
    font-family: 'Bungee', sans-serif;
    font-size: 15px;
}

header nav .nav-list li a {
    text-decoration: none;
    color: black;
    transition: all 0.3s ease-in-out;
}

header nav .nav-list li a:hover {
    color: var(--blue-color);
    /* text-shadow: 2px 2px 2px black; */
}

header nav ul {
    padding: 0;
}

header nav ul li a::after {
    content: '';
    display: block;
    width: 0;
    height: 2px;
    background: var(--blue-color);
    transition: width 0.3s;
}

header nav ul li a:hover::after {
    width: 100%;
}
header nav ul li a:hover {
    color: var(--blue-color);
}

/* Icon Top Left */

#playerIcon {
    width: 100px;
    height: 100px;
    transition: transform 0.5s ease, opacity 0.5s ease;
    cursor: pointer;
    margin: 10px;
}

#playerIcon:hover {
    transform: rotate(15deg) scale(1.05);
}

/* Classe temporaire pour l'animation spin lors du changement */
.spin-fade {
    animation: spinFade 0.5s ease;
}

@keyframes spinFade {
    0% {
        transform: rotate(0deg) scale(1);
        opacity: 0.5;
    }
    50% {
        transform: rotate(180deg) scale(1.2);
        opacity: 0.8;
    }
    100% {
        transform: rotate(360deg) scale(1);
        opacity: 1;
    }
}

/* ------- */

/* Main section */

main {
    position: absolute;
    top: 250px;
    left: 0;
    width: 100%;
    height: auto;
}

/* Countdown Section */

main .countdown-section {
    width: calc(100% + 20px);
    height: 400px;

    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;

    background: var(--blue-color);
    transform: rotate(-2deg);
    /* décaller de 10px vers la gauche */
    margin-left: -10px;
    overflow: hidden;
}

main .overlay {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    transform: rotate(2deg);
    width: 100%;
    height: 100%;
}

main .countdown-section h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 40px;
    text-shadow: 4px 4px 4px black;
    margin-bottom: 40px;
    color: white;
}

main .cubes {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: row;
    gap: 20px;
    margin: 0 auto;
    padding: 20px;

    color: var(--dark-grey-color);
}

main .cube{
    background-color: var(--blue-color);
    box-shadow: 0px 0px 10px var(--dark-grey-color);
    width: 100px;
    height: 100px;
    border-radius: 10px;

    border: 3px solid white; 

    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Bungee', sans-serif;
    font-size: 40px;
    color: white;
}

main .back-img {
    background-image: url("../assets/img/back_heads.png");
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    background-size: 100vw 100vh;
    -webkit-background-size: cover;
    transition: all 1s ease-in-out;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 400px;
    /* z-index: -1; */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;

    opacity: 25%;
}

/* Game Features Section */

main .game-features-section {
    width: 100%;
    height: 350px;

    color: var(--dark-grey-color);

    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: center;
}

main .game-features-section h2{
    font-family: 'Poppins', sans-serif;
    font-size: 40px;
    /* text-shadow: 4px 4px 4px black; */
    text-align: center;
    margin-bottom: 40px;
}

main .game-features-section .features-list {
    width: 100%;
    height: auto;

    display: flex;
    justify-content: space-evenly;
}

main .game-features-section .features-list .feature-item {
    width: 300px;
    height: 150px;
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    background-color: white;
    color: black;
    border-radius: 10px;
    box-shadow: 5px 5px 20px var(--dark-grey-color);
    justify-content: flex-start;
    padding: 15px;
    transition: all 0.3s ease-in-out;
}

main .game-features-section .features-list .feature-item:hover {
    box-shadow: 5px 5px 30px var(--dark-grey-color);
    transform: scale(1.05);
    transition: all 0.3s ease-in-out;
}

main .game-features-section .features-list .feature-item:active {
    transform: scale(0.95);
    transition: all 0.3s ease-in-out;
}

/* En dessous de 1100 px dde large */
@media (max-width: 1100px) {
    main .game-features-section {
        height: 700px;
    }

    main .game-features-section h2 {
        margin-bottom: 10px;
    }

    main .game-features-section .features-list {
        flex-direction: column;
        align-items: center;
    }

    main .game-features-section .features-list .feature-item {
        width: 80%;
        margin-bottom: 20px;
    }
}

main .game-features-section .features-list .feature-item img {
    width: 50px;
    height: 50px;
    margin-bottom: 10px;
}

main .game-features-section h3 {
    margin: 0;
}

/* Galery Section */

main .gallery-section {
    /* position: absolute; */
    width: 100%;
    height: 600px;

    color: var(--dark-grey-color);

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

main .gallery-section h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 40px;
    margin-bottom: 20px;
    margin-top: 20px;
}

main .gallery-section .gallery-grid {
    /* width: 80%; */

    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-gap: 10px;
    justify-items: center;
    align-items: center;

    margin-left: 15px;
    margin-right: 15px;
}

/* Si inférieur à 900px de large */
@media (max-width: 900px) {
    main .gallery-section {
        height: 1000px;
    }

    main .gallery-section .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

main .gallery-section .gallery-grid img {
    /* width: 100%; */
    width: 200px;
    aspect-ratio: 1 / 1; /* 👈 Cela force un carré */
    object-fit: cover;
    border-radius: 5px;
    box-shadow: 0px 0px 10px var(--dark-grey-color);
    transition: all 0.3s ease-in-out;
    cursor: pointer;
}

/* En dessous de 420 px de large */
@media (max-width: 420px) {
    main .gallery-section .gallery-grid img {
        width: 175px;
    }

    main .gallery-section {
        height: 900px;
    }
}

main .gallery-section .gallery-grid img:hover {
    transform: scale(1.05);
    transition: all 0.3s ease-in-out;
}
main .gallery-section .gallery-grid img:active {
    transform: scale(0.95);
    transition: all 0.3s ease-in-out;
}

/* Lightbox setup */
.lightbox {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Active = visible + animation */
.lightbox.active {
    visibility: visible;
    opacity: 1;
}

/* Image animée */
.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    transform: scale(0.8);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.lightbox.active .lightbox-content {
    transform: scale(1);
    opacity: 1;
}

/* Close button */
.lightbox .close {
    position: absolute;
    top: 5px;
    right: 20px;
    font-size: 40px;
    color: white;
    cursor: pointer;
    z-index: 1001;
}


/* Section Formulaire */

main .contact-section {
    /* width: 100%; */
    height: 650px;
    
    color: var(--dark-grey-color);

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

main .contact-section h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 40px;
    text-shadow: 4px 4px 4px black;
    margin-bottom: 40px;
}
  
.contact-section h1 {
    font-size: 40px;
    margin-bottom: 30px;
    font-weight: 700;
    background: linear-gradient(to right, #004080, #800000);
    -webkit-background-clip: text;
    color: transparent;
    text-align: center;
}
  
.contact-section .blue {
    color: #004080;
}
  
.contact-section .red {
    color: #800000;
}
  
.contact-section .form-box {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    margin: auto;
}

.contact-section .label {
    font-weight: bold;
    margin-bottom: 10px;
    display: block;
    text-align: left;
}
  
.contact-section .button-group {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}
  
.contact-section .option {
    flex: 1;
    padding: 12px;
    border-radius: 12px;
    border: none;
    background: #ddd;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}
  
.contact-section .option.active {
    background: #4caf50;
    color: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.contact-section .option.redback.active {
    background: var(--red-color);
    color: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}
  
.contact-section textarea {
    width: calc(100% - 24px);
    height: 120px;
    border-radius: 10px;
    border: 1px solid #ccc;
    padding: 12px;
    font-size: 1em;
    margin-bottom: 20px;
    resize: none;
}

.contact-section .submit {
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(to right, #004080, #4caf50);
    color: white;
    font-weight: bold;
    font-size: 1em;
    cursor: pointer;
    transition: 0.3s;
}
  
.contact-section .submit:hover {
    opacity: 0.9;
}

.contact-section .file-input {
    margin-top: 10px;
    margin-bottom: 20px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    transition: border-color 0.3s ease;
    width: 265px;
}

.contact-section .file-input:hover {
    border-color: var(--primary-color);
}

.hidden {
    display: none;
}

/* Section Beta */

main .beta-section {
    width: calc(100% + 20px);
    height: 400px;

    background: var(--blue-color);
    color: white;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    transform: rotate(2deg);
    /* décaller de 10px vers la gauche */
    margin-left: -10px;
    overflow: hidden;
}

main .container-beta {
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    transform: rotate(-2deg);
    width: 100%;
    height: 100%;
}

main .beta-section h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 40px;
}

main .beta-section button {
    background-color: white;
    color: var(--blue-color);
    border: none;
    font-size: 20px;
    font-family: 'Poppins', sans-serif;
    font-weight: bold;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease-in-out;

    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: row;
    padding: 10px;
}

main .beta-section button:hover {
    transform: scale(1.05);
    transition: all 0.3s ease-in-out;
}
main .beta-section button:active {
    transform: scale(0.95);
    transition: all 0.3s ease-in-out;
}

main .download-icon {
    width: 30px;
    margin-right: 10px;
}

/* Message de remerciement */
.thank-you-message {
    text-align: center;
    padding: 20px;
    background-color: #f0f8ff;
    border-radius: 15px;
    animation: fadeIn 0.8s ease-in-out;
}

main .thank-you-message h2 {
    color: var(--blue-color);
    font-family: 'Poppins', sans-serif;
    margin-bottom: 10px;
    text-shadow: none;
}

.thank-you-message p {
    color: #555;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* Toast beta pas dispo */
.beta-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100%);
    background-color: #ff5555;
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    font-size: 16px;
    opacity: 0;
    z-index: 999;
    transition: all 0.4s ease;
    min-width: 300px;
    text-align: center;
}

.beta-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.beta-toast.hidden {
    pointer-events: none;
}

/* --- Game Launch Buttons & Iframe --- */
.game-launch-btns {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 20px;
}
.launch-btn, .fullscreen-btn {
    background: linear-gradient(90deg, #004E98 0%, #549B57 100%);
    color: #fff;
    border: 2px white solid;
    border-radius: 10px;
    font-size: 1.2em;
    font-family: 'Poppins', sans-serif;
    font-weight: bold;
    padding: 15px 30px;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    transition: transform 0.15s, box-shadow 0.15s;
}
.launch-btn:hover, .fullscreen-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
}
.launch-btn:active, .fullscreen-btn:active {
    transform: scale(0.97);
}

.game-iframe {
    width: 100%;
    max-width: 900px;
    height: 500px;
    border-radius: 15px;
    margin: 0 auto;
    display: block;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    background: #222;
}
@media (max-width: 1000px) {
    .game-iframe {
        max-width: 100vw;
        height: 350px;
    }
}
@media (max-width: 600px) {
    .game-iframe {
        height: 220px;
    }
}

@media (max-width: 450px) {
    #launchGameBtn{
        margin-top: 20px;
    }
}

/* Footer Section */

footer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50px;

    display: flex;
    justify-content: center;
    align-items: center;

    color: var(--dark-grey-color);
}
