/* ============================================================
   GLOBAL THEME
   ============================================================ */
:root {
  --bg-dark: #0f1117;
  --bg-panel: #181b22;
  --bg-soft: #22252d;

  --text-main: #f1f1f1;
  --text-soft: #e8e8e8; /* meilleure lisibilité */

  --accent: #4f9cff;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-dark);
  color: var(--text-main);
  overflow-x: hidden;
}

/* ============================================================
   FX BACKGROUND (Matrix / Snow)
   ============================================================ */
#fx-container,
#fx-container canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: -1 !important;
}

/* Snowflakes */
.flake {
  position: absolute;
  top: -10px;
  background: rgba(255,255,255,0.9);
  border-radius: 50%;
  filter: blur(1px);
  animation: fall linear forwards;
}
@keyframes fall { to { transform: translateY(110vh); } }

/* ============================================================
   NAVBAR
   ============================================================ */
header {
  width: 100%;
  position: fixed;
  top: 0;
  z-index: 2000;
}

.navbar {
  width: 100%;
  background: rgba(24,27,34,0.35) !important; /* plus transparent */
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 6px 26px !important;
}

#askanat-logo {
  width: 164px;
  height: auto;
}
@media (max-width: 480px) {
  #askanat-logo { width: 135px; }
}

/* NAV LINKS */
.navbar-nav {
  gap: 20px;
  align-items: center;
}

.nav-link {
  position: relative;
  padding: 8px 6px;
  font-size: 1.1rem;
  letter-spacing: 0.35px;
  color: var(--text-main) !important;
  opacity: .9;
  transition: opacity .25s, color .25s;
}

.nav-link:hover {
  color: var(--accent) !important;
  opacity: 1;
}

/* Underline */
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform .25s;
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

/* ============================================================
   NAVBAR BURGER — version propre & moderne
   ============================================================ */

.navbar-toggler {
  padding: 6px 10px;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  background: rgba(255,255,255,0.05);
  border-radius: 8px;
  transition: background .25s;
}

.navbar-toggler:hover {
  background: rgba(255,255,255,0.10);
}

.navbar-toggler-icon {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--accent) !important;
  border-radius: 4px;
  position: relative;
  transition: background .25s;
}

.navbar-toggler-icon::before,
.navbar-toggler-icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 24px;
  height: 2px;
  background: var(--accent);
  border-radius: 4px;
  transition: background .25s;
}

.navbar-toggler-icon::before {
  top: -7px;
}
.navbar-toggler-icon::after {
  top: 7px;
}

.navbar-toggler:hover .navbar-toggler-icon,
.navbar-toggler:hover .navbar-toggler-icon::before,
.navbar-toggler:hover .navbar-toggler-icon::after {
  background: #7abaff !important;
}

/* DROPDOWN */
.dropdown-menu-dark {
  background: rgba(17,20,26,0.65) !important;
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.05);
  padding: 6px 0;
}

.dropdown-item {
  color: var(--text-main) !important;
  padding: 10px 18px;
}
.dropdown-item:hover {
  background: var(--accent) !important;
  color: #fff !important;
}

/* ============================================================
   SECTIONS BASE
   ============================================================ */
section {
  padding: 70px 20px 60px;
  max-width: 1100px;
  margin: auto;
}

#hero {
  text-align: center;
}

.subtitle {
  font-size: 1.3rem;
  margin-top: 40px;
  color: var(--text-soft);
}

/* BUTTONS */
.btn {
  padding: 14px 24px;
  border-radius: 10px;
  background: var(--accent) !important;
  border: none;
  color: white !important;
  cursor: pointer;
  transition: transform .25s, background .25s;
}

.btn:hover {
  background: #2f81ff !important;
  transform: translateY(-3px);
}

/* ============================================================
   DYNAMIC SECTIONS
   ============================================================ */
#dynamic-sections section {
  background: rgba(15,17,23,0.25); /* encore plus transparent */
  backdrop-filter: blur(16px);
  border-radius: 14px;
  padding-bottom: 40px;
}

/* Fade-in */
.fade {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .7s, transform .7s;
}
.fade.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   CARDS
   ============================================================ */
.cards { margin-top: 30px; }

.card {
  background: rgba(24,27,34,0.35) !important;
  backdrop-filter: blur(14px);
  padding: 26px !important;
  border-radius: 16px !important;
  border: 1px solid rgba(255,255,255,0.05) !important;
  transition: transform .3s, border-color .3s;
}

.card:hover {
  transform: translateY(-6px);
  border-color: var(--accent) !important;
}

.card p { color: var(--text-soft) !important; }

/* ============================================================
   NOTES
   ============================================================ */

.notes-container {
  display: flex;
  flex-direction: column;
  gap: 12px;                    /* espace constant entre les notes */
  margin-top: 25px;
}

.note {
  background: rgba(24,27,34,0.25);   /* plus léger = ne surcharge pas la page */
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 14px 18px;                /* plus compact */
  color: var(--text-main);
  font-size: 0.95rem;                /* taille idéale */
  line-height: 1.4;
  transition: border-color .25s, background .25s;
}

.note:hover {
  border-color: var(--accent);
  background: rgba(24,27,34,0.35);
}

/* ============================================================
   SKILLS — version améliorée & animée
   ============================================================ */

.skills-wrapper {
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.skill {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.skill-title {
  font-size: 1rem;
  color: var(--text-main);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.skill-bar {
  width: 100%;
  height: 12px;
  background: var(--bg-soft);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}

.skill-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 8px;
  transition: width 1.2s ease-out;
}

/* ============================================================
   GALLERY
   ============================================================ */
.gallery-grid {
  margin-top: 35px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
}

.gallery-item {
  background: rgba(24,27,34,0.35);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 12px;
  overflow: hidden;
  transition: transform .25s, border-color .25s;
}

.gallery-item:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
}

.gallery-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.gallery-item p {
  margin: 0;
  padding: 12px;
  text-align: center;
  color: var(--text-soft);
}

/* ============================================================
   TIMELINE HORIZONTALE INTERACTIVE (avec date dans les points)
   ============================================================ */

.timeline-wrapper {
  position: relative;
  margin: 80px auto 40px;
  width: 100%;
  max-width: 1200px;
  padding-bottom: 120px; /* laisse de la place aux cartes */
}

/* Ligne horizontale */
.timeline-wrapper::before {
  content: "";
  position: absolute;
  top: 45px;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--accent);
  opacity: 0.35;
}

/* Conteneur */
.timeline {
  display: flex;
  justify-content: space-between;
  position: relative;
  z-index: 10;
}

/* Chaque élément */
.timeline-item {
  position: relative;
  text-align: center;
}

/* Point contenant l’année */
.timeline-point {
  width: 70px;
  height: 70px;
  background: var(--bg-soft);
  border: 2px solid var(--accent);
  border-radius: 50%;
  color: var(--text-main);
  font-weight: 700;
  font-size: 1.1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;

  transition: transform .25s, background .25s, color .25s;
  box-shadow: 0 0 10px rgba(79,156,255,0.6);
}

.timeline-point:hover {
  transform: scale(1.25);
  background: var(--accent);
  color: #fff;
}

/* Carte d’info */
.timeline-card {
  position: absolute;
  top: 95px;
  left: 50%;
  transform: translateX(-50%) scale(0.8);
  opacity: 0;

  background: rgba(24,27,34,0.75);
  backdrop-filter: blur(12px);
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  padding: 16px;
  width: 260px;

  transition: opacity .25s, transform .25s;
  pointer-events: none;
  z-index: 20;
}

.timeline-item:hover .timeline-card {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

/* Titre */
.timeline-card .title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 6px;
}

/* Texte */
.timeline-card p {
  color: var(--text-soft);
  font-size: 0.9rem;
}

/* Sécurité (évite que FAQ remonte par-dessus) */
#timeline {
  position: relative;
  z-index: 5;
  padding-bottom: 250px;
}

/* ============================================================
   FAQ
   ============================================================ */
.faq-list { margin-top: 30px; }

.faq-question {
  padding: 14px;
  border-radius: 10px;
  background: rgba(24,27,34,0.40);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.05);
  color: var(--text-main);
  cursor: pointer;
  transition: border-color .25s;
}

.faq-question:hover { border-color: var(--accent); }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  background: rgba(20,23,29,0.50);
  border-left: 2px solid var(--accent);
  margin-top: 4px;
  padding: 0 14px;
  border-radius: 0 0 10px 10px;
  color: var(--text-soft);
  transition: max-height .35s ease, padding .35s ease;
}

.faq-question.open + .faq-answer {
  max-height: 400px;
  padding: 14px;
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  text-align: center;
  padding: 40px;
  color: var(--text-soft);
  cursor: pointer;
  transition: color .25s;
}

footer:hover { color: var(--accent); }

/* ============================================================
   TERMINAL
   ============================================================ */
#terminal {
  position: fixed;
  bottom: -350px;
  left: 0;
  width: 100%;
  height: 320px;
  background: #050505;
  color: #4f9cff;
  font-family: Consolas, monospace;
  display: flex;
  flex-direction: column;
  transition: bottom .35s;
  border-top: 2px solid var(--accent);
  z-index: 999999;
}

#terminal.active { bottom: 0; }

#terminal-header {
  display: flex;
  justify-content: space-between;
  padding: 10px 14px;
  background: #0a0a0a;
  border-bottom: 1px solid #222;
}

#terminal-close {
  background: transparent;
  border: none;
  font-size: 18px;
  color: #4f9cff;
  cursor: pointer;
}
#terminal-close:hover { color: #7abaff; }

#terminal-body {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
}

#terminal-input-line {
  display: flex;
  align-items: center;
  padding: 8px;
  background: #080808;
  border-top: 1px solid #222;
}

.prompt { color: #4f9cff; margin-right: 8px; }

#terminal-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #4f9cff;
  font-size: 14px;
}


/* ============================================================
   FIX LISIBILITÉ — Liens utiles & Projets
   (Supporte #links, #useful-links et #projects)
   ============================================================ */

#links p,
#links li,
#links span,
#links small,
#links .text-muted,
#links .card-text,
#useful-links p,
#useful-links li,
#useful-links span,
#useful-links small,
#useful-links .text-muted,
#useful-links .card-text,
#projects p,
#projects li,
#projects span,
#projects small,
#projects .text-muted,
#projects .card-text {
  color: var(--text-soft) !important;
}

#links h2,
#links h3,
#useful-links h2,
#useful-links h3,
#projects h2,
#projects h3 {
  color: var(--text-main) !important;
}

/* ============================================================
   TIMELINE — VERSION RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {

  /* Wrapper */
  .timeline-wrapper {
    padding-bottom: 40px;
    margin: 40px auto;
  }

  /* On supprime la ligne horizontale */
  .timeline-wrapper::before {
    display: none;
  }

  /* La timeline devient verticale */
  .timeline {
    flex-direction: column;
    align-items: center;
    gap: 32px;
  }

  /* Items en colonne */
  .timeline-item {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  /* Point centré */
  .timeline-point {
    width: 60px;
    height: 60px;
    font-size: 1rem;
  }

  /* Carte visible en permanence */
  .timeline-card {
    position: static;
    opacity: 1 !important;
    transform: none !important;
    width: 90%;
    max-width: 360px;
    margin-top: 14px;
  }
}