/* ==========================================================================
   Design System - ExodSync (Modern Premium)
   ========================================================================== */

:root {
  /* Couleurs Modernes */
  --color-bg-base: #000000;
  --color-bg-surface: rgba(255, 255, 255, 0.03);
  --color-bg-surface-hover: rgba(255, 255, 255, 0.06);
  
  --color-primary: #0070F3;       /* Bleu intense */
  --color-primary-glow: rgba(0, 112, 243, 0.5);
  --color-accent: #10B981;        /* Vert Émeraude */
  
  --color-text-main: #FFFFFF;
  --color-text-muted: #A1A1AA;    /* Zinc 400 */

  --color-bg-surface-solid: #09090B; /* Fond solide pour footer */

  /* Effets visuels Premium */
  --border-subtle: 1px solid rgba(255, 255, 255, 0.1);
  --border-glow: 1px solid rgba(255, 255, 255, 0.2);
  --blur-heavy: blur(24px);
  
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 9999px;

  /* Typographie */
  --font-family-base: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* ==========================================================================
   Reset & Animations de base
   ========================================================================== */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family-base);
  background-color: var(--color-bg-base);
  color: var(--color-text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  display: flow-root; /* Empêche la fusion des marges (margin collapse) */
}

/* Lumières d'ambiance en arrière-plan (Glows) */
body::before, body::after {
  content: "";
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(120px);
  z-index: -1;
  opacity: 0.4;
  pointer-events: none;
}

body::before {
  top: -100px;
  left: -200px;
  background: radial-gradient(circle, var(--color-primary-glow), transparent 70%);
}

body::after {
  bottom: 20%;
  right: -200px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.3), transparent 70%);
}

a {
  color: var(--color-text-main);
  text-decoration: none;
  transition: all 0.3s ease;
}

/* Textes et Dégradés */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.text-gradient {
  background: linear-gradient(135deg, #FFFFFF 0%, #A1A1AA 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-primary {
  background: linear-gradient(135deg, #0070F3 0%, #00C6FF 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-accent {
  background: linear-gradient(135deg, #10B981 0%, #34D399 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ==========================================================================
   Composants Utilitaires
   ========================================================================== */

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Cartes et Panneaux (Glassmorphism moderne) */
.glass-panel {
  background: var(--color-bg-surface);
  backdrop-filter: var(--blur-heavy);
  -webkit-backdrop-filter: var(--blur-heavy);
  border: var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s ease, background 0.4s ease;
  position: relative;
  overflow: hidden;
}

.glass-panel::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.glass-panel:hover {
  transform: translateY(-5px);
  border-color: var(--border-glow);
  background: var(--color-bg-surface-hover);
}

.glass-panel:hover::before {
  opacity: 1;
}

/* Boutons Modernes */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.75rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border: none;
  letter-spacing: 0.01em;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: #FFFFFF;
  color: #000000;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 4px 14px rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
  transform: scale(1.02);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2), 0 6px 20px rgba(255, 255, 255, 0.3);
}

.btn-accent {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.btn-accent:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
}

.btn-outline {
  background-color: transparent;
  color: var(--color-text-main);
  border: var(--border-subtle);
  backdrop-filter: blur(8px);
}

.btn-outline:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
}

/* Animations JS & CSS */
.fade-in {
  opacity: 0;
  transform: translateY(30px) scale(0.98);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
  100% { transform: translateY(0px); }
}

/* ==========================================================================
   Navigation (Floating Pill)
   ========================================================================== */

.navbar-wrapper {
  position: absolute;
  top: 1.5rem;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  justify-content: center;
  pointer-events: none; /* Laisse passer les clics autour */
}

.navbar {
  pointer-events: auto;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: var(--blur-heavy);
  -webkit-backdrop-filter: var(--blur-heavy);
  border: var(--border-subtle);
  border-radius: var(--radius-pill);
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.navbar-brand img {
  height: 36px;
}

.brand-text {
  font-family: 'Urbanist', var(--font-family-base);
  font-style: italic;
  font-size: 1.4rem;
  line-height: 1;
}

.brand-exod {
  font-weight: 600;
  color: #FFFFFF;
}

.brand-sync {
  font-weight: 300;
  color: var(--color-accent);
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.9rem;
}

.navbar-nav a:not(.btn) {
  color: var(--color-text-muted);
  padding: 0.5rem 0;
}

.navbar-nav a:not(.btn):hover,
.navbar-nav a:not(.btn).active {
  color: var(--color-text-main);
}

/* =========================================
   MEDIA QUERIES (MOBILE RESPONSIVENESS)
========================================= */
@media (max-width: 768px) {
  .navbar-container {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }
  
  .navbar-nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }
  
  .hero {
    padding-top: 8rem;
    padding-bottom: 4rem;
  }
  
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .hero p {
    font-size: 1.1rem;
  }
  
  .hero-buttons {
    flex-direction: column;
    width: 100%;
    padding: 0 1rem;
  }
  
  .hero-buttons .btn {
    width: 100%;
    justify-content: center;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-container {
    flex-direction: column;
    gap: 2rem;
    text-align: center;
  }
  
  .footer-links {
    justify-content: center;
  }
}

/* Hamburger Menu Base Styling */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1000;
}

.hamburger-line {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--color-text-main);
  border-radius: 3px;
  transition: all 0.3s ease;
}

@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }
  
  .navbar {
    position: relative;
    justify-content: space-between;
  }

  .navbar-nav {
    display: none;
    flex-direction: column;
    width: 100%;
    position: absolute;
    top: calc(100% + 1rem);
    left: 0;
    background-color: #000000;
    border: var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
    z-index: 999;
    align-items: center;
    gap: 1.5rem;
  }

  .navbar-nav.show {
    display: flex;
  }

  /* Hamburger Animation when Active */
  .menu-toggle.active .hamburger-line:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
  }
  .menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
  }
  .menu-toggle.active .hamburger-line:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
  }
}

/* Language Switcher */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-muted);
  margin-left: 1rem;
}
.lang-switcher a {
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.lang-switcher a:hover, .lang-switcher a.active {
  color: var(--color-text-main);
  text-shadow: 0 0 10px rgba(255,255,255,0.3);
}
@media (max-width: 768px) {
  .lang-switcher {
    margin-left: 0;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-subtle);
    width: 100%;
    justify-content: center;
  }
}
html, body {
  overflow-x: hidden;
  width: 100%;
}

@media (max-width: 768px) {
  .container {
    padding: 4rem 1.25rem !important;
  }
  .hero {
    margin-top: 100px !important;
    padding: 2rem 1.25rem !important;
    gap: 2rem !important;
  }
  .hero > div {
    min-width: 100% !important;
  }
  .glass-panel {
    padding: 1.5rem !important;
  }
  div[style*="min-width: 300px"] {
    min-width: 100% !important;
  }
  div[style*="minmax(300px"] {
    grid-template-columns: 1fr !important;
  }
  .navbar-wrapper {
    padding: 0 1rem;
    width: 100%;
    box-sizing: border-box;
  }
  .navbar {
    width: 100%;
  }
  .docs-layout {
    flex-direction: column;
    margin-top: 80px;
  }
  .docs-sidebar {
    width: 100%;
    height: auto;
    position: relative;
    top: 0;
    padding: 2rem;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }
  .docs-content {
    padding: 2rem 1.25rem;
  }
  .docs-content h1 {
    font-size: 2rem;
  }
}

/* ==========================================================================
   Lightbox (Image Zoom)
   ========================================================================== */
.lightbox-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease;
  cursor: zoom-out;
}
.lightbox-modal.show {
  opacity: 1;
}
.lightbox-content {
  max-width: 90%;
  max-height: 90%;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.lightbox-modal.show .lightbox-content {
  transform: scale(1);
}

/* ==========================================================================
   Documentation Pro Styles
   ========================================================================== */

/* Z-Pattern Layout */
.doc-section {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 3rem;
    margin-bottom: 5rem;
}
.doc-section.reverse {
    flex-direction: row-reverse;
}
.doc-text {
    flex: 1.8;
    min-width: 300px;
}
.doc-image-container {
    flex: 1;
    min-width: 300px;
    text-align: center;
    margin-top: 2.8rem;
}
.doc-image {
    max-width: 100%;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: zoom-in;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.doc-image:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.6);
}
.doc-image-full {
    width: 100%;
    max-width: 800px;
    margin: 2rem auto;
    display: block;
}

/* Copy Buttons */
.copy-container {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 0.2rem 0.5rem;
    margin: 0.2rem 0;
}
.copy-text {
    font-family: monospace;
    color: var(--color-accent);
    margin-right: 0.8rem;
}
.copy-btn {
    background: none;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.copy-btn:hover {
    color: var(--color-text-main);
}
.copy-feedback {
    font-size: 0.75rem;
    color: #4ade80;
    margin-left: 0.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.copy-feedback.show {
    opacity: 1;
}

/* Callouts (Alerts & Tips) */
.callout {
    padding: 1.5rem;
    border-radius: 10px;
    margin: 2rem 0;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border-left: 4px solid var(--color-text-muted);
}
.callout-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}
.callout-content h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
}
.callout-content p {
    margin: 0;
    font-size: 0.95rem;
}
.callout.tip {
    border-left-color: #3b82f6; /* Blue */
    background: rgba(59, 130, 246, 0.05);
}
.callout.tip h4 { color: #60a5fa; }
.callout.alert {
    border-left-color: #ef4444; /* Red */
    background: rgba(239, 68, 68, 0.05);
}
.callout.alert h4 { color: #f87171; }

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.lightbox.active {
    opacity: 1;
    pointer-events: auto;
}
.lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}
.lightbox.active img {
    transform: scale(1);
}
.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    background: none;
    border: none;
}

/* Card Grid specific for pre-requisites */
.req-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

/* Documentation Typography */
.docs-content p {
    line-height: 1.7;
    margin-bottom: 1.2rem;
}
.docs-content ul, .docs-content ol {
    padding-left: 1.2rem;
    margin-bottom: 1.5rem;
}
.docs-content li {
    line-height: 1.7;
    margin-bottom: 0.8rem;
}

@media (max-width: 768px) {
    .doc-image-container {
        margin-top: 0;
    }
}
