/* === Portal Main Styles === */
@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap");

/* Base Layout */
.row {
  margin-left: 0 !important;
  margin-right: 0 !important;
}

body {
  color: var(--an-text-primary);
  background-color: var(--an-bg-primary);
  line-height: 1.5;
  font-family: "Inter", sans-serif;
}

/* Données techniques et numériques */
.price,
.code,
.timestamp,
.numeric-field {
  font-family: "Roboto Mono", monospace;
}

/* Titres et éléments importants */
h1,
h2,
h3,
h4,
h5,
h6 .title,
.important-text {
  font-family: "IBM Plex Sans", sans-serif;
  color: var(--an-text-primary);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

/* Brand heading font per charter */
h1,
h2,
h3,
h4,
h5,
h6,
.title {
  font-family: "Space Grotesk", "IBM Plex Sans", sans-serif;
}

/* Reset text styles */
.text-reset {
  color: inherit !important;
  text-decoration: none !important;
}

.text-reset:hover,
.text-reset:focus {
  color: inherit !important;
  text-decoration: none !important;
}

/* Disable text underline for headings links */
h1 a,
h2 a,
h3 a,
h4 a,
h5 a,
h6 a {
  text-decoration: none !important;
}

h1 a:hover,
h2 a:hover,
h3 a:hover,
h4 a:hover,
h5 a:hover,
h6 a:hover {
  text-decoration: none !important;
}

.text-emphasized {
  color: var(--an-accent-primary);
  font-weight: 600;
}

p {
  margin-top: 0;
  margin-bottom: 1rem;
  color: var(--an-text-primary);
}

a {
  color: var(--an-accent-primary);
  text-decoration: none;
  transition: color 0.15s ease-in-out;
}

a:hover {
  color: var(--an-accent-hover);
  text-decoration: underline;
}

/* Logo Styles */
.anantys-logo {
  font-size: 18px;
  font-weight: bold;
  color: var(--an-accent-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 5px;
}

.anantys-logo:hover {
  color: var(--an-text-primary);
  text-decoration: none;
}

.anantys-beta {
  color: var(--an-accent-secondary);
  text-transform: uppercase;
}

/* Logo Image Responsive */
img.anantys-logo-image {
  width: 128px;
  height: 128px;
  margin-bottom: 1rem;
}

h1.logo-title {
  font-weight: 700;
  font-size: 64px;
  letter-spacing: -0.5px;
  color: var(--an-accent-primary);
}

/* Container Styles */
.portal-main-container {
  background: var(--an-bg-secondary);
  border-radius: 12px;
  padding: 30px;
  margin: 0 auto;
  max-width: 1400px;
  box-shadow: 0 4px 10px var(--an-shadow-md);
}

.container-no-spacing {
  padding: 0 !important;
  margin: auto !important;
}

/* Indices Banner */
.indices-banner {
  position: sticky;
  top: 0;
  z-index: 1050;
  background: var(--an-bg-tertiary);
  backdrop-filter: blur(5px);
  padding: 10px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--an-border-light);
}

.indices-container {
  flex-grow: 1;
  display: flex;
  justify-content: center;
}

.index-item {
  font-weight: 500;
  padding: 0 12px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  font-size: 0.85rem;
}

.index-item:hover {
  background-color: var(--an-bg-hover);
}

/* Market Tags */
.market-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  padding: 10px 0;
}

.market-tag {
  display: flex;
  align-items: center;
  padding: 8px 14px;
  background: var(--an-bg-hover);
  border-radius: 20px;
  font-size: 14px;
  font-weight: bold;
  text-decoration: none;
  color: var(--an-text-primary);
  transition: background 0.3s ease;
}

.market-tag:hover {
  background: var(--an-bg-tertiary);
}

.tag-small {
  font-size: 0.8rem !important;
}

.tag-sector {
  background: var(--an-bg-hover);
  border: 1px solid var(--an-border-medium);
  color: var(--an-text-secondary);
}

/* Form Components */
.form-control {
  background-color: var(--an-bg-secondary);
  border: 1px solid var(--an-border-medium);
  color: var(--an-text-primary);
  border-radius: 0.375rem;
  padding: 0.5rem 0.75rem;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
  background-color: var(--an-bg-secondary);
  border-color: var(--an-accent-primary);
  color: var(--an-text-primary);
  box-shadow: 0 0 0 0.25rem var(--an-accent-primary-alpha);
}

.form-control::placeholder {
  color: var(--an-text-secondary);
}

.form-label {
  color: var(--an-text-primary);
  margin-bottom: 0.5rem;
}

/* Code Elements */
code,
code a {
  background: transparent;
  color: var(--an-accent-primary) !important;
  font-size: 0.875rem !important;
  text-decoration: none;
}

code a:hover {
  background-color: var(--an-bg-tertiary) !important;
  color: var(--an-accent-primary) !important;
}

/* Footer */
footer {
  margin-top: 0;
  background-color: var(--ai-footer-bg);
  color: var(--ai-footer-text);
  padding: 8px 0 0;
  height: 50px;
  text-align: center;
  font-size: 0.8rem;
}

/* Newsletter */
.newsletter-highlight {
  position: relative;
  overflow: hidden;
}

.newsletter-bg-text {
  position: absolute;
  top: 15%;
  left: 66%;
  transform: translate(-50%, -50%);
  font-family: "Courier New", Courier, monospace;
  font-size: 8vw;
  color: var(--ai-newsletter-bg-text-color);
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  z-index: 0;
  text-transform: uppercase;
  font-weight: 700;
}

/* Promo Section */
.promo {
  background: var(--an-bg-secondary);
  padding: 60px 30px;
  margin-top: 80px;
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 4px 20px var(--an-shadow-md);
}

.promo-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--an-text-primary);
  margin-bottom: 20px;
  font-family: "Raleway", sans-serif;
}

.promo-desc {
  font-size: 18px;
  color: var(--an-text-secondary);
  max-width: 800px;
  margin: auto;
  margin-bottom: 30px;
  font-family: "Inter", sans-serif;
}

/* Error Page */
.error-404-container {
  position: relative;
  height: 100vh;
  background: url("/static/images/stock-glasses.jpg") center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.error-404-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--an-bg-primary);
  opacity: 0.7;
}

.error-content {
  position: relative;
  z-index: 2;
  color: var(--an-text-primary);
}

.error-content h1 {
  font-size: 8rem;
  font-weight: bold;
  margin-bottom: 10px;
  color: var(--an-accent-primary);
}

.error-content p {
  font-size: 1.5rem;
  opacity: 0.8;
}

/* Utility Classes */
.text-truncate {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.text-end {
  font-size: 0.85rem;
}

.nowrap {
  white-space: nowrap;
}

/* User Navigation */
.user-navlink {
  max-width: 100%;
  overflow-x: hidden;
  flex-wrap: wrap;
}

.user-navlink a {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Responsive Adjustments */
@media (max-width: 1200px) {
  .portal-main-container {
    max-width: 95%;
    padding: 25px;
  }
}

@media (max-width: 1024px) {
  img.anantys-logo-image {
    width: 96px;
    height: 96px;
  }

  h1.logo-title {
    font-size: 48px;
  }
}

@media (max-width: 768px) {
  .portal-main-container {
    padding: 20px;
    border-radius: 8px;
  }

  img.anantys-logo-image {
    width: 72px;
    height: 72px;
  }

  h1.logo-title {
    font-size: 32px;
  }

  .indices-banner {
    flex-direction: column;
    text-align: center;
    padding: 10px 0;
  }

  .anantys-logo {
    margin-bottom: 5px;
  }

  .index-item {
    padding: 4px 8px;
    font-size: 12px;
  }

  .newsletter-bg-text {
    font-size: 12vw;
  }
}

@media (max-width: 480px) {
  img.anantys-logo-image {
    width: 72px;
    height: 72px;
  }

  h1.logo-title {
    font-size: 32px;
  }

  .title {
    font-size: 28px;
  }

  .subtitle {
    font-size: 16px;
  }

  .user-navlink {
    justify-content: center !important;
  }
}

/* 🔹 Branding principal */
.hero {
  padding: 30px 20px;
  margin-top: 5vh;
}

.title {
  font-size: 64px;
  font-weight: bold;
  color: var(--an-accent-primary);
}

.subtitle {
  font-size: 20px;
  color: var(--an-text-secondary);
}

.scroll-down {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.8rem;
  color: var(--an-text-secondary);
  cursor: pointer;
  animation: bounce 1.5s infinite;
  transition: color 0.3s;
}

.scroll-down:hover {
  color: rgba(255, 255, 255, 1);
}

@keyframes bounce {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(-10px);
  }
}

/* Sidebar sticky repositionnée */
.sticky-sidebar {
  position: fixed;
  right: 20px;
  top: 100px;
  width: 280px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  background: rgba(20, 20, 20, 0.9);
  padding: 15px;
  border-radius: 8px;
}

@media (max-width: 991px) {
  .sticky-sidebar {
    position: relative;
    width: 100%;
    max-height: unset;
    background: transparent;
    padding: 0;
  }
}

/* 📌 Liens de ressources */
.resource-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

body .promo {
  background: linear-gradient(
    120deg,
    var(--an-bg-secondary),
    var(--an-bg-tertiary)
  );
  color: var(--an-text-primary);
}

.market-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center; /* Centrage horizontal */

  gap: 10px;
  padding: 10px 0;
}

.market-tag {
  display: flex;
  align-items: center;
  padding: 8px 14px;
  background: var(--an-bg-hover);
  border-radius: 20px;
  font-size: 14px;
  font-weight: bold;
  text-decoration: none;
  color: var(--an-text-primary);
  transition: background 0.3s ease;
}

.market-tag i {
  margin-right: 5px;
}

.market-tag:hover {
  background: var(--an-bg-tertiary);
}

.tag-small {
  font-size: 0.8rem !important;
}

/* Catégorie principale */
.tag-sector {
  background: var(--an-bg-hover);
  border: 1px solid var(--an-border-medium);
  color: var(--an-text-secondary);
}

@media (min-width: 1200px) {
  .container,
  .container-fluid {
    max-width: 1200px;
  }
}

/* Featured News Image Responsive Rules */
.featured-news .img-fluid {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 200px;
}

@media (max-width: 768px) {
  .featured-news .img-fluid {
    max-height: 300px;
  }
}

.indices-tracker .index-item {
  margin-right: 1rem;
}

.index-item:hover {
  background-color: var(--an-bg-tertiary);
}

/* Exchange Header */
.exchange-header {
  text-align: center;
  margin-bottom: 2rem;
}

/* Market Trending */
.market-trending {
  margin-top: 2rem;
  margin-bottom: 2rem;
}

/* Dark Mode Specific Styles */
.portal-main-container {
  background: rgba(22, 22, 22, 0.75);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .portal-main-container {
    padding: 15px;
  }

  .stocks-grid {
    gap: 8px;
  }

  .newsletter-bg-text {
    font-size: 12vw;
  }
}

/* Form Components */
.form-control {
  background-color: var(--an-bg-secondary);
  border: 1px solid var(--an-border-medium);
  color: var(--an-text-primary);
  border-radius: 0.375rem;
  padding: 0.5rem 0.75rem;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
  background-color: var(--an-bg-secondary);
  border-color: var(--an-accent-primary);
  color: var(--an-text-primary);
  box-shadow: 0 0 0 0.25rem var(--an-accent-primary-alpha);
}

.form-control::placeholder {
  color: var(--an-text-secondary);
}

.form-label {
  color: var(--an-text-primary);
  margin-bottom: 0.5rem;
}

.ub-row .var .value {
  white-space: nowrap;
}
