* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: #0d0d0d;
    color: white;
    overflow-x: hidden;
}

/* =========================
   HOME PAGE
========================= */

.home-page {
    height: 100vh;
    width: 100%;
    background-image: url('../img/ecran_accueil.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.home-page::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 1;
}

.home-container {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 20px;
    transform: translateY(80px);
}

.subtitle {
    font-size: 1rem;
    opacity: 0.9;
    margin-top: 20px;
    margin-bottom: 30px;
}

.start-button {
    display: inline-block;
    padding: 16px 28px;
    border-radius: 14px;
    background: #8b6b2d;
    color: white;
    text-decoration: none;
    font-size: 1rem;
    transition: 0.3s;
}

.start-button:hover {
    transform: scale(1.05);
}

/* =========================
   INTRO PAGE
========================= */

.intro-page {
    min-height: 100vh;
    background-image: url('../img/background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.intro-container {
    width: 100%;
    max-width: 420px;
    text-align: center;
}

.key-image {
    width: 100%;
    max-width: 320px;
    margin-bottom: 20px;
}

.key-title {
    color: #d4af37;
    font-size: 2rem;
    margin-bottom: 25px;
}

.game-video {
    width: 100%;
    border-radius: 16px;
    margin-bottom: 25px;
    background: black;
}

.question {
    margin-bottom: 15px;
    font-size: 1.1rem;
}

/* =========================
   FORM ELEMENTS
========================= */

.intro-page input,
.etape input {
    padding: 14px;
    border-radius: 12px;
    border: none;
    margin-bottom: 15px;
    font-size: 1rem;
    width: 100%;
}

.intro-page button,
.etape button:not(.help-button) {
    padding: 14px;
    border-radius: 12px;
    border: none;
    background: #8b6b2d;
    color: white;
    width: 100%;
    font-size: 1rem;
}

/* =========================
   MESSAGES
========================= */

.hidden {
    display: none;
}

.message {
    margin-top: 15px;
    font-size: 1rem;
    color: white;
    opacity: 0;
    transition: 0.3s;
}

.message.show {
    opacity: 1;
}

.message.error {
    color: #ff4d4d;
}

.message.success {
    color: #7CFF6B;
}

/* =========================
   GENERIC ETAPE SYSTEM
========================= */

.etape {
    background: #0b0b0b;
    color: white;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.etape-container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
    text-align: center;
}

.etape-image {
    width: auto;
    max-width: 100%;
    max-height: 55vh;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    margin-bottom: 20px;
}

.etape-title {
    color: #d4af37;
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.etape-text {
    margin-bottom: 10px;
    font-size: 1rem;
}

.etape-hint {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 20px;
}

.gps-message {
    margin-top: 20px;
    text-align: center;
    opacity: 0.8;
    font-size: 0.95rem;
}


/* =========================
   SWIPE SYSTEM
========================= */

.slide-container {
    height: 100vh;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.slide.active {
    opacity: 1;
}

.full-image {
    width: 100%;
    max-width: 420px;
    border-radius: 12px;
}

.mission {
    margin-top: 20px;
    text-align: center;
}

.code-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
}

/* =========================
   PIN INPUT
========================= */

.pin-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
}

.pin {
    width: 50px;
    height: 50px;
    text-align: center;
    font-size: 1.5rem;
    border-radius: 10px;
    border: none;
    -webkit-appearance: none;
}

/* =========================
   ANIMATIONS
========================= */

@keyframes floating {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* =========================
   HELP SYSTEM
========================= */

.help-button {

    position: fixed;

    top: 20px;
    right: 20px;

    width: 70px !important;
    height: 70px !important;

    border: none;

    background: transparent !important;

    background-image: url('../img/help.png') !important;

    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: contain !important;

    padding: 0 !important;

    z-index: 99999;

    cursor: pointer;

}

.help-button img {
    display: none;
}

.help-menu {

    position: fixed;
    inset: 0;

    background: rgba(0,0,0,0.65);

    z-index: 9998;

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

}

.help-content {

    width: 100%;
    max-width: 500px;

    background: #111;

    border-radius: 25px 25px 0 0;

    padding: 25px;

    animation: helpUp 0.25s ease;

}

.help-content h2 {

    margin-bottom: 20px;
    text-align: center;

}

.help-option,
.help-close {

    width: 100%;

    padding: 16px;

    margin-bottom: 12px;

    border: none;

    border-radius: 14px;

    background: #8b6b2d;

    color: white;

    font-size: 1rem;

}

.help-close {

    background: #333;

}

@keyframes helpUp {

    from {

        transform: translateY(100%);

    }

    to {

        transform: translateY(0);

    }

}

.help-menu.hidden {
    display: none;
}

.help-text {

    margin-top: 20px;

    padding: 15px;

    border-radius: 12px;

    background: rgba(255,255,255,0.08);

    text-align: center;

    line-height: 1.5;

}

.help-info {

    background: rgba(255,255,255,0.06);

    border-radius: 12px;

    padding: 14px;

    margin-top: -4px;
    margin-bottom: 12px;

    font-size: 0.95rem;

    line-height: 1.5;

    color: rgba(255,255,255,0.9);

}



/* =========================
   PHOTO UPLOAD
========================= */

.photo-grid {
    display: flex;
    gap: 20px;
    margin: 20px 0;
}

.photo-box {
    width: 160px;
    height: 160px;
    background: black;
    border-radius: 12px;
    position: relative;
    cursor: pointer;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.photo-box .placeholder {
    color: white;
    font-size: 14px;
    text-align: center;
    opacity: 0.8;
    position: absolute;
}


/* =========================
   MAP
========================= */

.game-map {
    width: 100%;
    height: 400px;
    border-radius: 12px;
}