/* === Variables Globales & Reset === */
:root {
    --gold: #D4AF37;
    --gold-glow: rgba(212, 175, 55, 0.9); /* Aura plus puissante */
    --font-cta: 'Philosopher', sans-serif;
    --font-signature: 'Caveat', cursive; /* Signature de tableau (plus nette) */
}

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

body, html {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: sans-serif;
    background-color: #000;
}

/* === Background Dynamique === */
body {
    background-image: url('../images/Smartphone.jpeg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: background-image 0.8s ease-in-out;
}

body::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.5), rgba(0,0,0,0.15) 50%, rgba(0,0,0,0.7));
    z-index: 1;
    pointer-events: none;
}

@media (min-width: 769px) {
    body {
        background-image: url('../images/fond-lobby.jpeg');
    }
}

/* === En-tête : Logo === */
.header {
    position: absolute;
    top: 15px; /* Encore plus haut, très proche du bord */
    width: 100%;
    text-align: center;
    z-index: 10;
}

.logo {
    max-width: 160px; /* Plus petit et plus élégant */
    height: auto;
    /* Double ombre portée pour un effet 3D (Relief qui détache le logo du fond) */
    filter: drop-shadow(0px 10px 15px rgba(0,0,0,0.9)) drop-shadow(0px 3px 5px rgba(0,0,0,0.8));
}

/* === Filigrane Signature === */
.watermark {
    position: absolute;
    bottom: 30px;
    left: 40px;
    font-family: var(--font-signature) !important;
    color: var(--gold);
    font-size: 1.6rem; /* Plus petit, comme une vraie signature */
    font-weight: 600;
    z-index: 10;
    opacity: 0.9;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
}

/* === Zone d'action (Bas-Droite) === */
.action-zone {
    position: absolute;
    bottom: 40px;
    right: 40px;
    display: flex;
    align-items: center; /* Aligne le CTA sur l'axe médian des boutons */
    gap: 25px;
    z-index: 10;
}

.cta-text {
    font-family: var(--font-cta);
    font-style: italic; /* Italique comme demandé */
    color: #FFFFFF;
    font-size: 1.8rem;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.9);
    font-weight: 400;
}

.buttons-container {
    display: flex;
    flex-direction: column; /* Boutons superposés */
    gap: 20px;
}

.action-btn {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    border: none;
    background-color: #1a1a1a;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Style des nouveaux SVGs modernes */
.action-btn svg {
    width: 28px;
    height: 28px;
    stroke: white;
    stroke-width: 1.5;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.action-btn:hover {
    transform: scale(1.08);
}

/* Effet "Aura Dorée" avec anneau épaissi */
.aura-doree {
    box-shadow: 0 0 20px 4px var(--gold-glow), inset 0 0 10px var(--gold-glow);
    border: 3px solid var(--gold); /* Le trait du cercle est beaucoup plus épais */
}

/* === Modale Pop-up (Glassmorphism) === */
dialog.glass-modal {
    margin: auto;
    width: 90%;
    max-width: 650px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    background: rgba(15, 15, 15, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    color: white;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.7);
}

dialog.glass-modal::backdrop {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
}

.modal-content {
    padding: 40px;
    position: relative;
    font-family: sans-serif;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: #aaa;
    font-size: 1.8rem;
    cursor: pointer;
    transition: color 0.2s;
}
.close-btn:hover {
    color: white;
}

.chat-history {
    min-height: 100px;
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 20px;
    font-family: var(--font-cta);
    font-size: 1.2rem;
    line-height: 1.6;
}

.hidden {
    display: none !important;
}

#keyboard-input-zone {
    display: flex;
    gap: 10px;
}

input[type="text"], input[type="email"], input[type="tel"] {
    width: 100%;
    padding: 15px;
    margin-top: 10px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    font-family: sans-serif;
    font-size: 1rem;
}

input::placeholder {
    color: #aaa;
}

.submit-btn {
    padding: 15px 30px;
    margin-top: 10px;
    border-radius: 10px;
    background: var(--gold);
    color: #000;
    font-weight: bold;
    font-size: 1.1rem;
    border: none;
    cursor: pointer;
    transition: filter 0.3s;
}

.submit-btn:hover {
    filter: brightness(1.2);
}

#audio-indicator {
    text-align: center;
    margin-top: 20px;
}
.pulse {
    display: inline-block;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 0 0 var(--gold-glow);
    animation: pulse 1.5s infinite cubic-bezier(0.66, 0, 0, 1);
    margin-right: 10px;
}
@keyframes pulse {
    to {
        box-shadow: 0 0 0 20px rgba(212, 175, 55, 0);
    }
}

/* === Indicateur Audio === */
.audio-waves {
    display: flex;
    gap: 5px;
    height: 40px;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
}

.wave {
    width: 6px;
    height: 10px;
    background-color: var(--gold);
    border-radius: 3px;
    animation: wave 1.2s infinite ease-in-out;
}

.wave:nth-child(2) { animation-delay: 0.2s; }
.wave:nth-child(3) { animation-delay: 0.4s; }
.wave:nth-child(4) { animation-delay: 0.6s; }
.wave:nth-child(5) { animation-delay: 0.8s; }

@keyframes wave {
    0%, 100% { height: 10px; }
    50% { height: 40px; }
}

/* === Ecran d'accueil (Welcome Screen) === */
.welcome-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease;
}

.welcome-content {
    text-align: center;
    color: white;
}

.welcome-content h2 {
    color: var(--gold);
    font-size: 2rem;
    margin-bottom: 30px;
    font-family: 'Philosopher', sans-serif;
}

.enter-btn {
    background-color: transparent;
    border: 2px solid var(--gold);
    color: var(--gold);
    padding: 12px 40px;
    font-size: 1.2rem;
    border-radius: 30px;
    cursor: pointer;
    font-family: 'Philosopher', sans-serif;
    transition: all 0.3s ease;
}

.enter-btn:hover {
    background-color: var(--gold);
    color: black;
}

/* --- CLAVIER FLOTTANT (ALMAYIA) --- */
dialog.clavier-modal { 
    margin: 0; padding: 20px; box-sizing: border-box;
    width: 100vw; height: 100vh; max-width: 100vw; max-height: 100vh;
    background: rgba(0,0,0,0.8); border: none; z-index: 2000;
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
dialog.clavier-modal::backdrop {
    background: transparent; /* Le dialog lui-même fait déjà le fond */
}
.modal-content-popup {
    background: transparent; border: none; padding: 0; box-shadow: none; z-index: 2000; box-sizing: border-box; width: 95%; max-width: 800px; margin: 10px auto 0 auto;
}
.popup-textarea { 
    width: 100%; height: 150px; background: rgba(0, 0, 0, 0.5); border: 1px solid #334155; 
    color: white; padding: 12px; border-radius: 8px; resize: none; box-sizing: border-box; 
    font-size: 16px; font-family: sans-serif; overflow-y: auto; 
}
.popup-textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 5px var(--gold); }
.popup-btn { 
    padding: 14px 0; border-radius: 8px; font-weight: bold; cursor: pointer; border: none; 
    font-size: 15px; width: 100%; 
    -webkit-appearance: none; appearance: none;
}
.btn-annuler { background: #334155; color: white; }
.btn-valider { background: var(--gold); color: #000000; }
.popup-actions-row { display: flex; justify-content: space-between; gap: 15px; margin-top: 15px; }
.popup-actions-row .popup-btn { flex: 1; }
