/* =============================================================================
   42meter.com — visual enhancement layer v4
   Extends v3: adds AI-generated logo + page illustrations.
   Palette: cyan #19c3e6 | ink #0b1b2b | orange #e8893b | green #3fae7a
   ============================================================================= */

:root {
  --c-cyan: #19c3e6;
  --c-ink:  #0b1b2b;
  --transition: all 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ── Scrollbar ───────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: #eef2f6; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #19c3e6 0%, #0ea5c5 100%);
  border-radius: 8px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   HERO — dark navy, building image right side
   ═══════════════════════════════════════════════════════════════════════════ */
#hero {
  background-color: #091827 !important;
  background-image:
    linear-gradient(to right,
      rgba(9,24,39,1)    0%,
      rgba(9,24,39,0.96) 40%,
      rgba(9,24,39,0.6)  62%,
      rgba(9,24,39,0.15) 100%
    ),
    url('/assets/img-hero-building.webp'),
    radial-gradient(ellipse 70% 80% at 75% 45%, rgba(25,195,230,0.1) 0%, transparent 55%),
    linear-gradient(rgba(25,195,230,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(25,195,230,0.045) 1px, transparent 1px) !important;
  background-size:
    100% 100%,
    56% auto,
    auto,
    32px 32px,
    32px 32px !important;
  background-position: 0 0, right center, 0 0, 0 0, 0 0 !important;
  background-repeat: no-repeat, no-repeat, no-repeat, repeat, repeat !important;
  position: relative;
}

#hero::before {
  content: '';
  position: absolute;
  top: -15%; right: 52%;
  width: 35%; height: 110%;
  background: radial-gradient(ellipse at center, rgba(25,195,230,0.07) 0%, transparent 65%);
  pointer-events: none; z-index: 0;
  animation: e42-orb 10s ease-in-out infinite alternate;
}

@keyframes e42-orb {
  from { transform: translate(0,0) scale(1); }
  to   { transform: translate(20px,-14px) scale(1.08); }
}

#hero .text-c-ink, #hero h1, #hero h2 {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}
#hero .text-c-cyan {
  color: #19c3e6 !important;
  -webkit-text-fill-color: #19c3e6 !important;
}
#hero .text-c-ink-2 {
  color: rgba(255,255,255,0.85) !important;
  -webkit-text-fill-color: rgba(255,255,255,0.85) !important;
}
#hero .text-c-grey { color: rgba(255,255,255,0.6) !important; }
#hero p            { color: rgba(255,255,255,0.7) !important; }

#hero [class*="bg-c-bg"],
#hero [class*="bg-c-surface"],
#hero [class*="bg-white"] {
  background-color: rgba(255,255,255,0.08) !important;
  border-color: rgba(255,255,255,0.14) !important;
  color: rgba(255,255,255,0.75) !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   NAVIGATION
   ═══════════════════════════════════════════════════════════════════════════ */
nav[role="navigation"] {
  transition: background 0.35s ease, box-shadow 0.35s ease,
              backdrop-filter 0.35s ease !important;
}

nav[role="navigation"].e42-nav-dark {
  background: rgba(9,24,39,0.8) !important;
  backdrop-filter: blur(14px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(14px) saturate(180%) !important;
  box-shadow: 0 1px 0 rgba(25,195,230,0.14) !important;
}
nav[role="navigation"].e42-nav-dark .text-c-ink,
nav[role="navigation"].e42-nav-dark a:not([class*="bg-"]) {
  color: rgba(255,255,255,0.88) !important;
}
nav[role="navigation"].e42-nav-dark a:not([class*="bg-"]):hover {
  color: #19c3e6 !important;
}
nav[role="navigation"].e42-nav-dark [class*="bg-c-cyan"],
nav[role="navigation"].e42-nav-dark [class*="bg-c-ink"] {
  background: transparent !important;
  border: 1.5px solid rgba(255,255,255,0.35) !important;
  color: #ffffff !important;
  box-shadow: none !important;
}
nav[role="navigation"].e42-nav-dark [class*="bg-c-cyan"]:hover {
  background: rgba(255,255,255,0.1) !important;
  border-color: rgba(255,255,255,0.6) !important;
}

nav[role="navigation"].e42-nav-light {
  background: rgba(255,255,255,0.95) !important;
  backdrop-filter: blur(12px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(12px) saturate(160%) !important;
  box-shadow: 0 1px 0 rgba(11,27,43,0.06), 0 4px 20px rgba(11,27,43,0.06) !important;
}

/* ── AI-generated logo in navbar ─────────────────────────────────────────── */
.e42-logo {
  height: 32px !important;
  width: auto !important;
  display: block !important;
  flex-shrink: 0;
  max-width: 180px;
}

/* On dark hero nav: invert dark logo pixels to white */
nav[role="navigation"].e42-nav-dark .e42-logo {
  filter: brightness(0) invert(1) !important;
}

/* ── AI-generated feature icons ─────────────────────────────────────────── */
.e42-icon {
  width: 48px !important;
  height: 48px !important;
  display: block !important;
  object-fit: contain;
  flex-shrink: 0;
  /* Dark navy tint on light card backgrounds */
  filter: brightness(0) opacity(0.72) !important;
  transition: filter 0.3s ease, transform 0.3s ease !important;
}

/* Lift effect on card hover */
.rounded-card:hover .e42-icon {
  /* Cyan tint on hover */
  filter: brightness(0) invert(72%) sepia(90%) saturate(400%) hue-rotate(160deg) brightness(1.1) !important;
  transform: scale(1.08) !important;
}

/* White on dark ink sections */
.bg-c-ink .e42-icon {
  filter: brightness(0) invert(1) opacity(0.85) !important;
}
.bg-c-ink .rounded-card:hover .e42-icon {
  filter: brightness(0) invert(72%) sepia(90%) saturate(400%) hue-rotate(160deg) brightness(1.2) !important;
}

/* White in dark hero */
#hero .e42-icon {
  filter: brightness(0) invert(1) opacity(0.9) !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   DARK SECTIONS (bg-c-ink)
   ═══════════════════════════════════════════════════════════════════════════ */
.bg-c-ink {
  background: linear-gradient(140deg, #0b1b2b 0%, #0d2338 55%, #091623 100%) !important;
  position: relative;
  overflow: hidden;
}
.bg-c-ink > * { position: relative; z-index: 1; }
.bg-c-ink::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(25,195,230,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(25,195,230,0.035) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none; z-index: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PAGE ILLUSTRATIONS — overlay AI images on SVG placeholder containers
   ═══════════════════════════════════════════════════════════════════════════ */
[code-path="src/pages/Solution.tsx:94:13"],
[code-path="src/pages/Secteurs.tsx:90:13"],
[code-path="src/pages/Regulation.tsx:74:13"] {
  position: relative !important;
  overflow: hidden;
  border-radius: 12px;
}

[code-path="src/pages/Solution.tsx:94:13"]::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('/assets/illus_solution.webp');
  background-size: cover;
  background-position: center top;
  border-radius: inherit;
  z-index: 5;
  pointer-events: none;
}

[code-path="src/pages/Secteurs.tsx:90:13"]::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('/assets/illus_secteurs.webp');
  background-size: cover;
  background-position: center top;
  border-radius: inherit;
  z-index: 5;
  pointer-events: none;
}

[code-path="src/pages/Regulation.tsx:74:13"]::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('/assets/illus_regulation.webp');
  background-size: cover;
  background-position: center top;
  border-radius: inherit;
  z-index: 5;
  pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   CARDS
   ═══════════════════════════════════════════════════════════════════════════ */
.rounded-card { transition: var(--transition) !important; }

.bg-c-bg.rounded-card:hover,
.bg-white.rounded-card:hover {
  transform: translateY(-5px) !important;
  box-shadow: 0 16px 48px rgba(11,27,43,0.1),
              0 0 0 1px rgba(25,195,230,0.18) !important;
}
[class*="hover:border-c-cyan"]:hover {
  box-shadow: 0 8px 32px rgba(25,195,230,0.13) !important;
}
[class*="hover:-translate-y-1"] { transition: var(--transition) !important; }

/* ═══════════════════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════════════════ */
.bg-c-cyan {
  position: relative; overflow: hidden;
  transition: var(--transition) !important;
}
.bg-c-cyan:hover {
  box-shadow: 0 6px 28px rgba(25,195,230,0.5) !important;
  transform: translateY(-2px) !important;
}
.bg-c-cyan::after {
  content: '';
  position: absolute;
  top: -60%; left: -80%; width: 45%; height: 220%;
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.22), transparent);
  transform: skewX(-20deg);
  transition: left 0.5s ease;
  pointer-events: none;
}
.bg-c-cyan:hover::after { left: 125%; }

[class*="border-c-cyan"][class*="text-c-cyan"] { transition: var(--transition) !important; }
[class*="border-c-cyan"][class*="text-c-cyan"]:hover {
  background: rgba(25,195,230,0.08) !important;
  box-shadow: inset 0 0 0 1px #19c3e6, 0 0 16px rgba(25,195,230,0.15) !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SCROLL REVEAL
   ═══════════════════════════════════════════════════════════════════════════ */
.sr {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s cubic-bezier(0.4,0,0.2,1),
              transform 0.65s cubic-bezier(0.4,0,0.2,1);
}
.sr.sr--delay-1 { transition-delay: 0.08s; }
.sr.sr--delay-2 { transition-delay: 0.16s; }
.sr.sr--delay-3 { transition-delay: 0.24s; }
.sr.sr--delay-4 { transition-delay: 0.32s; }
.sr.sr--delay-5 { transition-delay: 0.40s; }
.sr.in { opacity: 1; transform: translateY(0); }

/* ═══════════════════════════════════════════════════════════════════════════
   MISC POLISH
   ═══════════════════════════════════════════════════════════════════════════ */
a.text-c-cyan:hover { text-shadow: 0 0 14px rgba(25,195,230,0.4); }
:focus-visible { outline: 2px solid #19c3e6; outline-offset: 3px; border-radius: 4px; }
.border-c-cyan { box-shadow: 0 0 10px rgba(25,195,230,0.1); }

input, textarea, select {
  transition: border-color 0.25s ease, box-shadow 0.25s ease !important;
}
input:focus, textarea:focus, select:focus {
  box-shadow: 0 0 0 3px rgba(25,195,230,0.18) !important;
}

/* ── Page load bar ───────────────────────────────────────────────────────── */
#e42-loader {
  position: fixed; top: 0; left: 0;
  height: 3px; width: 0;
  background: linear-gradient(90deg, #19c3e6, #0ea5c5, #19c3e6);
  background-size: 200% 100%;
  z-index: 99999;
  animation: e42-loader-shimmer 1.5s linear infinite;
  transition: width 0.3s ease, opacity 0.4s ease 0.15s;
}
#e42-loader.done { width: 100% !important; opacity: 0; }

@keyframes e42-loader-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
