/* ================================================================
   SOEN.DEV — SHARED STYLES v3
   Font: Plus Jakarta Sans
   Themes: Dark (défaut) + Light
================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,200..800;1,200..800&display=swap');

/* ── DARK THEME (défaut) */
:root {
  --bg:           #060b18;
  --bg2:          #090f1f;
  --surface:      #0d1629;
  --surface2:     #111d36;
  --blue:         #1d4ed8;
  --blue-mid:     #2563eb;
  --blue-light:   #3b82f6;
  --blue-glow:    #60a5fa;
  --cyan:         #22d3ee;
  --text:         #eef2ff;
  --text-dim:     #8899bb;
  --text-muted:   #3d4f72;
  --border:       rgba(59,130,246,0.14);
  --border2:      rgba(59,130,246,0.32);
  --card-bg:      rgba(13,22,41,0.85);
  --nav-bg:       rgba(6, 11, 24, 0.65);
  --nav-bg-sc:    rgba(6, 11, 24, 0.85);
  --footer-bg:    rgba(6,11,24,0.97);
  --glow:         0 0 40px rgba(59,130,246,0.18);
  --transition:   cubic-bezier(0.4,0,0.2,1);  
  --nav-h:        68px;
  --scroll-color: linear-gradient(90deg, #2563eb, #22d3ee);
  --tag-bg:       rgba(59,130,246,0.1);
  --tag-border:   rgba(59,130,246,0.28);
  --tag-color:    #60a5fa;
  --section-label-color: #60a5fa;
  --input-bg:     rgba(13,22,41,0.7);
  --scrollbar-thumb: #1d3461;
}

/* ── LIGHT THEME */
html.light {
  --bg:           #f0f4ff;
  --bg2:          #e8eeff;
  --surface:      #ffffff;
  --surface2:     #f5f7ff;
  --blue:         #1d4ed8;
  --blue-mid:     #2563eb;
  --blue-light:   #3b82f6;
  --blue-glow:    #1d4ed8;
  --cyan:         #0891b2;
  --text:         #0f172a;
  --text-dim:     #4b5a7a;
  --text-muted:   #94a3b8;
  --border:       rgba(37,99,235,0.14);
  --border2:      rgba(37,99,235,0.35);
  --card-bg:      rgba(255,255,255,0.9);
  --nav-bg:       rgba(240, 244, 255, 0.7); 
  --nav-bg-sc:    rgba(240, 244, 255, 0.9);
  --footer-bg:    rgba(240,244,255,0.98);
  --glow:         0 0 40px rgba(37,99,235,0.1);
  --tag-bg:       rgba(37,99,235,0.07);
  --tag-border:   rgba(37,99,235,0.22);
  --tag-color:    #60a5fa;
  --section-label-color: #1d4ed8;
  --input-bg:     rgba(255,255,255,0.92);
  --scrollbar-thumb: #c0d0ee;
}

/* ── RESET */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; cursor: none; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Plus Jakarta Sans', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background 0.35s, color 0.35s;
}

/* ── SCROLL PROGRESS BAR */
#scroll-bar {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: var(--scroll-color);
  z-index: 9999;
  border-radius: 0 2px 2px 0;
  box-shadow: 0 0 12px rgba(96,165,250,0.6);
  pointer-events: none;
  transition: none;
}

/* ── CANVAS */
#space-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 1;
  transition: opacity 0.5s;
}
html.light #space-canvas { opacity: 0.2; }

/* ── NOISE */
.noise {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.02;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* ── CURSOR */
#cursor-dot {
  position: fixed;
  width: 7px; height: 7px;
  background: var(--blue-glow);
  border-radius: 50%;
  pointer-events: none;
  z-index: 8999;
  transform: translate(-50%,-50%);
  transition: none;
  mix-blend-mode: screen;
}
html.light #cursor-dot { mix-blend-mode: multiply; }
#cursor-ring {
  position: fixed;
  width: 30px; height: 30px;
  border: 1.5px solid var(--blue-light);
  border-radius: 50%;
  pointer-events: none;
  z-index: 8998;
  transform: translate(-50%,-50%);
  transition: width 0.18s var(--transition), height 0.18s var(--transition), opacity 0.18s, border-color 0.18s;
  opacity: 0.55;
}
#cursor-ring.hovering { width: 46px; height: 46px; opacity: 0.9; border-color: var(--cyan); }

/* ── NAVBAR */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1.25rem, 5vw, 3.5rem);
  
  /* Utilisation de la version légèrement plus opaque pour la lisibilité */
  background: var(--nav-bg-sc); 
  
  /* Effet de flou constant */
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  
  /* Bordure et ombre permanentes */
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15); 
  
  /* Plus besoin de transition sur le background si elle ne change pas */
  transition: transform 0.3s var(--transition);
}
.navbar.scrolled { background: var(--nav-bg-sc); box-shadow: 0 4px 28px rgba(0,0,0,0.28); }

.nav-logo {
  font-weight: 800;
  font-size: 1.22rem;
  letter-spacing: -0.03em;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 1px;
  flex-shrink: 0;
}
.nav-logo .logo-accent { color: var(--blue-glow); }
.nav-logo .logo-dot {
  width: 6px; height: 6px;
  background: var(--cyan);
  border-radius: 50%;
  margin-left: 3px;
  display: inline-block;
  animation: dot-pulse 2.2s ease infinite;
}
@keyframes dot-pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(34,211,238,0.7); opacity: 1; }
  60% { box-shadow: 0 0 0 5px rgba(34,211,238,0); opacity: 0.7; }
}

.nav-links {
  display: flex;
  list-style: none;
  align-items: center;
  gap: 0;
}
.nav-links a {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 0.85rem;
  height: var(--nav-h);
  font-size: 0.87rem;
  font-weight: 600;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.22s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 50%;
  width: 0; height: 2px;
  background: linear-gradient(90deg, var(--blue-light), var(--cyan));
  transform: translateX(-50%);
  transition: width 0.28s var(--transition);
  border-radius: 2px 2px 0 0;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a:hover::after, .nav-links a.active::after { width: 72%; }
.nav-icon { font-size: 0.7rem; opacity: 0.5; }

.nav-right { display: flex; align-items: center; gap: 0.6rem; }

.theme-toggle {
  width: 36px; height: 36px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  background: var(--tag-bg);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.22s;
  flex-shrink: 0;
}
.theme-toggle:hover { border-color: var(--border2); color: var(--blue-glow); transform: rotate(18deg); }

/* ── LANG TOGGLE */
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 36px;
  padding: 0 0.7rem;
  border-radius: 9px;
  background: var(--tag-bg);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.78rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.22s;
  flex-shrink: 0;
}
.lang-toggle:hover { border-color: var(--border2); color: var(--blue-glow); transform: scale(1.04); }
.lang-flag { font-size: 1rem; line-height: 1; }
.lang-label { font-size: 0.72rem; }

/* ── LIKE BUTTON */
.like-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 0.75rem;
  border-radius: 9px;
  background: var(--tag-bg);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.82rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.22s;
  flex-shrink: 0;
  position: relative;
}
.like-btn i { font-size: 0.85rem; transition: transform 0.3s, color 0.22s; }
.like-btn:hover { border-color: rgba(239,68,68,0.4); color: #ef4444; }
.like-btn:hover i { transform: scale(1.2); }
.like-btn.liked {
  background: rgba(239,68,68,0.1);
  border-color: rgba(239,68,68,0.4);
  color: #ef4444;
}
.like-btn.liked i { color: #ef4444; animation: heart-pop 0.4s var(--transition); }
.like-count { min-width: 14px; text-align: center; }
@keyframes heart-pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.45); }
  70% { transform: scale(0.9); }
  100% { transform: scale(1); }
}

/* ── LIKE TOAST NOTIFICATION */
#like-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 12px;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  z-index: 9999;
  transition: transform 0.4s var(--transition), opacity 0.4s;
  opacity: 0;
  white-space: nowrap;
  backdrop-filter: blur(16px);
}
#like-toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
#like-toast i { color: #ef4444; font-size: 1rem; }

.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none; border: none;
  width: 36px;
}
.nav-burger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s var(--transition);
}
.nav-burger.open span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.nav-burger.open span:nth-child(2) { opacity: 0; transform: translateX(-10px); }
.nav-burger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

@media (max-width: 820px) {
  .nav-links {
    position: fixed;
    top: var(--nav-h); left: 0; right: 0;
    background: var(--nav-bg-sc);
    backdrop-filter: blur(30px);
    flex-direction: column;
    padding: 0.75rem 0 1.5rem;
    border-bottom: 1px solid var(--border);
    transform: translateY(-110%);
    opacity: 0;
    transition: transform 0.38s var(--transition), opacity 0.38s;
    pointer-events: none;
  }
  .nav-links.open { transform: translateY(0); opacity: 1; pointer-events: all; }
  .nav-links a { height: 50px; width: 100%; justify-content: center; }
  .nav-burger { display: flex; }
}

/* ── PAGE WRAPPER */
main { position: relative; z-index: 1; padding-top: var(--nav-h); }
.container { width: min(100%, 1180px); margin: 0 auto; padding: 0 clamp(1.25rem, 5vw, 2.5rem); }

/* ── SECTION LABEL */
.section-label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--section-label-color);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0.65rem;
}
.section-label::before { content: ''; width: 22px; height: 1.5px; background: currentColor; border-radius: 2px; }

/* ── SECTION TITLE */
.section-title {
  font-size: clamp(1.9rem, 5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--text);
}
.section-title span { color: var(--blue-glow); }

/* ── BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.72rem 1.65rem;
  border-radius: 9px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 0.875rem;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.22s var(--transition);
  position: relative;
  overflow: hidden;
}
.btn::after { content: ''; position: absolute; inset: 0; background: rgba(255,255,255,0.08); opacity: 0; transition: opacity 0.18s; }
.btn:hover::after { opacity: 1; }
.btn-primary { background: linear-gradient(135deg, var(--blue-mid), var(--blue-glow)); color: #fff; box-shadow: 0 4px 18px rgba(37,99,235,0.38); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(37,99,235,0.5); }
.btn-outline { background: transparent; color: var(--blue-glow); border: 1.5px solid var(--border2); }
.btn-outline:hover { border-color: var(--blue-glow); background: var(--tag-bg); transform: translateY(-2px); }

/* ── CARD */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  backdrop-filter: blur(12px);
  transition: border-color 0.28s, box-shadow 0.28s, transform 0.28s var(--transition);
}
.card:hover { border-color: var(--border2); box-shadow: var(--glow); transform: translateY(-4px); }

/* ── TAG */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  background: var(--tag-bg);
  border: 1px solid var(--tag-border);
  border-radius: 5px;
  font-size: 0.69rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--tag-color);
}

/* ── REVEAL */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.65s var(--transition), transform 0.65s var(--transition); }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ── PAGE HERO shared */
.page-hero { padding: 4.5rem 0 3rem; position: relative; z-index: 1; }
.page-hero-sub { color: var(--text-dim); font-size: 1rem; margin: 0.9rem 0 0; max-width: 520px; }

/* ── FOOTER */
footer {
  position: relative; z-index: 1;
  background: var(--footer-bg);
  border-top: 1px solid var(--border);
  padding: 3.5rem 0 2rem;
  margin-top: 5rem;
  backdrop-filter: blur(20px);
}
.footer-grid { display: grid; grid-template-columns: 1.8fr 1fr 1fr; gap: 2.5rem; margin-bottom: 2.5rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 1.75rem; } }
.footer-brand .nav-logo { margin-bottom: 0.85rem; font-size: 1.3rem; }
.footer-brand p { color: var(--text-dim); font-size: 0.85rem; line-height: 1.75; max-width: 270px; }
.footer-col h4 { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 1.1rem; }
.footer-col ul { list-style: none; }
.footer-col ul li + li { margin-top: 0.55rem; }
.footer-col a { color: var(--text-dim); text-decoration: none; font-size: 0.875rem; transition: color 0.2s; }
.footer-col a:hover { color: var(--blue-glow); }
.footer-socials { display: flex; gap: 0.65rem; flex-wrap: wrap; }
.footer-socials a {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  background: var(--tag-bg);
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.22s;
}
.footer-socials a:hover { border-color: var(--border2); color: var(--blue-glow); transform: translateY(-3px); box-shadow: 0 6px 18px rgba(59,130,246,0.18); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 1.35rem; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.75rem; }
.footer-bottom p { color: var(--text-muted); font-size: 0.78rem; }
.footer-bottom span { color: var(--blue-glow); }

/* ── SCROLLBAR */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--blue-mid); }

::selection { background: rgba(59,130,246,0.28); color: var(--text); }
