/* ════════════════════════════════════════════════════════════
   style.css — Barkion Naturia
   Palette : blanc doux ivoire + or, inspirée de la carte
   Ghost Gold GLD5-FR033 Naturia Barkion
════════════════════════════════════════════════════════════ */

/* ── Variables — thème clair (défaut) ─────────────────── */
:root {
  /* Fonds ivoire chaud, jamais pur blanc */
  --bg-base:        #F8F4EE;
  --bg-surface:     #FFFDF8;
  --bg-surface-2:   #F0EBE0;
  --bg-lab:         #F5F0E6;

  /* Or — la couleur signature */
  --accent:         #B8922A;
  --accent-light:   #D4AF57;
  --accent-hover:   #9A7A20;
  --accent-glow:    rgba(184, 146, 42, 0.14);
  --accent-shimmer: rgba(212, 175, 87, 0.25);

  /* Texte */
  --text-primary:   #1C1712;
  --text-secondary: #5A4E3E;
  --text-muted:     #9A8E7C;

  /* Bordures dorées discrètes */
  --border:         rgba(184, 146, 42, 0.16);
  --border-strong:  rgba(184, 146, 42, 0.32);

  /* Status */
  --stable-color:   #3D8B5E;
  --beta-color:     #B8922A;
  --wip-color:      #9A8E7C;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;

  --font-sans: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", monospace;

  --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-card: 0 4px 24px rgba(140, 110, 40, 0.1);
  --shadow-gold:  0 6px 28px rgba(184, 146, 42, 0.22);
}

/* ── Variables — thème sombre ──────────────────────────── */
[data-theme="dark"] {
  --bg-base:        #0E0C08;
  --bg-surface:     #16130E;
  --bg-surface-2:   #1E1A12;
  --bg-lab:         #120F0A;

  --accent:         #D4AF57;
  --accent-light:   #E8C96A;
  --accent-hover:   #EED47A;
  --accent-glow:    rgba(212, 175, 87, 0.14);
  --accent-shimmer: rgba(212, 175, 87, 0.22);

  --text-primary:   #F2EADB;
  --text-secondary: #A8987E;
  --text-muted:     #6B6050;

  --border:         rgba(212, 175, 87, 0.13);
  --border-strong:  rgba(212, 175, 87, 0.28);

  --stable-color:   #55B882;
  --beta-color:     #D4AF57;
  --wip-color:      #6B6050;

  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.55);
  --shadow-gold:  0 6px 28px rgba(212, 175, 87, 0.2);
}

/* ── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 70px; }
body {
  font-family: var(--font-sans);
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background 0.35s ease, color 0.35s ease;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; font: inherit; }

/* ── Typographie ────────────────────────────────────────── */
h1, h2, h3, h4 { line-height: 1.2; font-weight: 700; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.1rem; }

/* ── Layout ─────────────────────────────────────────────── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}
section { padding: 96px 0; }

.section__header { margin-bottom: 56px; }
.section__eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.section__title { color: var(--text-primary); }
.section__subtitle {
  margin-top: 10px;
  color: var(--text-secondary);
  max-width: 540px;
}

/* ── Animations d'entrée ────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal--visible { opacity: 1; transform: none; }

/* ── Shimmer doré (décoration) ──────────────────────────── */
@keyframes goldShimmer {
  0%   { background-position: -200% center; }
  100% { background-position:  200% center; }
}
.gold-line {
  display: block;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--accent-light),
    transparent
  );
  background-size: 200% 100%;
  animation: goldShimmer 3s linear infinite;
  opacity: 0.6;
}

/* ════════════════════════════════════════════════════════
   NAVIGATION
════════════════════════════════════════════════════════ */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 18px 0;
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, padding 0.2s ease;
}
#nav.nav--scrolled {
  background: color-mix(in srgb, var(--bg-base) 88%, transparent);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 20px rgba(140, 110, 40, 0.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 12px 0;
}
[data-theme="dark"] #nav.nav--scrolled {
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* Logo avec reflet doré */
.nav__logo-img {
  height: 28px;
  width: auto;
  display: inline-block;
  mix-blend-mode: multiply;
  vertical-align: middle;
}
[data-theme="dark"] .nav__logo-img {
  mix-blend-mode: normal;
  filter: drop-shadow(0 0 6px rgba(212, 175, 87, 0.5)) brightness(0.85);
}

.nav__logo {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.01em;
  flex-shrink: 0;
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav__logo span { color: var(--text-primary); }
.nav__logo::after {
  content: "";
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0.5;
}

#nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav__link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}
.nav__link:hover,
.nav__link.nav-link--active {
  color: var(--accent);
  background: var(--accent-glow);
}

.nav__actions { display: flex; align-items: center; gap: 8px; }
.nav__cta { display: none; }
@media (min-width: 640px) { .nav__cta { display: inline-flex; } }

/* Toggle thème — style parchemin/or */
#theme-toggle {
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--accent);
  padding: 5px 11px;
  font-size: 0.85rem;
  transition: all var(--transition);
  line-height: 1;
}
#theme-toggle:hover {
  background: var(--accent-glow);
  border-color: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
}

/* Burger mobile */
#burger {
  display: none;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--accent);
  padding: 6px 10px;
  font-size: 1.1rem;
  line-height: 1;
}

/* ════════════════════════════════════════════════════════
   HERO
════════════════════════════════════════════════════════ */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 80px;
  position: relative;
  overflow: hidden;
}

/* Texture de fond — lignes fines ivoire/or */
#hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 0%, black 20%, transparent 100%);
  pointer-events: none;
}

/* Halo doré central */
#hero::after {
  content: "";
  position: absolute;
  top: -15%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse, var(--accent-shimmer) 0%, transparent 65%);
  pointer-events: none;
  animation: haloBreath 6s ease-in-out infinite;
}
@keyframes haloBreath {
  0%, 100% { opacity: 0.7; transform: translateX(-50%) scale(1); }
  50%       { opacity: 1;   transform: translateX(-50%) scale(1.06); }
}

.hero__content { position: relative; z-index: 1; }

/* Mascotte inline — à côté du titre */
.hero__title-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 8px;
}
.hero__title-row .hero__title {
  margin-bottom: 0;
}

/* Thème clair : mix-blend-mode multiply → le fond blanc disparaît dans l'ivoire */
.hero__mascot-inline {
  height: 72px;
  width: auto;
  flex-shrink: 0;
  mix-blend-mode: multiply;
  border-radius: 6px;
}

/* Thème sombre : fond blanc visible mais intégré avec un halo doré */
[data-theme="dark"] .hero__mascot-inline {
  mix-blend-mode: normal;
  filter: drop-shadow(0 0 12px rgba(212, 175, 87, 0.4)) brightness(0.88);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.hero__eyebrow code {
  color: var(--accent);
  background: var(--accent-glow);
  border: 1px solid var(--border);
  padding: 2px 10px;
  border-radius: 4px;
}

/* Titre avec dégradé or */
.hero__title {
  background: linear-gradient(
    135deg,
    var(--text-primary) 0%,
    var(--accent-light) 60%,
    var(--accent) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}
/* Sous-titre en italique or discret */
.hero__subtitle-gold {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  opacity: 0.7;
  margin-bottom: 20px;
  letter-spacing: 0.06em;
}

.hero__tagline {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--text-secondary);
  max-width: 520px;
  margin-bottom: 36px;
  line-height: 1.75;
}

.hero__cta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 64px;
}

/* Stats */
.hero__stats {
  display: flex;
  gap: 0;
  padding: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  width: fit-content;
  margin-bottom: 56px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.stat {
  text-align: center;
  padding: 18px 28px;
  position: relative;
}
.stat + .stat::before {
  content: "";
  position: absolute;
  left: 0; top: 20%; bottom: 20%;
  width: 1px;
  background: var(--border-strong);
}
.stat__number {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--accent);
  font-family: var(--font-mono);
  display: block;
}
.stat__label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Outils en avant */
.hero__featured-title {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
#featured-tools {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

/* ════════════════════════════════════════════════════════
   SECTION PROJETS PHARES
════════════════════════════════════════════════════════ */
#projects {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
}

#projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 24px;
}

/* ════════════════════════════════════════════════════════
   SECTION OUTILS
════════════════════════════════════════════════════════ */
#tools {
  background: var(--bg-base);
  border-top: 1px solid var(--border);
}

.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.filter-btn {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 6px 18px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text-secondary);
  transition: all var(--transition);
}
.filter-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-glow);
}
.filter-btn--active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

#tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

/* ════════════════════════════════════════════════════════
   SECTION LABO
════════════════════════════════════════════════════════ */
#lab {
  background: var(--bg-lab);
  border-top: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
#lab::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 15% 60%, var(--accent-glow) 0%, transparent 55%),
    radial-gradient(circle at 85% 20%, var(--accent-glow) 0%, transparent 55%);
  pointer-events: none;
}

.lab__intro {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 22px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-md);
  margin-bottom: 40px;
  box-shadow: var(--shadow-card);
}
.lab__intro-icon { font-size: 1.3rem; flex-shrink: 0; line-height: 1.5; }
.lab__intro p { color: var(--text-secondary); font-size: 0.88rem; line-height: 1.7; }

#lab-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  position: relative;
  z-index: 1;
}

/* ════════════════════════════════════════════════════════
   SECTION À PROPOS
════════════════════════════════════════════════════════ */
#about {
  background: var(--bg-base);
  border-top: 1px solid var(--border);
}

.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
.about__bio {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 32px;
}

/* Timeline */
.timeline { display: flex; flex-direction: column; }
.timeline-item {
  display: flex;
  gap: 20px;
  padding: 16px 0 24px 22px;
  border-left: 1px solid var(--border);
  position: relative;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -4px;
  top: 20px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow), 0 0 8px var(--accent-shimmer);
}
.timeline-item__year {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  flex-shrink: 0;
  width: 42px;
  line-height: 1.6;
}
.timeline-item__event { color: var(--text-secondary); font-size: 0.9rem; }

/* Skills */
#skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.skill-group__cat {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 10px;
}
.skill-group__list { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-item {
  font-size: 0.8rem;
  padding: 4px 13px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  transition: all var(--transition);
}
.skill-item:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
}

/* ════════════════════════════════════════════════════════
   SECTION CONTACT
════════════════════════════════════════════════════════ */
#contact {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  text-align: center;
}
.contact__desc {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 480px;
  margin: 0 auto 40px;
  line-height: 1.75;
}
.contact__links {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}
.contact__link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: all var(--transition);
  background: var(--bg-surface-2);
}
.contact__link:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-glow);
  transform: translateY(-2px);
  box-shadow: var(--shadow-gold);
}

/* ════════════════════════════════════════════════════════
   FOOTER
════════════════════════════════════════════════════════ */
footer {
  padding: 28px 0;
  border-top: 1px solid var(--border);
  background: var(--bg-base);
  position: relative;
}
/* Ligne shimmer or en haut du footer */
footer::before {
  content: "";
  position: absolute;
  top: 0; left: 10%; right: 10%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--accent-light),
    var(--accent),
    var(--accent-light),
    transparent
  );
  opacity: 0.4;
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.footer__copy {
  font-size: 0.76rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.footer__copy span { color: var(--accent); }

/* ════════════════════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  section { padding: 72px 0; }

  #nav-links {
    display: none;
    position: fixed;
    top: 60px; left: 0; right: 0;
    flex-direction: column;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    padding: 16px;
    gap: 4px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  }
  #nav-links.nav-links--open { display: flex; }
  .nav__link { padding: 10px 14px; width: 100%; }
  #burger { display: block; }

  .hero__cta { flex-direction: column; align-items: flex-start; }
  .hero__stats { flex-wrap: wrap; }

  .about__grid { grid-template-columns: 1fr; gap: 40px; }
  #skills-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  h1 { font-size: 2rem; }
  #tools-grid, #lab-grid, #featured-tools { grid-template-columns: 1fr; }
  .stat { padding: 14px 18px; }
}
