
:root {
  --bg-page: #020617;
  --bg-card: #020617;
  --bg-soft: #020617;
  --accent: #6366f1;
  --accent-soft: rgba(99, 102, 241, 0.2);
  --accent-strong: #4f46e5;
  --text-main: #e5e7eb;
  --text-muted: #9ca3af;
  --text-soft: #6b7280;
  --border-soft: rgba(148, 163, 184, 0.35);
  --radius-lg: 18px;
  --radius-md: 12px;
  --shadow-soft: 0 18px 40px rgba(15, 23, 42, 0.75);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at top, rgba(79, 70, 229, 0.22), transparent 55%),
    radial-gradient(circle at bottom, rgba(15, 23, 42, 0.9), #020617);
  display: flex;
  flex-direction: column;
}

.page {
  max-width: 1120px;
  width: 100%;
  margin: 0 auto;
  padding: 24px 16px 56px;
}

/* Couleur claire pour les résultats de recherche */
.search-results-list a {
  color: #d9d9d9 !important;     /* gris clair */
}

.search-results-list a:hover {
  color: #ffffff !important;     /* blanc au survol */
  text-decoration: underline;
}

/* HEADER / NAV */

header.acad-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  width: 40px;
  height: 40px;
  /* enlève le rond violet */
  border-radius: 0;              /* ou garde-le si tu veux ton logo dans un cercle */
  background-color: transparent;

  /* 👉 nouveau : on met ton logo en fond */
  background-image: url("./visuels/logoAW.png");
  background-position: center;
  background-size: contain;
  background-repeat: no-repeat;

  display: inline-block;

  /* on cache la lettre "A" qui est toujours dans le HTML */
  color: transparent;
  font-size: 0;
}


.brand-text-title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.brand-text-sub {
  font-size: 13px;
  color: var(--text-soft);
}

nav.acad-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.nav-btn {
  font-size: 13px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: rgba(15, 23, 42, 0.9);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: 0.15s ease;
  text-decoration: none;
}

.nav-btn span.dot {
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: var(--accent);
}

.nav-btn.primary {
  border-color: rgba(129, 140, 248, 0.6);
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.9), rgba(129, 140, 248, 0.65));
  color: #e5e7eb;
  box-shadow: 0 10px 25px rgba(79, 70, 229, 0.7);
}

.nav-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(148, 163, 184, 0.7);
}

.nav-btn.primary:hover {
  filter: brightness(1.05);
}

/* PROFIL LOCAL (XP) */

.profile-card {
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background:
    radial-gradient(circle at top left, rgba(148, 163, 184, 0.2), transparent 60%),
    rgba(15, 23, 42, 0.98);
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 190px;
}

.profile-main {
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-avatar {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 20%, #a5b4fc, #4f46e5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  color: #020617;
}

.profile-level {
  font-size: 13px;
  font-weight: 600;
}

.profile-xp {
  font-size: 12px;
  color: var(--text-soft);
}

.profile-progress-wrapper {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.profile-progress-bar {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 1);
  overflow: hidden;
  border: 1px solid rgba(129, 140, 248, 0.6);
}

.profile-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #4f46e5, #22c55e);
  transition: width 0.25s ease-out;
}

.profile-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-soft);
}

/* CARDS GENERIQUES */

.card,
.article-card,
.quiz-card {
  background:
    radial-gradient(circle at top left, rgba(148, 163, 184, 0.18), transparent 60%),
    rgba(15, 23, 42, 0.96);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-soft);
  padding: 20px 18px 18px;
}

/* LAYOUT ARTICLE + QUIZ */

main.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.1fr);
  gap: 20px;
  align-items: flex-start;
}

/* HERO (HOME) */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2.2fr);
  gap: 20px;
  align-items: center;
}

.hero-title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.01em;
  margin-bottom: 8px;
}

.hero-subtitle {
  font-size: 14px;
  color: var(--text-soft);
  margin-bottom: 16px;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.stat-pill {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  font-size: 12px;
  color: var(--text-muted);
  background: rgba(15, 23, 42, 0.96);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-note {
  font-size: 12px;
  color: var(--text-soft);
  margin-top: 8px;
}

.hero-side {
  border-radius: var(--radius-md);
  border: 1px dashed rgba(148, 163, 184, 0.6);
  padding: 14px 12px;
  background: rgba(2, 6, 23, 0.9);
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hero-side-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
}

.hero-side-list {
  margin: 0;
  padding-left: 18px;
  font-size: 12px;
}

/* SECTION TITLES */

.section-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
}

.section-subtitle {
  font-size: 13px;
  color: var(--text-soft);
  margin-bottom: 12px;
}

.mini-cats-grid {
  margin-top: 1.4rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.9rem;
}

.mini-cat-card {
  position: relative;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: radial-gradient(circle at top left, rgba(148, 163, 184, 0.16), rgba(15, 23, 42, 0.98));
  padding: 0.85rem 0.9rem;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.7);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.mini-cat-icon {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.7);
}

.mini-cat-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #e5e7eb;
}

.mini-cat-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.mini-cat-tags span {
  font-size: 0.78rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  color: #9ca3af;
  background: rgba(15, 23, 42, 0.9);
}

.mini-cat-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.95);
  border-color: rgba(129, 140, 248, 0.7);
}


/* BUTTONS GENERIQUES */

.btn {
  font-family: inherit;
  font-size: 13px;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 8px 16px;
  background: rgba(15, 23, 42, 0.96);
  color: var(--text-main);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: 0.15s ease;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-strong), var(--accent));
  border-color: rgba(129, 140, 248, 0.7);
  box-shadow: 0 10px 24px rgba(79, 70, 229, 0.8);
}

.btn-secondary {
  border-color: rgba(148, 163, 184, 0.7);
  color: var(--text-muted);
}

.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
}

.btn:disabled {
  opacity: 0.6;
  cursor: default;
  transform: none;
  box-shadow: none;
}

/* BADGES & TAGS */

.badge-soft {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  font-size: 11px;
  color: var(--text-soft);
  background: rgba(15, 23, 42, 0.96);
  margin-bottom: 6px;
}

/* CATEGORIES PAGE / HOME GRIDS */

.categories-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.category-card {
  border-radius: var(--radius-md);
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: rgba(2, 6, 23, 0.96);
  padding: 10px 10px 9px;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.category-title {
  font-size: 13px;
  font-weight: 500;
}

.category-icon {
  font-size: 16px;
}

.category-meta {
  font-size: 11px;
  color: var(--text-soft);
}

.category-articles {
  margin: 4px 0 0;
  padding-left: 16px;
  font-size: 12px;
  color: var(--text-muted);
}

.category-articles a {
  color: #c7d2fe;
  text-decoration: none;
}

.category-articles a:hover {
  text-decoration: underline;
}

/* RECOMPENSES (BADGES) */

.badges-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.badge-card {
  border-radius: var(--radius-md);
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: rgba(2, 6, 23, 0.96);
  padding: 12px 10px;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.badge-title {
  font-size: 13px;
  font-weight: 500;
}

.badge-status {
  font-size: 11px;
}

.badge-status.locked {
  color: #fca5a5;
}

.badge-status.unlocked {
  color: #bbf7d0;
}

.badge-tag {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px dashed rgba(148, 163, 184, 0.6);
  color: var(--text-soft);
}

/* NEWSLETTER / CTA & FOOTER */

.newsletter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-soft);
}

.newsletter-inputs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.input {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: rgba(15, 23, 42, 0.96);
  padding: 7px 10px;
  font-size: 13px;
  color: var(--text-main);
  min-width: 200px;
}

.input::placeholder {
  color: var(--text-soft);
}

footer {
  margin-top: 18px;
  font-size: 11px;
  color: var(--text-soft);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
}

footer a {
  color: var(--text-soft);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* ARTICLE PAGE SPECIFIQUE */

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.tag {
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid rgba(129, 140, 248, 0.6);
  background: var(--accent-soft);
  color: #c7d2fe;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tag-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent);
}

.chip {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  color: var(--text-soft);
  background: rgba(15, 23, 42, 0.95);
}

.article-title {
  font-size: 24px;
  line-height: 1.25;
  margin: 4px 0 10px;
  letter-spacing: 0.01em;
}

.article-subtitle {
  font-size: 14px;
  color: var(--text-soft);
  margin-bottom: 14px;
}

.article-highlight {
  font-size: 13px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.94);
  border: 1px dashed rgba(148, 163, 184, 0.7);
  color: var(--text-muted);
  margin-bottom: 12px;
}

.article-highlight strong {
  color: #e5e7eb;
}

.article-content {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-main);
}

.article-content h2 {
  font-size: 16px;
  margin: 16px 0 6px;
}

.article-content h3 {
  font-size: 15px;
  margin: 14px 0 4px;
}

.article-content p {
  margin: 6px 0;
  color: var(--text-muted);
}

.article-content ul {
  margin: 6px 0 10px 18px;
  padding: 0;
  color: var(--text-muted);
}

.article-footer-note {
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-soft);
  border-top: 1px dashed rgba(148, 163, 184, 0.4);
  padding-top: 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
}

.bullet-pill {
  background: rgba(15, 23, 42, 0.98);
  border-radius: 999px;
  padding: 3px 8px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  font-size: 11px;
  color: var(--text-muted);
}

/* QUIZ SUR PAGE ARTICLE */

.quiz-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.quiz-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.quiz-title {
  font-size: 18px;
  font-weight: 600;
}

.quiz-caption {
  font-size: 13px;
  color: var(--text-soft);
}

.quiz-badge {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(22, 163, 74, 0.12);
  color: #bbf7d0;
  border: 1px solid rgba(74, 222, 128, 0.5);
  white-space: nowrap;
}

.quiz-progress {
  font-size: 12px;
  color: var(--text-soft);
  margin-bottom: 8px;
}

.quiz-question {
  margin-bottom: 10px;
  padding: 10px 10px 9px;
  border-radius: var(--radius-md);
  background: #020617;
  border: 1px solid rgba(30, 64, 175, 0.7);
}

.quiz-question-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
}

.quiz-question-label {
  font-size: 13px;
  font-weight: 500;
}

.quiz-question-meta {
  font-size: 11px;
  color: var(--text-soft);
}

.quiz-options {
  display: grid;
  gap: 4px;
  margin-top: 4px;
}

.quiz-option {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
  padding: 4px 6px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.12s ease, border 0.12s ease;
  border: 1px solid transparent;
}

.quiz-option:hover {
  background: rgba(15, 23, 42, 0.96);
  border-color: rgba(148, 163, 184, 0.5);
}

.quiz-option input[type="radio"] {
  accent-color: var(--accent);
}

.quiz-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  border-top: 1px dashed rgba(148, 163, 184, 0.4);
  padding-top: 10px;
}

.quiz-result {
  font-size: 13px;
  color: var(--text-soft);
}

.quiz-result strong {
  color: #e5e7eb;
}

.quiz-feedback {
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-soft);
}

.quiz-option.correct {
  border-color: rgba(74, 222, 128, 0.9);
  background: rgba(22, 163, 74, 0.18);
  color: #bbf7d0;
}

.quiz-option.incorrect {
  border-color: rgba(248, 113, 113, 0.9);
  background: rgba(127, 29, 29, 0.55);
  color: #fecaca;
}

.quiz-option.correct input[type="radio"],
.quiz-option.incorrect input[type="radio"] {
  accent-color: currentColor;
}

/* RESPONSIVE */

@media (max-width: 900px) {
  .hero,
  main.layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 768px) {
  header.acad-header {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 640px) {
  .page {
    padding-inline: 12px;
  }
  .categories-grid,
  .badges-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .article-card,
  .quiz-card {
    padding: 16px 14px 14px;
  }
  .article-title {
    font-size: 20px;
  }
  .quiz-header {
    flex-direction: column;
    align-items: flex-start;
  }
}
