:root {
  --bg-main: #0f172a;       
  --bg-card: #1e293b;       
  --bg-input: #0f172a;      
  --primary-orange: #f36e21;
  --primary-hover: #d95d14; 
  --text-main: #ffffff;     
  --text-muted: #94a3b8;
  --border-color: #334155;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Segoe UI', Tahoma, sans-serif; -webkit-tap-highlight-color: transparent; }

body { background-color: var(--bg-main); color: var(--text-main); display: flex; justify-content: center; align-items: center; min-height: 100vh; overflow: hidden; }

.kiosk-container { width: 100%; max-width: 900px; height: 100vh; background-color: var(--bg-card); display: flex; flex-direction: column; padding: 30px; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5); overflow-y: auto; }

/* Index : Accueil centré */
.home-layout { align-items: center; justify-content: center; text-align: center; height: 100%; gap: 20px; }
.welcome-text { font-size: 2.5rem; font-weight: 600; color: var(--text-muted); margin-bottom: 10px; }
.logo-large { max-width: 450px; margin-bottom: 20px; }

/* Horloge */
.header-clock { text-align: center; margin-bottom: 40px; }
#clock-time { font-size: 5rem; font-weight: bold; color: var(--primary-orange); letter-spacing: 2px; }
#clock-date { font-size: 1.8rem; color: var(--text-muted); text-transform: capitalize; }

/* Header Standard (Pages Entrée/Sortie) */
.kiosk-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid var(--border-color); padding-bottom: 20px; margin-bottom: 30px; }
.btn-back { color: var(--primary-orange); text-decoration: none; font-size: 1.5rem; font-weight: bold; padding: 10px; }
.logo-small { max-height: 60px; }

/* Titres */
.section-title { font-size: 2rem; margin-bottom: 20px; text-align: center; color: var(--text-main); }
.subtitle { font-size: 1.2rem; text-align: center; color: var(--text-muted); margin-bottom: 30px; }

/* Boutons */
.menu-actions { display: flex; gap: 30px; justify-content: center; width: 100%; }
.btn-action { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 15px; flex: 1; max-width: 350px; padding: 40px 20px; border-radius: 16px; text-decoration: none; font-size: 2rem; font-weight: bold; color: white; transition: transform 0.1s; }
.btn-action:active { transform: scale(0.95); }
.btn-entry { background-color: #16a34a; }
.btn-exit { background-color: var(--primary-orange); }

/* Formulaires */
.touch-form { display: flex; flex-direction: column; gap: 20px; padding-bottom: 300px; /* Espace pour le clavier */ }
.form-group { display: flex; flex-direction: column; gap: 10px; }
.form-group label { font-size: 1.2rem; color: var(--text-muted); font-weight: 600; }
.input-touch { width: 100%; padding: 18px 20px; font-size: 1.3rem; border-radius: 10px; border: 2px solid var(--border-color); background-color: var(--bg-input); color: white; outline: none; }
.input-touch:focus { border-color: var(--primary-orange); }

/* Toggle Prestataire/Visite */
.toggle-switch { display: flex; background-color: var(--bg-input); border-radius: 10px; padding: 5px; gap: 5px; border: 1px solid var(--border-color); }
.btn-toggle { flex: 1; padding: 16px; border: none; background: transparent; color: var(--text-muted); font-weight: bold; border-radius: 8px; font-size: 1.1rem; cursor: pointer; }
.btn-toggle.active { background-color: var(--primary-orange); color: white; }

/* Bouton validation */
.btn-submit { background-color: #16a34a; color: white; border: none; font-weight: bold; border-radius: 10px; padding: 20px; font-size: 1.5rem; width: 100%; cursor: pointer; margin-top: 20px; }
.btn-submit:active { transform: scale(0.98); }

/* Modales */
.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background-color: rgba(0, 0, 0, 0.85); display: flex; justify-content: center; align-items: center; z-index: 10000; }
.modal-content { background-color: var(--bg-card); padding: 40px; border-radius: 16px; text-align: center; max-width: 600px; width: 95%; border: 1px solid var(--border-color); display: flex; flex-direction: column; max-height: 90vh; }
.modal-buttons { display: flex; gap: 15px; margin-top: 30px; justify-content: center; }
.btn-cancel { background-color: var(--border-color); color: white; padding: 15px 30px; border-radius: 10px; border: none; font-size: 1.2rem; font-weight: bold; }

/* Liste de sélection de l'hôte (Modale) */
.host-list { display: flex; flex-direction: column; gap: 10px; overflow-y: auto; margin-top: 20px; padding-right: 10px; }
.host-item { background-color: var(--bg-input); border: 2px solid var(--border-color); color: white; padding: 20px; border-radius: 10px; font-size: 1.3rem; font-weight: bold; text-align: left; cursor: pointer; transition: background 0.1s; }
.host-item:active { background-color: var(--primary-orange); border-color: var(--primary-orange); }

.selected-badge { background-color: rgba(243, 110, 33, 0.2); color: var(--primary-orange); border: 1px solid var(--primary-orange); padding: 15px; border-radius: 10px; font-size: 1.3rem; font-weight: bold; text-align: center; margin-top: 10px; }

/* Grille de Sortie */
.visitors-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.visitor-card-btn { background: var(--bg-input); border: 2px solid var(--border-color); padding: 25px; border-radius: 12px; color: white; text-align: left; cursor: pointer; }
.visitor-card-btn:active { border-color: var(--primary-orange); transform: scale(0.98); }
.visitor-name { font-size: 1.5rem; font-weight: bold; color: var(--primary-orange); }
.visitor-company { font-size: 1.1rem; color: var(--text-muted); margin-top: 5px; }

/* Clavier virtuel */
.simple-keyboard { background-color: #1e293b !important; border-top: 2px solid var(--primary-orange) !important; padding: 10px !important; }
.hg-button { background-color: #334155 !important; color: #ffffff !important; height: 60px !important; font-size: 1.5rem !important; border: none !important; box-shadow: 0 2px 0 rgba(0,0,0,0.3) !important; }
.hg-button:active { background-color: var(--primary-orange) !important; }