/* ============================
   RESET & BASE (MOBILE FIRST)
   ============================ */

* {
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, sans-serif;
}

html, body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

/* ============================
   BACKGROUND (WALLPAPER)
   ============================ */

body {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;

    background-image: url("assets/wallpaper.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    color: #ffffff;
}

/* Overlay sombre pour lisibilité */
body::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(10, 25, 55, 0.7);
    z-index: 0;
}

/* ============================
   CONTAINER (MOBILE)
   ============================ */

.container {
    position: relative;
    z-index: 1;

    width: 92%;
    max-width: 420px;
    padding: 26px;

    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(12px);

    border-radius: 16px;
    text-align: center;

    box-shadow: 0 20px 35px rgba(0, 0, 0, 0.4);
}

/* ============================
   TYPOGRAPHIE (MOBILE)
   ============================ */

h1 {
    margin: 0 0 16px;
    font-size: 1.7em;
    line-height: 1.2;
}

.hint {
    font-size: 0.9em;
    opacity: 0.85;
    margin-bottom: 22px;
}

/* ============================
   FORMULAIRES (MOBILE)
   ============================ */

textarea,
input[type="text"],
input[type="datetime-local"] {
    width: 100%;
    padding: 14px;
    margin-bottom: 16px;

    border: none;
    border-radius: 12px;

    font-size: 1em;
}

textarea {
    min-height: 110px;
    resize: vertical;
}

/* ============================
   BOUTONS (MOBILE / TOUCH)
   ============================ */

.btn {
    display: block;
    width: 100%;
    padding: 15px;

    margin-top: 10px;

    border-radius: 14px;
    text-decoration: none;

    font-size: 1em;
    font-weight: 600;
    text-align: center;

    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

/* Bouton principal */
.primary {
    background: linear-gradient(135deg, #00c6ff, #0072ff);
    color: #ffffff;
    border: none;
}

/* Bouton secondaire */
.secondary {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

/* Hover (desktop seulement, géré plus bas) */

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

.message {
    margin-top: 22px;
    padding: 16px;
    border-radius: 14px;
    font-size: 0.9em;
}

.message.success {
    background: rgba(0, 255, 160, 0.25);
}

.message.error {
    background: rgba(255, 0, 0, 0.25);
}

.message.locked {
    background: rgba(255, 200, 0, 0.25);
}

/* ============================
   TABLETTE (≥ 600px)
   ============================ */

@media (min-width: 600px) {
    .container {
        padding: 34px;
        max-width: 460px;
    }

    h1 {
        font-size: 2em;
    }

    .hint {
        font-size: 0.95em;
    }
}

/* ============================
   DESKTOP (≥ 1024px)
   ============================ */

@media (min-width: 1024px) {
    body {
        background-attachment: fixed;
    }

    .container {
        max-width: 480px;
        padding: 40px;
    }

    h1 {
        font-size: 2.2em;
    }

    .btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 22px rgba(0, 0, 0, 0.35);
    }
}


/* ============================
   CAPSULE ANIMATION
   ============================ */

.capsule {
    width: 100%;
    max-width: 360px;
    margin: 30px auto 0;
    perspective: 1000px;
}

.capsule-lid {
    height: 70px;
    background: linear-gradient(135deg, #00c6ff, #0072ff);
    border-radius: 18px 18px 8px 8px;
    transform-origin: top center;
    transition: transform 1s ease;
    box-shadow: 0 10px 25px rgba(0,0,0,0.4);
}

.capsule-body {
    background: rgba(255,255,255,0.15);
    border-radius: 0 0 18px 18px;
    padding: 22px;
    min-height: 120px;
    backdrop-filter: blur(10px);
    box-shadow: inset 0 10px 25px rgba(255,255,255,0.08);
}

/* Secret caché */
.secret {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 1s ease, transform 1s ease;
}

/* État ouvert */
.capsule.open .capsule-lid {
    transform: rotateX(-110deg);
}

.capsule.open .secret {
    opacity: 1;
    transform: translateY(0);
}

/* Glow effect */
.capsule.open {
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        box-shadow: 0 0 15px rgba(0,198,255,0.3);
    }
    to {
        box-shadow: 0 0 30px rgba(0,198,255,0.6);
    }
}

