/* ==========================================================================
   Epsylon Box — LAYOUT
   Structures : header, navigation, hero, sections, footer, bottom-nav,
   breadcrumb, et responsive de la structure globale.
   ========================================================================== */

/* === HEADER === */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(10, 10, 15, 0.85); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-bottom: 1px solid var(--border); padding: env(safe-area-inset-top, 0) 24px 0 24px; }
.header-inner { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-family: 'Outfit', sans-serif; font-weight: 800; font-size: 1.3rem; letter-spacing: -0.5px; }
.logo-icon { width: 36px; height: 36px; background: linear-gradient(135deg, var(--accent), var(--accent2)); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; color: #fff; font-weight: 800; }

.nav-links { display: flex; gap: 8px; list-style: none; align-items: center; }
.nav-links a { color: var(--text2); text-decoration: none; font-size: 0.9rem; font-weight: 500; padding: 8px 16px; border-radius: var(--radius-sm); transition: all 0.2s; }
.nav-links a:hover, .nav-links a.active { color: var(--accent); background: var(--glow); }

.header-btn {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--bg2); color: var(--text2); font-size: 1rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: all 0.2s; position: relative;
}
.header-btn:hover { border-color: var(--accent); color: var(--accent); }
.theme-toggle { margin-left: 4px; }
.fav-count {
  position: absolute; top: -4px; right: -4px; background: var(--accent3); color: #fff;
  font-size: 0.62rem; font-weight: 700; width: 16px; height: 16px; border-radius: 50%;
  display: none; align-items: center; justify-content: center; line-height: 1;
}
.fav-count.visible { display: flex; }
.nav-toggle { display: none; background: none; border: none; color: var(--text); font-size: 1.5rem; cursor: pointer; }

/* === HERO === */
.hero { text-align: center; padding: 80px 24px 40px; position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; top: -200px; left: 50%; transform: translateX(-50%); width: 900px; height: 700px; background: radial-gradient(ellipse, var(--glow) 0%, var(--glow2) 35%, transparent 65%); pointer-events: none; z-index: 0; animation: heroPulse 6s ease-in-out infinite alternate; }
@keyframes heroPulse { 0% { opacity: 0.8; transform: translateX(-50%) scale(1); } 100% { opacity: 1; transform: translateX(-50%) scale(1.05); } }
.hero > * { position: relative; z-index: 1; }
.hero h1 { font-family: 'Outfit', sans-serif; font-size: clamp(2.2rem, 5vw, 3.8rem); font-weight: 900; letter-spacing: -1.5px; line-height: 1.1; margin-bottom: 16px; animation: heroFadeIn 0.6s ease; }
@keyframes heroFadeIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.hero h1 .gradient { background: linear-gradient(135deg, var(--accent), var(--accent2), var(--accent3)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; background-size: 200% 200%; animation: gradientShift 4s ease infinite; }
@keyframes gradientShift { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
.hero p { color: var(--text2); font-size: 1.15rem; max-width: 540px; margin: 0 auto; animation: heroFadeIn 0.6s ease 0.15s both; }

.hero-stats { display: flex; justify-content: center; gap: 32px; margin-top: 24px; animation: heroFadeIn 0.6s ease 0.3s both; }
.hero-stat { text-align: center; }
.hero-stat .num { font-family: 'Outfit', sans-serif; font-size: 2rem; font-weight: 900; color: var(--accent); }
.hero-stat .num.purple { color: var(--accent2); }
.hero-stat .num.pink { color: var(--accent3); }
.hero-stat .lbl { font-size: 0.72rem; color: var(--text2); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }

/* === SECTIONS === */
.section { max-width: 1200px; margin: 0 auto; padding: 40px 24px; }
.section-title { font-family: 'Outfit', sans-serif; font-size: 1.5rem; font-weight: 700; margin-bottom: 8px; display: flex; align-items: center; gap: 10px; }
.section-title .icon { font-size: 1.3rem; }
.section-sub { color: var(--text2); font-size: 0.95rem; margin-bottom: 28px; }

/* === BREADCRUMB === */
.breadcrumb { max-width: 800px; margin: 0 auto; padding: 20px 24px 0; font-size: 0.85rem; color: var(--text2); }
.breadcrumb a { color: var(--text2); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }

/* === FOOTER === */
.site-footer {
  border-top: 1px solid var(--border); padding: 40px 24px 32px; text-align: center;
  color: var(--text2); font-size: 0.85rem; margin-top: 60px;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.1));
}
.site-footer a { color: var(--accent); text-decoration: none; transition: color 0.15s; }
.site-footer a:hover { color: var(--accent2); }
.footer-links { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; margin-bottom: 12px; }
.footer-links a { color: var(--text2); font-size: 0.82rem; }
.footer-links a:hover { color: var(--accent); }
.footer-brand { font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 0.9rem; color: var(--text); margin-bottom: 6px; }

/* === BOTTOM NAV BAR (mobile PWA) === */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.92);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  padding: 6px 0 calc(6px + env(safe-area-inset-bottom, 0));
}
.bottom-nav-inner { display: flex; justify-content: space-around; align-items: center; max-width: 500px; margin: 0 auto; }
.bottom-nav a {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  text-decoration: none; color: var(--text2);
  font-family: 'Outfit', sans-serif; font-size: 0.62rem; font-weight: 600;
  padding: 4px 12px; border-radius: 8px; transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.bottom-nav a .nav-icon { font-size: 1.3rem; line-height: 1; }
.bottom-nav a:active { transform: scale(0.92); }
.bottom-nav a.active, .bottom-nav a:hover { color: var(--accent); }

/* === RESPONSIVE — structure globale === */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .nav-links.open { display: flex; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: var(--bg2); border-bottom: 1px solid var(--border); padding: 16px; z-index: 101; }
  .hero { padding: 50px 20px 30px; }
  .hero-stats { gap: 20px; }
  .hero-stat .num { font-size: 1.5rem; }
  .bottom-nav { display: block; }
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0)); }
  .site-footer { padding-bottom: calc(32px + 64px + env(safe-area-inset-bottom, 0)); }
}
