/* ══════════════════════════════════════════
   DamamMap — CSS Principal
   Viewport fixe 600×600px, fond noir (additive display)
   ══════════════════════════════════════════ */

:root {
  --cyan:      #00d4ff;
  --cyan-dim:  rgba(0, 212, 255, 0.25);
  --cyan-glow: rgba(0, 212, 255, 0.6);
  --green:     #00ff88;
  --orange:    #ff8c00;
  --red:       #ff3355;
  --white:     #ffffff;
  --gray-hi:   #eeeeee;
  --gray-mid:  #aaaaaa;
  --border:    rgba(255,255,255,0.5);
  --bg:        #000000;
  --bg-card:   rgba(0,0,0,0.55);
  --bg-card2:  rgba(0,0,0,0.70);
  --nav-h:     72px;
  --font:      'Courier New', 'Consolas', monospace;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

html, body {
  width: 600px;
  height: 600px;
  overflow: hidden;
  background: var(--bg);
  color: var(--white);
  font-family: var(--font);
  font-size: 16px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.9);
}

/* ── Utilitaires ── */
.hidden   { display: none !important; }
.active   { display: flex !important; }

/* ── Écrans ── */
.screen {
  position: absolute;
  inset: 0;
  width: 600px;
  height: 600px;
  display: none;
  flex-direction: column;
  background: var(--bg);
}
.screen.active { display: flex; }
.screen.hidden { display: none; }

/* ── Focus global (style MRBD) ── */
.focusable {
  transition: border-color 120ms ease, box-shadow 120ms ease;
  border: 2px solid transparent;
  outline: none;
  cursor: pointer;
  background: transparent;
  color: var(--white);
  font-family: var(--font);
}
.focusable:focus {
  border-color: var(--cyan) !important;
  box-shadow: 0 0 16px var(--cyan-glow), inset 0 0 8px var(--cyan-dim);
  outline: none;
}

/* ══════════════════════════════════════════
   ÉCRAN DÉMARRAGE
   ══════════════════════════════════════════ */
#screen-startup {
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.startup-glow {
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,212,255,0.12) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: pulse-glow 3s ease-in-out infinite;
  pointer-events: none;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 0.6; transform: translate(-50%,-50%) scale(1); }
  50%       { opacity: 1;   transform: translate(-50%,-50%) scale(1.15); }
}

.startup-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.startup-logo {
  width: 180px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--cyan);
  border-radius: 15px;
  padding: 6px;
  box-shadow: 0 0 24px var(--cyan-glow);
}
.startup-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.startup-logo-fallback {
  font-size: 30px;
  line-height: 1;
}

.startup-title {
  font-size: 20px;
  font-weight: bold;
  letter-spacing: 4px;
  color: var(--cyan);
  text-shadow: 0 0 10px var(--cyan-glow);
}

.startup-subtitle {
  font-size: 13px;
  color: var(--gray-mid);
  letter-spacing: 1px;
  text-align: center;
}

.startup-btn {
  margin-top: 5px;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 16px 40px;
  font-size: 18px;
  font-weight: bold;
  letter-spacing: 2px;
  border: 2px solid var(--cyan);
  border-radius: 8px;
  color: var(--cyan);
  text-transform: uppercase;
  transition: background 150ms ease;
  min-height: 35px;
}
.startup-btn:focus,
.startup-btn:hover {
  background: #A8E6CF;
  color: #2E7D32;
  box-shadow: 0 0 24px var(--cyan-glow);
}

.startup-hint {
  font-size: 12px;
  color: var(--cyan);
  letter-spacing: 1px;
}

/* ══════════════════════════════════════════
   ÉCRAN PRINCIPAL
   ══════════════════════════════════════════ */
#screen-main {
  display: flex;
  flex-direction: column;
}

.tab-content {
  flex: 1;
  height: calc(600px - var(--nav-h));
  overflow: hidden;
  display: none;
  flex-direction: column;
}
.tab-content.active { display: flex; }

/* En-tête des onglets (sauf carte) */
.tab-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--white);
}
.tab-icon  { font-size: 20px; }
.tab-title {
  font-size: 18px;
  font-weight: bold;
  letter-spacing: 2px;
  color: var(--cyan);
  text-transform: uppercase;
}

/* ══════════════════════════════════════════
   BARRE DE NAVIGATION
   ══════════════════════════════════════════ */
#main-nav {
  height: var(--nav-h);
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid var(--white);
  background: rgba(0,0,0,0.95);
  flex-shrink: 0;
}

.nav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: none;
  border-bottom: none;
  border-top: 3px solid transparent;
  padding: 6px 4px;
  font-family: var(--font);
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--gray-mid);
  text-transform: uppercase;
  transition: color 150ms, border-color 150ms;
  min-height: 88px;
}
.nav-btn-icon { font-size: 20px; line-height: 1; }
.nav-btn-label { font-size: 10px; }

.nav-btn.active,
.nav-btn:focus {
  color: var(--cyan);
  border-top-color: var(--cyan);
  background: rgba(0,212,255,0.06);
  box-shadow: none;
}
.nav-btn:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 16px var(--cyan-glow), inset 0 0 8px var(--cyan-dim);
}

/* ══════════════════════════════════════════
   BOUTONS GÉNÉRIQUES
   ══════════════════════════════════════════ */
.btn-primary {
  background: transparent;
  border: 2px solid var(--cyan);
  color: var(--cyan);
  border-radius: 6px;
  padding: 12px 24px;
  font-size: 16px;
  font-family: var(--font);
  letter-spacing: 1px;
  text-transform: uppercase;
}
.btn-primary:focus {
  background: rgba(0, 212, 255, 0.18);
  box-shadow: 0 0 24px var(--cyan-glow), inset 0 0 12px var(--cyan-dim);
  color: #fff;
  border-color: var(--cyan);
}

.btn-danger-sm {
  border: 1px solid var(--red);
  color: var(--red);
  border-radius: 4px;
  padding: 6px 12px;
  font-size: 12px;
  letter-spacing: 1px;
}
.btn-danger-sm:focus {
  border-width: 2px;
  border-color: var(--red) !important;
  background: rgba(255,51,85,0.18);
  box-shadow: 0 0 20px rgba(255,51,85,0.6), inset 0 0 10px rgba(255,51,85,0.15);
  color: #fff;
}

.btn-icon-sm {
  border: 1px solid var(--white);
  color: var(--gray-mid);
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 14px;
}
/* ══════════════════════════════════════════
   MODALE ALERTE PRUDENCE
   ══════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0,0,0,0.80);
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-overlay.hidden { display: none !important; }

.modal-box {
  background: #0a0a0a;
  border: 2px solid var(--orange);
  border-radius: 12px;
  padding: 24px 28px;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  box-shadow: 0 0 32px rgba(255,140,0,0.4);
}

.modal-icon { font-size: 36px; }

.modal-text {
  font-size: 15px;
  color: var(--white);
  text-align: center;
  line-height: 1.5;
  white-space: pre-line;
}

.modal-btn {
  border: 2px solid var(--orange);
  color: var(--orange);
  border-radius: 6px;
  padding: 10px 32px;
  font-size: 16px;
  font-family: var(--font);
  letter-spacing: 1px;
  text-transform: uppercase;
  min-height: 44px;
}
.modal-btn:focus {
  background: rgba(255,140,0,0.2);
  box-shadow: 0 0 16px rgba(255,140,0,0.5);
}