/* RESET & BASE */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
  background-color: #0b0e14;
  color: #e5e7eb;
  height: 100vh;
  overflow: hidden;
}

.hidden {
  display: none !important;
}

/* PAGE DE CONNEXION */
.login-card {
  width: 360px;
  margin: 80px auto;
  background: #161b22;
  padding: 30px;
  border-radius: 12px;
  border: 1px solid #30363d;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  text-align: center;
}

.login-header h2 {
  font-size: 18px;
  margin-top: 10px;
  color: #f0f6fc;
}

.login-header p {
  font-size: 13px;
  color: #8b949e;
  margin-bottom: 20px;
}

.login-logo {
  width: 200px;
  height: 200px;
  object-fit: contain;
}

.input-group {
  text-align: left;
  margin-bottom: 15px;
}

.input-group label {
  display: block;
  font-size: 12px;
  color: #8b949e;
  margin-bottom: 5px;
}

.input-group input {
  width: 100%;
  padding: 10px;
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 6px;
  color: #fff;
  outline: none;
}

.input-group input:focus {
  border-color: #58a6ff;
}

.btn-login {
  width: 100%;
  padding: 10px;
  background: #238636;
  border: none;
  border-radius: 6px;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-login:hover {
  background: #2ea043;
}

/* INTERFACE PRINCIPALE */
.portal-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

/* BARRE SUPÉRIEURE */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #161b22;
  color: #f0f6fc;
  padding: 8px 16px;
  border-bottom: 1px solid #30363d;
  height: 48px;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 280px;
}

.portal-title {
  font-size: 13px;
  font-weight: 600;
  color: #c9d1d9;
}

.nav-home-btn {
  background: #21262d;
  color: #c9d1d9;
  border: 1px solid #30363d;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s;
}

.nav-home-btn:hover {
  background: #1f6feb;
  color: #ffffff;
  border-color: #388bfd;
}

/* TEXTE DÉFILANT */
.ticker-wrap {
  flex: 1;
  overflow: hidden;
  margin: 0 20px;
  white-space: nowrap;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.ticker-text {
  display: inline-block;
  padding-left: 100%;
  animation: ticker 25s linear infinite;
  color: #8b949e;
  font-size: 13px;
}

@keyframes ticker {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-100%, 0, 0); }
}

.right-section {
  display: flex;
  align-items: center;
  gap: 12px;
}

.clock {
  font-size: 12px;
  font-family: monospace;
  color: #8b949e;
}

.btn-logout {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
}

/* CORPS PRINCIPAL */
.main-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* SIDEBAR / MENU */
.sidebar {
  width: 200px;
  background-color: #0d1117;
  border-right: 1px solid #21262d;
  padding: 16px 8px;
  display: flex;
  flex-direction: column;
}

.sidebar-title {
  font-size: 11px;
  font-weight: 700;
  color: #484f58;
  margin-bottom: 12px;
  padding-left: 8px;
  letter-spacing: 0.5px;
}

.dock {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dock-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 12px;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: #c9d1d9;
  font-size: 13px;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
}

.dock-item:hover {
  background-color: #161b22;
}

.dock-item.active {
  background-color: #1f6feb;
  color: #ffffff;
}

/* ZONE DE CONTENU CENTRAL (DESKTOP) */
.desktop-zone {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  background-color: #0b0e14;
}

/* VUE D'ACCUEIL AVEC FILIGRANE */
.home-watermark-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 420px;
  text-align: center;
}

.home-logo-bg {
  width: 200px;
  height: auto;
  opacity: 0.20; /* Transparence équilibrée */
  filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.05));
  margin-bottom: 24px;
  user-select: none;
}

.home-title {
  font-size: 20px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 8px;
}

.home-subtitle {
  font-size: 13px;
  color: #8b949e;
  max-width: 480px;
  line-height: 1.5;
}

/* DOSSIERS ET FICHIERS */
.folder-header {
  margin-bottom: 20px;
}

.folder-title {
  font-size: 18px;
  color: #f0f6fc;
}

.empty-message {
  color: #8b949e;
  font-size: 14px;
  margin-top: 20px;
}

.files-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.file-card {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #f0f6fc;
  transition: transform 0.15s, border-color 0.15s;
}

.file-card:hover {
  transform: translateY(-2px);
  border-color: #58a6ff;
}

.file-icon {
  font-size: 24px;
}

.file-name {
  font-size: 13px;
  font-weight: 500;
  word-break: break-word;
}