/* --- 1. CONFIGURATION DE BASE --- */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body {
    background-color: #000000; color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    height: 100vh; width: 100vw; overflow: hidden;
    display: flex; justify-content: center; align-items: center;
}

/* --- 2. GESTION DES ÉCRANS --- */
.screen {
    display: none; flex-direction: column; align-items: center; justify-content: center;
    height: 100%; width: 100%; position: relative; z-index: 10;
}
.screen.active { display: flex; animation: fadeIn 0.6s ease-in-out; }
.container { display: flex; flex-direction: column; align-items: center; width: 100%; }

/* --- 3. LE SAS DE CONNEXION --- */
.input-group { margin-bottom: 20px; width: 80%; max-width: 300px; }
input {
    width: 100%; padding: 18px; background: #111111; border: 1px solid #333333;
    border-radius: 16px; color: #ffffff; font-size: 16px; text-align: center; outline: none; transition: border-color 0.3s;
}
input:focus { border-color: #666666; }
input::placeholder { color: #555555; }
#login-btn {
    padding: 16px 50px; background: #ffffff; color: #000000; border: none;
    border-radius: 30px; font-size: 16px; font-weight: 600; cursor: pointer; margin-top: 15px; transition: transform 0.1s;
}
#login-btn:active { transform: scale(0.95); }
#error-msg { color: #ff4444; margin-top: 20px; font-size: 14px; opacity: 0; transition: opacity 0.3s; }
#error-msg:not(.hidden) { opacity: 1; }
.hidden { display: none !important; }

/* --- 4. LA CINÉMATIQUE HOUBI (Ambiance Boudoir) --- */
#cinematic-screen { background-color: #000000; position: relative; overflow: hidden; }

/* Aura plus profonde, velours rouge et ombres */
.sensual-aura {
    position: absolute; width: 150vw; height: 150vh;
    background: radial-gradient(circle, rgba(100, 0, 20, 0.3) 0%, rgba(30, 0, 10, 0.1) 40%, rgba(0, 0, 0, 1) 70%);
    animation: breathe 5s ease-in-out infinite alternate;
    filter: blur(20px);
}

.cinematic-text {
    position: relative; z-index: 2; 
    font-size: 42px; 
    font-weight: 100; /* Très fin, très élégant */
    font-style: italic; /* Donne du mouvement */
    letter-spacing: 12px;
    color: #ffcccc; /* Rose poudré très léger */
    text-transform: uppercase;
    /* L'effet néon très subtil et érotique (rouge sang) */
    text-shadow: 0 0 10px rgba(220, 20, 60, 0.8), 0 0 30px rgba(139, 0, 0, 0.6);
    opacity: 0; 
    filter: blur(15px); 
    animation: sensualReveal 4.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* --- 5. LE MENU PRINCIPAL --- */
header { position: absolute; top: 50px; right: 20px; width: 100%; display: flex; justify-content: flex-end; }
#logout-btn { background: none; border: none; color: #444444; font-size: 28px; cursor: pointer; padding: 10px; transition: color 0.3s; }
#logout-btn:active { color: #ffffff; }
.question-title { font-size: 34px; font-weight: 300; letter-spacing: 1px; margin-bottom: 60px; }

/* --- 6. LA PYRAMIDE --- */
.pyramid { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.pyramid-top { display: flex; justify-content: center; }
.pyramid-base { display: flex; justify-content: center; gap: 30px; }
.emoji-btn {
    font-size: 55px; background: #0a0a0a; border: 2px solid #222222; border-radius: 50%;
    width: 110px; height: 110px; display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: all 0.2s ease;
}
.emoji-btn:active { transform: scale(0.9); background: #1a1a1a; }
.emoji-btn.selected { border-color: #ffffff; background: #1a1a1a; box-shadow: 0 0 25px rgba(255, 255, 255, 0.15); transform: scale(1.1); }
.emoji-btn.dimmed { opacity: 0.3; transform: scale(0.9); pointer-events: none; }

/* --- L'EFFET DE PULSATION DES EMOJIS (BEAUCOUP PLUS DYNAMIQUE) --- */
@keyframes pulse-emoji {
    0% { 
        transform: scale(1) translateY(0px); 
        box-shadow: 0 0 0 rgba(255, 255, 255, 0); 
    }
    50% { 
        transform: scale(1.18) translateY(-8px); /* Grossit de 18% et monte de 8 pixels */
        box-shadow: 0 15px 35px rgba(255, 255, 255, 0.4); /* Grosse lumière diffuse en dessous */
    }
    100% { 
        transform: scale(1) translateY(0px); 
        box-shadow: 0 0 0 rgba(255, 255, 255, 0); 
    }
}

.emoji-btn.pulsing {
    /* On a accéléré l'animation : 1.6 seconde au lieu de 2.5s */
    animation: pulse-emoji 1.6s infinite ease-in-out;
}

/* On désynchronise légèrement les 3 boutons pour que ce soit plus organique et moins "robotique" */
#btn-sex.pulsing { animation-delay: 0s; }
#btn-chill.pulsing { animation-delay: 0.2s; }
#btn-calin.pulsing { animation-delay: 0.4s; }

#status-area {
    margin-top: 40px; text-align: center; color: #ffffff; font-size: 16px; font-weight: 500;
    background: rgba(0, 0, 0, 0.65); padding: 12px 24px; border-radius: 30px;
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1); box-shadow: 0 5px 15px rgba(0, 0, 0, 0.8);
    position: relative; z-index: 100;
}

/* --- NOUVEAU : LA RÉVÉLATION (LE BOOM) --- */
#reveal-area {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    width: 100%; animation: popIn 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.reveal-title { font-size: 28px; font-weight: 600; color: #ffeb3b; margin-bottom: 40px; text-shadow: 0 0 20px rgba(255, 235, 59, 0.5); }
.couple-emojis { display: flex; gap: 50px; justify-content: center; }
.person-reveal { display: flex; flex-direction: column; align-items: center; }
.person-name { font-size: 16px; color: #888; margin-bottom: 15px; letter-spacing: 2px; text-transform: uppercase; }
.revealed-emoji {
    font-size: 70px; background: #111; width: 130px; height: 130px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 40px rgba(255, 255, 255, 0.2);
}

/* --- LA PLUIE D'EMOJIS --- */
#emoji-rain-container {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    pointer-events: none; z-index: 1; overflow: hidden;
}
.physics-emoji { position: absolute; top: 0; left: 0; display: flex; align-items: center; justify-content: center; user-select: none; opacity: 0.8; will-change: transform; }

/* --- ANIMATIONS --- */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes breathe { 
    0% { transform: scale(0.9); opacity: 0.4; } 
    100% { transform: scale(1.1); opacity: 1; } 
}@keyframes popIn { 0% { transform: scale(0.5); opacity: 0; } 80% { transform: scale(1.1); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
@keyframes sensualReveal { 
    0%   { opacity: 0; filter: blur(20px); transform: scale(0.95); } 
    40%  { opacity: 1; filter: blur(0px); transform: scale(1); } 
    70%  { opacity: 1; filter: blur(0px); transform: scale(1.02); } 
    100% { opacity: 0; filter: blur(15px); transform: scale(1.05); } 
}

/* --- LE BOUTON VOIR MOT DE PASSE --- */
.password-group {
    position: relative; /* Permet de placer l'œil à l'intérieur */
}

/* On laisse un peu de place à droite pour que le texte ne passe pas sous l'œil */
#password {
    padding-right: 45px; 
}

#toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%); /* Le centre parfaitement à la verticale */
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    outline: none;
    opacity: 0.6; /* Un peu transparent pour rester discret */
    transition: opacity 0.2s;
}

#toggle-password:active {
    opacity: 1; /* S'allume quand on clique dessus */
}

/* --- LE MESSAGE DE MATCH / DÉCALAGE --- */
.match-message {
    font-size: 18px;
    color: #aaaaaa;
    margin-top: -25px; /* Le rapproche du titre */
    margin-bottom: 40px;
    text-align: center;
    font-weight: 300;
    letter-spacing: 1px;
    max-width: 80%;
    animation: fadeIn 1.5s ease-in-out 0.5s both; /* Apparaît doucement avec 0.5s de retard */
}

/* --- POPUP INSTALLATION IOS --- */
#ios-install-prompt {
    position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
    width: 90%; max-width: 400px; z-index: 1000;
    background: rgba(20, 0, 5, 0.85);
    backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 50, 80, 0.3);
    border-radius: 20px; padding: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), 0 0 20px rgba(220, 20, 60, 0.2);
    display: flex; flex-direction: column; align-items: center; text-align: center;
    animation: statusSlideUp 0.6s ease-out;
}
.install-title { font-size: 18px; font-weight: 300; margin-bottom: 15px; color: #fff; }
.install-title span { font-style: italic; font-weight: 100; letter-spacing: 2px; color: #ffcccc; text-shadow: 0 0 10px rgba(220, 20, 60, 0.8); }
.install-steps { font-size: 14px; color: #ccc; line-height: 1.4; }
#close-install-btn { position: absolute; top: 10px; right: 15px; background: none; border: none; color: #888; font-size: 18px; cursor: pointer; }

/* --- LE MESSAGE ÉNIGMATIQUE DU LOGIN --- */
.enigmatic-text {
    margin-top: 30px;
    color: #777777; /* On a éclairci le gris (Avant: #333333) */
    font-size: 13px; /* Un tout petit peu plus grand */
    font-weight: 300;
    font-style: italic;
    letter-spacing: 1.5px;
    opacity: 0.8; /* Mieux visible (Avant: 0.6) */
    transition: all 0.5s ease;
    cursor: default;
}

.enigmatic-text:hover {
    color: #cc0000; /* Un rouge plus vif au toucher */
    opacity: 1;
    text-shadow: 0 0 8px rgba(200, 0, 0, 0.6);
}

/* --- FORCER LE MODE PORTRAIT (ÉCRAN DE BLOCAGE) --- */
#landscape-warning {
    display: none; /* Caché par défaut */
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background-color: #000000;
    z-index: 9999; /* S'affiche au-dessus de tout le reste */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.warning-icon { 
    font-size: 50px; 
    margin-bottom: 20px; 
    display: inline-block;
    animation: rotatePhone 2s infinite ease-in-out; 
}

.warning-content p { 
    font-size: 24px; 
    font-weight: 600; 
    margin-bottom: 10px; 
    color: #ffcccc; 
    letter-spacing: 1px;
}

.warning-content span { 
    font-size: 14px; 
    color: #888888; 
}

@keyframes rotatePhone {
    0% { transform: rotate(-90deg); }
    50% { transform: rotate(0deg); }
    100% { transform: rotate(-90deg); }
}

/* La magie CSS : Si c'est un écran TACTILE (pointer: coarse) ET qu'il est couché */
@media (pointer: coarse) and (orientation: landscape) {
    #landscape-warning {
        display: flex !important;
    }
    #emoji-rain-container, .screen, header, #ios-install-prompt {
        display: none !important;
    }
}

/* --- ÉCRAN DE TRANSITION & HINT --- */
#transition-screen {
    display: none; /* Caché par défaut */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #000000;
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 50;
}

#transition-screen.active {
    display: flex;
}

.waiting-hint {
    position: relative;
    z-index: 5;
    font-size: 18px;
    font-weight: 200;
    font-style: italic;
    letter-spacing: 2px;
    color: #ffcccc;
    text-align: center;
    padding: 0 30px;
    text-shadow: 0 0 15px rgba(220, 20, 60, 0.6);
    animation: fadeInOut 3.5s ease-in-out forwards;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: scale(0.95); filter: blur(10px); }
    30% { opacity: 1; transform: scale(1); filter: blur(0px); }
    70% { opacity: 1; transform: scale(1); filter: blur(0px); }
    100% { opacity: 0; transform: scale(1.05); filter: blur(5px); }
}

/* --- DÉSACTIVER LA SÉLECTION (Pour l'appui long) --- */
* {
    -webkit-user-select: none; /* Safari iOS */
    user-select: none; 
}

/* --- MODAL QR CODE --- */
#qr-modal {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000; display: flex; align-items: center; justify-content: center;
    backdrop-filter: blur(10px);
}

.qr-content {
    display: flex; flex-direction: column; align-items: center;
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.qr-content img {
    width: 280px; height: 280px;
    border-radius: 20px;
    border: 2px solid rgba(220, 20, 60, 0.5);
    box-shadow: 0 0 30px rgba(220, 20, 60, 0.3);
    margin-bottom: 25px;
}

.qr-content p {
    color: #ffcccc; font-style: italic; font-weight: 200;
    letter-spacing: 2px; margin-bottom: 30px;
    text-shadow: 0 0 10px rgba(220, 20, 60, 0.8);
}

#close-qr-btn {
    background: none; border: 1px solid #333; color: #888;
    padding: 10px 30px; border-radius: 20px; font-size: 14px;
}