/* ============================================
   FREE-PROXY.FR — Cyber Shield Dark Theme
   A raw, technical aesthetic with terminal
   undertones and sharp red accents.
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&family=Outfit:wght@300;400;600;700;800&display=swap');

/* --- TOKENS --- */
:root {
  --black: #0a0a0c;
  --surface: #111114;
  --surface-2: #18181c;
  --surface-3: #1f1f25;
  --border: #2a2a32;
  --border-bright: #3a3a44;
  --text: #e8e6e3;
  --text-dim: #8a8a96;
  --text-muted: #5a5a66;
  --red: #e8192c;
  --red-dim: #cc0000;
  --red-glow: rgba(232, 25, 44, 0.15);
  --red-glow-strong: rgba(232, 25, 44, 0.3);
  --green: #22c55e;
  --green-dim: rgba(34, 197, 94, 0.12);
  --blue: #3b82f6;
  --mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', 'Cascadia Code', monospace;
  --sans: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --radius: 8px;
  --radius-lg: 14px;
  --max-w: 960px;
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- RESET --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--sans);
  font-weight: 400;
  color: var(--text);
  background: var(--black);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Subtle scanline overlay on the whole page */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.03) 2px,
    rgba(0,0,0,0.03) 4px
  );
  pointer-events: none;
  z-index: 9999;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--red); text-decoration: none; transition: color var(--transition); }
a:hover { color: #ff3344; }

h1, h2, h3, h4 {
  font-family: var(--sans);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}

p { margin: 0 0 1em; }

ul, ol {
  margin: 0.5em 0 1em 1.5em;
  padding: 0;
}

li { margin-bottom: 0.35em; }

/* --- LAYOUT CONTAINER --- */
.site-wrap {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 12, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
}

/* Logo */
.logo {
  font-family: var(--mono);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 3px;
}

.logo:hover { color: var(--text); }

.logo .accent {
  color: var(--red);
}

.logo::before {
  content: '>';
  color: var(--red);
  margin-right: 6px;
  animation: blink-cursor 1.2s step-end infinite;
}

@keyframes blink-cursor {
  50% { opacity: 0; }
}

/* Navigation */
.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.site-nav a {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--text-dim);
  padding: 6px 12px;
  border-radius: 6px;
  transition: all var(--transition);
  text-transform: lowercase;
  letter-spacing: 0.3px;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--text);
  background: var(--surface-2);
}

/* Dropdown */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-dropdown-toggle::after {
  content: '▾';
  font-size: 0.65rem;
  opacity: 0.5;
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
}

/* Pont invisible entre le toggle et le menu pour maintenir le hover */
.nav-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  height: 12px;
}

.nav-dropdown:hover .nav-dropdown-menu {
  display: block;
}

.nav-dropdown-menu a {
  display: block;
  padding: 8px 12px;
  border-radius: 5px;
  font-size: 0.78rem;
  white-space: nowrap;
}

.nav-dropdown-menu a:hover {
  background: var(--surface-3);
}

/* Mobile menu */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 4px;
}

@media (max-width: 640px) {
  .mobile-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 12px 20px;
    gap: 2px;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 10px 12px; width: 100%; }
  .nav-dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    background: var(--surface-3);
    margin-top: 4px;
    border-radius: 6px;
  }
  .nav-dropdown:hover .nav-dropdown-menu,
  .nav-dropdown-menu {
    display: block;
  }
}

/* ============================================
   AD CONTAINERS
   ============================================ */
.ad-container {
  display: flex;
  justify-content: center;
  padding: 16px 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.ad-container--mid {
  margin: 32px 0;
  padding: 24px 0;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.ad-container--bottom {
  margin-top: 32px;
  border-top: 1px solid var(--border);
  border-bottom: none;
}

/* ============================================
   HERO VPN
   ============================================ */
.hero-vpn {
  position: relative;
  overflow: hidden;
  padding: 48px 20px;
  margin: 0;
  background:
    radial-gradient(ellipse at 20% 50%, var(--red-glow) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 50%, rgba(59,130,246,0.06) 0%, transparent 60%),
    var(--surface);
  border-bottom: 1px solid var(--border);
}

.hero-vpn::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--red), transparent);
}

.hero-vpn-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 40px;
}

.hero-vpn-content {
  flex: 1;
}

.hero-vpn-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 16px;
  padding: 5px 12px;
  background: var(--red-glow);
  border: 1px solid rgba(232,25,44,0.2);
  border-radius: 100px;
}

.hero-vpn-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--red);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.hero-vpn h2 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.hero-vpn h2 em {
  font-style: normal;
  color: var(--red);
}

.hero-vpn p {
  color: var(--text-dim);
  font-size: 1rem;
  max-width: 480px;
  margin-bottom: 24px;
  line-height: 1.7;
}

.hero-vpn-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  background: var(--red);
  color: #fff;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: var(--radius);
  text-decoration: none;
  transition: all var(--transition);
  box-shadow: 0 0 24px var(--red-glow-strong);
}

.hero-vpn-cta:hover {
  background: #ff1a2e;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 32px var(--red-glow-strong);
}

.hero-vpn-cta svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.hero-vpn-price {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 12px;
}

.hero-vpn-price strong {
  color: var(--green);
  font-weight: 700;
}

.hero-vpn-visual {
  flex-shrink: 0;
  width: 180px;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.shield-icon {
  width: 100px;
  height: 100px;
  position: relative;
}

.shield-icon::before {
  content: '🛡️';
  font-size: 64px;
  filter: drop-shadow(0 0 20px var(--red-glow-strong));
}

.hero-vpn-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  animation: rotate-ring 20s linear infinite;
}

@keyframes rotate-ring {
  to { transform: rotate(360deg); }
}

@media (max-width: 640px) {
  .hero-vpn { padding: 32px 20px; }
  .hero-vpn-inner { flex-direction: column; text-align: center; gap: 24px; }
  .hero-vpn p { margin-left: auto; margin-right: auto; }
  .hero-vpn-visual { width: 120px; height: 120px; order: -1; }
}

/* ============================================
   CONTENT SECTION (dynamic tpl includes)
   ============================================ */
.content-section {
  padding: 32px 0;
}

.content-section h2 {
  font-size: 1.4rem;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--red);
  display: inline-block;
}

.content-section h3 {
  font-size: 1.1rem;
  margin: 24px 0 10px;
  color: var(--text);
}

.content-section p {
  color: var(--text-dim);
  line-height: 1.8;
  max-width: 720px;
}

.content-section a {
  color: var(--red);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.content-section a:hover {
  color: #ff3344;
}

.content-section img {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin: 16px 0;
}

.content-section ol,
.content-section ul {
  color: var(--text-dim);
  margin-left: 1.5em;
}

.content-section li {
  margin-bottom: 0.5em;
  line-height: 1.7;
}

/* ============================================
   PROXY TABLE SECTION
   ============================================ */
.proxy-section {
  padding: 40px 0;
}

.proxy-section-header {
  margin-bottom: 24px;
}

.proxy-section-header h2 {
  font-size: 1.4rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.proxy-section-header h2::before {
  content: '';
  width: 4px;
  height: 24px;
  background: var(--red);
  border-radius: 2px;
  flex-shrink: 0;
}

.update-badge {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--green);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--green-dim);
  border-radius: 100px;
}

.update-badge::before {
  content: '';
  width: 5px;
  height: 5px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

/* Table wrapper for horizontal scroll on mobile */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.proxy-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.proxy-table thead {
  background: var(--surface-2);
}

.proxy-table th {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-muted);
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.proxy-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-dim);
  white-space: nowrap;
}

.proxy-table tbody tr {
  transition: background var(--transition);
}

.proxy-table tbody tr:hover {
  background: var(--surface-2);
}

.proxy-table tbody tr:last-child td {
  border-bottom: none;
}

.proxy-table td a {
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.82rem;
  text-decoration: none;
}

.proxy-table td a:hover {
  color: var(--red);
}

/* VPN promo row inside table */
.vpn-promo-row td {
  background: var(--red-glow);
  border-bottom: 1px solid rgba(232,25,44,0.15);
  padding: 10px 16px;
}

.vpn-promo-row a {
  color: var(--red) !important;
  font-family: var(--sans) !important;
  font-weight: 700 !important;
  font-size: 0.85rem !important;
  display: flex;
  align-items: center;
  gap: 8px;
}

.vpn-promo-row a::before {
  content: '⚡';
}

/* ============================================
   GUIDE CARDS
   ============================================ */
.guides-section {
  padding: 40px 0 48px;
}

.guides-section h2 {
  font-size: 1.4rem;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.guides-section h2::before {
  content: '';
  width: 4px;
  height: 24px;
  background: var(--red);
  border-radius: 2px;
}

.guides-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.guide-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-decoration: none;
  color: var(--text);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.guide-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.guide-card:hover {
  border-color: var(--border-bright);
  background: var(--surface-2);
  color: var(--text);
  transform: translateY(-2px);
}

.guide-card:hover::before {
  transform: scaleX(1);
}

.guide-card-icon {
  font-size: 1.8rem;
  margin-bottom: 14px;
  display: block;
}

.guide-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.3;
}

.guide-card p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

.guide-card-arrow {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--red);
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 4px;
  opacity: 0;
  transform: translateX(-4px);
  transition: all var(--transition);
}

.guide-card:hover .guide-card-arrow {
  opacity: 1;
  transform: translateX(0);
}

@media (max-width: 640px) {
  .guides-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 20px;
  text-align: center;
}

.site-footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.footer-links a {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--text);
}

.footer-copy {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.red { color: var(--red) !important; }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

/* Screen-reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* ============================================
   ANIMATIONS — staggered entrance
   ============================================ */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-vpn-content,
.proxy-section-header,
.guides-section h2 {
  animation: fade-up 0.6s ease-out both;
}

.guide-card:nth-child(1) { animation: fade-up 0.5s 0.1s ease-out both; }
.guide-card:nth-child(2) { animation: fade-up 0.5s 0.2s ease-out both; }
.guide-card:nth-child(3) { animation: fade-up 0.5s 0.3s ease-out both; }
.guide-card:nth-child(4) { animation: fade-up 0.5s 0.4s ease-out both; }

.table-wrap {
  animation: fade-up 0.5s 0.15s ease-out both;
}

/* ============================================
   LEGACY COMPAT (tpl includes may use these)
   ============================================ */
.dvhdr2 {
  font-family: var(--mono);
  font-weight: 700;
}
