/* style.css — Warlike Browser : noir, bleu nuit profond, accents rouges */

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

html, body {
  height: 100vh;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #000;
  color: #e4e4e4;
  user-select: none;
}

#app {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

/* ---------- Barre d'onglets ---------- */
#tab-bar {
  display: flex;
  align-items: center;
  background: #05080f;
  border-bottom: 1px solid #1a2030;
  padding: 6px 8px 0 8px;
  min-height: 42px;
}

#tabs {
  display: flex;
  flex: 1;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.tab {
  display: flex;
  align-items: center;
  padding: 8px 14px;
  background: #0f1524;
  border: 1px solid transparent;
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  color: #8a8f9c;
  cursor: pointer;
  max-width: 220px;
  min-width: 140px;
  font-size: 13px;
  transition: background 0.15s ease, color 0.15s ease;
}

.tab:hover { background: #141b2e; color: #ccc; }

.tab.active {
  background: #0a0e1a;
  color: #fff;
  border-color: #1a2030;
  border-bottom-color: #0a0e1a;
  position: relative;
}

.tab.active::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: #dc143c;
  border-radius: 2px 2px 0 0;
}

.tab-title {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-right: 8px;
}

.tab-close {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #666;
  flex-shrink: 0;
}

.tab-close:hover { background: #dc143c; color: #fff; }

#new-tab-btn {
  background: transparent;
  color: #dc143c;
  border: none;
  font-size: 22px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  border-radius: 6px;
  flex-shrink: 0;
  transition: background 0.15s ease;
}

#new-tab-btn:hover { background: #1a2030; }

/* ---------- Barre de navigation ---------- */
#nav-bar {
  display: flex;
  align-items: center;
  background: #0a0e1a;
  padding: 8px 12px;
  gap: 8px;
  border-bottom: 1px solid #1a2030;
}

#nav-bar button {
  background: transparent;
  color: #8a8f9c;
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}

#nav-bar button:hover:not(:disabled) {
  background: #141b2e;
  color: #fff;
}

#nav-bar button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

#url-bar {
  flex: 1;
  background: #05080f;
  border: 1px solid #1a2030;
  border-radius: 20px;
  padding: 9px 18px;
  color: #e4e4e4;
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  user-select: text;
}

#url-bar:focus {
  border-color: #dc143c;
  box-shadow: 0 0 0 2px rgba(220, 20, 60, 0.15);
}

#go-btn {
  background: #dc143c;
  color: #fff;
}

#go-btn:hover:not(:disabled) {
  background: #b01030 !important;
  color: #fff !important;
}

/* ---------- Conteneur iframes ---------- */
#webviews-container {
  flex: 1;
  position: relative;
  background: #0a0e1a;
}

#webviews-container iframe {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: none;
  background: #0a0e1a;
}

#webviews-container iframe.active { display: block; }

/* ---------- Scrollbar onglets ---------- */
#tabs::-webkit-scrollbar { height: 4px; }
#tabs::-webkit-scrollbar-thumb { background: #1a2030; border-radius: 2px; }
#tabs::-webkit-scrollbar-thumb:hover { background: #dc143c; }
