/* Selim Reggabi - English Section - Premium Zenith Style */
/* Dark theme with cyan/purple gradients - Authority positioning */
/* UPDATED: Unified navigation system matching French BaseLayout */

:root {
  --bg: #0a0a0f;
  --bg-card: #12121a;
  --bg-card-hover: #1a1a25;
  --text: #e5e5e5;
  --text-muted: #9ca3af;
  --text-dim: #6b7280;
  --cyan: #22d3ee;
  --cyan-dim: #0891b2;
  --purple: #a855f7;
  --purple-dim: #7c3aed;
  --border: #2a2a3a;
  --border-accent: rgba(34, 211, 238, 0.3);
  --gradient-text: linear-gradient(135deg, #22d3ee, #a855f7);
  --gradient-bg: linear-gradient(135deg, rgba(34, 211, 238, 0.1), rgba(168, 85, 247, 0.1));
  --gradient-border: linear-gradient(135deg, rgba(34, 211, 238, 0.5), rgba(168, 85, 247, 0.5));
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  padding: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

/* Typography */
h1 {
  font-size: 2.8rem;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 1.8rem;
  color: var(--cyan);
  margin: 3rem 0 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
}

h3 {
  font-size: 1.3rem;
  color: var(--text);
  margin: 2rem 0 1rem;
  font-weight: 600;
}

p {
  margin-bottom: 1rem;
  color: var(--text-muted);
}

strong {
  color: var(--text);
  font-weight: 600;
}

/* Links */
a {
  color: var(--cyan);
  text-decoration: none;
  transition: all 0.2s ease;
}

a:hover {
  color: var(--purple);
  text-decoration: none;
}

/* Header */
header {
  text-align: center;
  padding: 3rem 0 4rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border);
  background: var(--gradient-bg);
  border-radius: 16px;
  position: relative;
}

header::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  padding: 1px;
  background: var(--gradient-border);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.subtitle {
  color: var(--text-muted);
  font-size: 1.2rem;
  margin-top: 0.75rem;
}

/* Navigation - Single condensed bar */
nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  padding: 1rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 1rem;
}

nav strong {
  color: var(--cyan);
  margin-right: 0.75rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

nav a {
  padding: 0.4rem 0.9rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: all 0.2s ease;
}

nav a:hover {
  background: var(--gradient-bg);
  border-color: var(--cyan-dim);
  color: var(--cyan);
}

/* Main content */
main {
  padding: 1.5rem 0;
}

section {
  margin-bottom: 3.5rem;
  padding: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
}

section:hover {
  border-color: rgba(34, 211, 238, 0.2);
}

/* Facts grid - Key information cards */
.fact {
  padding: 1rem 1.25rem;
  background: var(--bg);
  border-left: 3px solid var(--cyan);
  margin-bottom: 0.75rem;
  border-radius: 0 8px 8px 0;
  transition: all 0.2s ease;
}

.fact:hover {
  background: var(--bg-card-hover);
  border-left-color: var(--purple);
}

.fact strong {
  color: var(--cyan);
  font-weight: 600;
}

/* Definition lists (Q&A) */
dl.qa {
  margin: 1.5rem 0;
}

dl.qa dt {
  font-weight: 600;
  color: var(--cyan);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  font-size: 1.05rem;
}

dl.qa dt::before {
  content: 'Q: ';
  color: var(--purple);
  font-weight: 700;
}

dl.qa dd {
  margin-left: 0;
  padding: 1rem 1.25rem;
  background: var(--bg);
  border-radius: 8px;
  color: var(--text-muted);
  border-left: 2px solid var(--border);
}

/* Lists */
ul, ol {
  margin: 1.25rem 0;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.6rem;
  color: var(--text-muted);
}

li strong {
  color: var(--text);
}

li a {
  font-weight: 500;
}

/* Blockquotes */
blockquote {
  border-left: 3px solid var(--cyan);
  padding: 1.25rem 1.75rem;
  margin: 2rem 0;
  background: var(--gradient-bg);
  border-radius: 0 12px 12px 0;
  font-style: italic;
  color: var(--text);
}

blockquote p:last-child {
  margin-bottom: 0;
}

/* Code */
code {
  background: var(--bg);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.9em;
  color: var(--cyan);
  border: 1px solid var(--border);
}

pre {
  background: var(--bg);
  padding: 1.25rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 1px solid var(--border);
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  background: var(--bg);
  border-radius: 8px;
  overflow: hidden;
}

th, td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  background: var(--gradient-bg);
  color: var(--cyan);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}

tr:hover td {
  background: var(--bg-card-hover);
}

/* CTA Section */
.cta {
  text-align: center;
  padding: 3rem 2rem;
  background: var(--gradient-bg);
  border: 1px solid var(--border-accent);
  border-radius: 16px;
  margin: 3rem 0;
}

.cta h3 {
  color: var(--text);
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.cta p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.cta-button {
  display: inline-block;
  padding: 1rem 2.5rem;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  color: var(--bg) !important;
  font-weight: 700;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all 0.3s ease;
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(34, 211, 238, 0.3);
}

.cta-secondary {
  display: inline-block;
  margin-left: 1rem;
  padding: 1rem 2rem;
  border: 1px solid var(--cyan);
  color: var(--cyan) !important;
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.cta-secondary:hover {
  background: rgba(34, 211, 238, 0.1);
}

/* Footer */
footer {
  margin-top: 4rem;
  padding: 2.5rem 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  text-align: center;
}

footer p {
  color: var(--text-dim);
  margin-bottom: 0.5rem;
}

footer a {
  color: var(--cyan-dim);
}

footer a:hover {
  color: var(--cyan);
}

/* Language Switcher - Visible and styled */
.lang-switch {
  display: inline-flex;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.lang-switch a,
.lang-switch span {
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.9rem;
}

.lang-switch a {
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.lang-switch a:hover {
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.1);
}

.lang-switch span {
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.15);
}

/* Badge/Tag for claims */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: var(--gradient-bg);
  border: 1px solid var(--border-accent);
  border-radius: 20px;
  font-size: 0.8rem;
  color: var(--cyan);
  font-weight: 500;
  margin-right: 0.5rem;
}

/* Highlight box for important info */
.highlight {
  padding: 1.5rem;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.05), rgba(168, 85, 247, 0.05));
  border: 1px solid var(--border-accent);
  border-radius: 12px;
  margin: 1.5rem 0;
}

.highlight strong {
  color: var(--cyan);
}

/* Responsive */
@media (max-width: 768px) {
  body {
    padding: 1rem;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  section {
    padding: 1.5rem;
  }

  nav {
    flex-direction: column;
    align-items: flex-start;
  }

  .cta-secondary {
    margin-left: 0;
    margin-top: 1rem;
  }

  .lang-switch {
    flex-direction: row;
  }
}

/* Animation subtile au scroll */
@media (prefers-reduced-motion: no-preference) {
  section {
    animation: fadeIn 0.5s ease-out;
  }

  @keyframes fadeIn {
    from {
      opacity: 0;
      transform: translateY(10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

/* ============================================== */
/* UNIFIED NAVIGATION - Matches French BaseLayout */
/* ============================================== */

.unified-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: rgba(10, 10, 15, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-brand {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--cyan) !important;
  text-decoration: none !important;
  letter-spacing: 0.1em;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--text-muted) !important;
  text-decoration: none !important;
  font-size: 0.9rem;
  transition: color 0.2s;
  padding: 0;
  background: none;
  border: none;
}

.nav-links a:hover {
  color: var(--cyan) !important;
}

.universe-switch {
  display: flex;
  gap: 0.5rem;
}

.universe-switch button {
  padding: 0.5rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: var(--text-muted);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.universe-switch button:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

.universe-switch button.active {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.2), rgba(168, 85, 247, 0.2));
  border-color: var(--cyan);
  color: var(--cyan);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.hamburger-line {
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: all 0.3s;
}

.hamburger.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.hamburger.active .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 10, 15, 0.98);
  z-index: 999;
  padding-top: 80px;
}

.mobile-menu.active {
  display: block;
}

.mobile-menu-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 2rem;
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.mobile-nav-links a {
  color: var(--text) !important;
  text-decoration: none !important;
  font-size: 1.25rem;
}

.mobile-universe-switch {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.mobile-universe-switch button {
  padding: 0.75rem 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: var(--text-muted);
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
}

/* Body padding when unified nav is present */
body.has-unified-nav {
  padding-top: 80px;
}

/* Unified Footer */
.unified-footer {
  background: var(--bg);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 4rem 2rem 2rem;
  margin-top: 4rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 3rem;
}

.footer-section h4 {
  color: var(--cyan);
  font-size: 1rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-section li {
  margin-bottom: 0.5rem;
}

.footer-section a {
  color: var(--text-muted) !important;
  text-decoration: none !important;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.footer-section a:hover {
  color: var(--cyan) !important;
}

.footer-bottom {
  max-width: 1200px;
  margin: 3rem auto 0;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.footer-bottom p {
  color: #71717a;
  font-size: 0.9rem;
  margin: 0;
}

@media (max-width: 768px) {
  .nav-links, .universe-switch {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .unified-nav {
    padding: 1rem;
  }

  .footer-content {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
}

@media (max-width: 480px) {
  .footer-content {
    grid-template-columns: 1fr;
  }
}
