/* ==========================================================================
   Cémantix Solver — Layout, Header, Navigation & Footer
   ========================================================================== */

/* Header */
.app-header {
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-icon {
  font-size: 1.8rem;
  filter: drop-shadow(0 0 8px var(--accent));
}

.brand-text h1 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: block;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Main Content Layout */
.main-content {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 7.5rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.section-title h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-main);
}

.grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: stretch;
}

@media (max-width: 768px) {
  .grid-2col {
    grid-template-columns: 1fr;
  }
}

/* Navigation par Onglets (Tableau de Bord / Jouer à Cémantix) */
.nav-tabs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.nav-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-lg);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-muted);
  text-decoration: none;
}

.nav-tab:hover:not(.active) {
  color: var(--text-main);
  border-color: rgba(88, 166, 255, 0.4);
  transform: translateY(-1px);
}

.nav-tab.active {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
  box-shadow: 0 0 20px var(--accent-glow);
}

.tab-badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.15rem 0.45rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.view-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 100%;
}

@media (max-width: 768px) {
  .nav-tabs {
    flex-direction: column;
    width: 100%;
  }

  .nav-tab {
    width: 100%;
    justify-content: center;
  }
}

/* Footer Fixe */
.app-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  border-top: 1px solid var(--border-color);
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 0.85rem 1.5rem;
  z-index: 100;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.12);
}

@media (max-width: 768px) {
  .main-content {
    padding-bottom: 9.5rem;
  }
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-left p {
  font-size: 0.85rem;
  color: var(--text-main);
}

.footer-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.footer-author-link,
.footer-sub a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  position: relative;
  display: inline;
  transition: color 0.25s ease, text-shadow 0.25s ease;
}

.footer-author-link::after,
.footer-sub a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 1.5px;
  background: linear-gradient(90deg, var(--accent), #79c0ff);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 1px;
}

.footer-author-link:hover,
.footer-sub a:hover {
  color: #79c0ff;
  text-shadow: 0 0 12px var(--accent-glow);
}

.footer-author-link:hover::after,
.footer-sub a:hover::after {
  width: 100%;
}

[data-theme="light"] .footer-author-link:hover,
[data-theme="light"] .footer-sub a:hover {
  color: #0550ae;
  text-shadow: 0 0 8px rgba(9, 105, 218, 0.25);
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.footer-time {
  font-size: 0.75rem;
  color: var(--text-dim);
}
