/* ═══════════════════════════════════════════
   LAYOUT - Hostynet Redesign
   ═══════════════════════════════════════════ */

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background:
    radial-gradient(ellipse at 15% 20%, rgba(26, 143, 196, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 85% 60%, rgba(78, 198, 224, 0.10) 0%, transparent 45%),
    radial-gradient(ellipse at 50% 90%, rgba(26, 143, 196, 0.06) 0%, transparent 40%),
    var(--bg);
  color: var(--text);
  line-height: 1.65;
  padding-top: 80px;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--transition-base), color var(--transition-base);
  overflow-x: hidden;
}

section {
  position: relative;
}

.container {
  position: relative;
  z-index: 2;
}

/* ── Navbar ── */
.navbar {
  background: var(--nav);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(24px) saturate(1.6);
  -webkit-backdrop-filter: blur(24px) saturate(1.6);
  transition: background var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base);
  padding: 0.6rem 0;
}

.navbar::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 20%;
  right: 20%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(26, 143, 196, 0.3), rgba(78, 198, 224, 0.2), transparent);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.navbar.scrolled::after {
  opacity: 1;
}

.navbar.scrolled {
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(32px) saturate(1.8);
  -webkit-backdrop-filter: blur(32px) saturate(1.8);
  background: var(--nav);
}

.navbar-brand img {
  transition: transform var(--transition-fast);
}

.navbar-brand:hover img {
  transform: scale(1.05);
}

.nav-link {
  color: var(--text) !important;
  font-weight: 500;
  font-size: 0.9rem;
  position: relative;
  padding: 0.5rem 0.85rem !important;
  transition: color var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary) !important;
}

.nav-link.active::after {
  transform: scaleX(1);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0.85rem;
  right: 0.85rem;
  bottom: 0.25rem;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform: scaleX(0);
  transform-origin: center;
  transition: transform var(--transition-fast);
}

.nav-link:hover::after,
.nav-link:focus-visible::after {
  transform: scaleX(1);
}

.navbar-toggler {
  border-color: var(--border-strong);
  box-shadow: none !important;
  padding: 0.4rem 0.6rem;
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.2) !important;
}

[data-theme="dark"] .navbar-toggler-icon {
  filter: invert(1);
}

/* ── Hero ── */
.hero,
.hero-minecraft {
  position: relative;
  color: #fff;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hero {
  min-height: 92vh;
  padding: 140px 20px 100px;
  background:
    linear-gradient(160deg, rgba(3, 10, 18, 0.94) 0%, rgba(15, 85, 125, 0.8) 50%, rgba(35, 130, 160, 0.65) 100%),
    url('/assets/img/data-center.webp') center/cover no-repeat;
}

.hero-minecraft {
  min-height: 82vh;
  padding: 130px 20px 100px;
  background:
    linear-gradient(160deg, rgba(6, 13, 24, 0.85) 0%, rgba(16, 185, 129, 0.3) 100%),
    url('/assets/img/minecraft01.jpg') center/cover no-repeat;
}

/* Grain overlay subtil */
.hero::before,
.hero-minecraft::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(37, 99, 235, 0.15), transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(6, 182, 212, 0.12), transparent 40%);
  pointer-events: none;
  z-index: 1;
}

/* Floating orbs decoratifs */
.hero::after {
  content: "";
  position: absolute;
  width: 700px;
  height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(26, 143, 196, 0.15), transparent 60%);
  top: -250px;
  right: -250px;
  pointer-events: none;
  animation: float-orb 8s ease-in-out infinite alternate;
  z-index: 1;
}

/* Second orb bottom-left */
.hero .container::after {
  content: "";
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(78, 198, 224, 0.1), transparent 60%);
  bottom: -300px;
  left: -200px;
  pointer-events: none;
  animation: float-orb 10s ease-in-out 2s infinite alternate;
  z-index: 0;
}

@keyframes float-orb {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-40px, 40px) scale(1.1); }
}

.hero .container,
.hero-minecraft .container {
  position: relative;
  z-index: 2;
}

.hero h1,
.hero-minecraft h1 {
  font-size: clamp(2rem, 5vw, 3.75rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.08;
  max-width: 18ch;
  margin-left: auto;
  margin-right: auto;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.5);
}


.hero p.lead,
.hero-minecraft p.lead {
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35);
  font-size: 1.1rem;
  line-height: 1.75;
  letter-spacing: 0.005em;
}

.hero .badge,
.hero-minecraft .badge {
  box-shadow: var(--shadow-md);
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* Hero subtitle pill */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 999px;
  padding: 0.5rem 1.35rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 1.75rem;
  letter-spacing: 0.02em;
}

.hero-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  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); }
}

/* ── Typographie ── */
h1, h2, h3, h4, h5, h6 {
  font-family: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
  color: var(--text);
  letter-spacing: -0.02em;
}

.hero h1, .hero h2, .hero h3,
.hero-minecraft h1, .hero-minecraft h2, .hero-minecraft h3 {
  color: #fff;
}

p { margin-bottom: 1rem; }

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-header h2 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 1rem;
  position: relative;
}

.section-header h2::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  background: var(--gradient-brand);
  border-radius: 999px;
  margin: 0.75rem auto 0;
}

.section-header p {
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.section-label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.75rem;
}

.section-alt .section-label {
  color: var(--primary-light);
}

/* ── Sections ── */
.section-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  position: relative;
}

.py-section {
  padding: 6rem 0;
}

/* ── Scroll Reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.revealed {
  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; }

/* Hero staggered entrance */
.hero-entrance {
  opacity: 0;
  transform: translateY(20px);
  animation: hero-fade-in 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero-entrance-1 { animation-delay: 0.1s; }
.hero-entrance-2 { animation-delay: 0.25s; }
.hero-entrance-3 { animation-delay: 0.4s; }
.hero-entrance-4 { animation-delay: 0.55s; }
.hero-entrance-5 { animation-delay: 0.7s; }

@keyframes hero-fade-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Page Header (mini-hero pour pages internes) ── */
.page-header {
  position: relative;
  padding: 4.5rem 0 3.25rem;
  text-align: center;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(26, 143, 196, 0.10), transparent 60%),
    radial-gradient(ellipse at 80% 100%, rgba(78, 198, 224, 0.08), transparent 50%),
    var(--bg-alt);
  border-bottom: 1px solid var(--border-soft);
  overflow: hidden;
}

.page-header::before {
  content: "";
  position: absolute;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(26, 143, 196, 0.08), transparent 60%);
  top: -240px;
  right: -120px;
  pointer-events: none;
  animation: float-orb 8s ease-in-out infinite alternate;
}

.page-header::after {
  content: "";
  position: absolute;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(78, 198, 224, 0.06), transparent 60%);
  bottom: -180px;
  left: -100px;
  pointer-events: none;
  animation: float-orb 10s ease-in-out 2s infinite alternate;
}

.page-header > .container {
  position: relative;
  z-index: 2;
}

.page-header .hero-badge {
  background: rgba(26, 143, 196, 0.10);
  border: 1px solid rgba(26, 143, 196, 0.22);
  color: var(--primary);
  margin-bottom: 1.25rem;
}

[data-theme="dark"] .page-header .hero-badge {
  background: rgba(78, 198, 224, 0.10);
  border-color: rgba(78, 198, 224, 0.22);
  color: var(--accent);
}

.page-header .hero-badge .dot {
  background: var(--primary);
}

[data-theme="dark"] .page-header .hero-badge .dot {
  background: var(--accent);
}

.page-header h1 {
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 0 auto 0.85rem;
  color: var(--text);
  max-width: 22ch;
  text-shadow: none;
}

.page-header .lead {
  max-width: 640px;
  margin: 0 auto;
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

@media (max-width: 768px) {
  .page-header {
    padding: 3rem 0 2.25rem;
  }
  .page-header .lead {
    font-size: 0.95rem;
  }
}

/* ── Stats bar ── */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}

.stat-item {
  text-align: center;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  padding: 1.25rem 1rem;
  transition: transform var(--transition-base), border-color var(--transition-base), background var(--transition-base);
}

.stat-item:hover {
  transform: translateY(-4px);
  border-color: rgba(78, 198, 224, 0.3);
  background: rgba(255, 255, 255, 0.1);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.03em;
  line-height: 1.2;
  text-shadow: 0 0 30px rgba(78, 198, 224, 0.4), 0 2px 16px rgba(0, 0, 0, 0.3);
}

.stat-label {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.85);
  margin-top: 0.25rem;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.3);
}



/* ── Responsive ── */
@media (max-width: 991.98px) {
  body { padding-top: 72px; }

  .hero, .hero-minecraft {
    text-align: center;
    min-height: auto;
  }

  .hero h1, .hero-minecraft h1 {
    max-width: none;
    font-size: clamp(1.75rem, 6vw, 2.5rem);
  }

  .py-section { padding: 4rem 0; }
}

@media (max-width: 768px) {
  .hero, .hero-minecraft {
    padding: 100px 15px 80px;
  }

  .hero p.lead, .hero-minecraft p.lead {
    font-size: 1rem;
  }

  .hero .btn, .hero-minecraft .btn {
    width: 100%;
    min-width: unset;
    font-size: 0.9rem;
    padding: 0.75rem 1.25rem;
  }

  .hero .d-flex.gap-3, .hero-minecraft .d-flex.gap-3 {
    width: 100%;
    flex-direction: column;
  }

  .stats-bar {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 2rem;
  }

  .stat-number { font-size: 1.5rem; }
}

@media (max-width: 480px) {
  .hero, .hero-minecraft {
    padding: 80px 15px 50px;
    min-height: 75vh;
  }

  .hero h1, .hero-minecraft h1 {
    font-size: 1.65rem;
  }

  .hero p.lead, .hero-minecraft p.lead {
    font-size: 0.92rem;
  }

  .hero-badge {
    font-size: 0.78rem;
    padding: 0.4rem 1rem;
  }

  .py-section {
    padding: 3rem 0;
  }

  .stats-bar {
    gap: 0.75rem;
  }

  .stat-item {
    padding: 0.75rem 0.5rem;
  }
}