/* =============================================================
   WEBZA — FEUILLE DE STYLE
   Palette extraite du logo fourni :
     - navy-void   #050b1e  (fond principal, quasi celui du logo)
     - navy-panel  #0d1530  (panneaux, cartes sur fond sombre)
     - blue        #0b2ee0  (bleu électrique du "Z")
     - blue-bright #3f6dff  (variante claire, survols)
     - blue-mist   #a8bbf1  (reflets clairs du "W", accents discrets)
   Typographies : Sora (titres, net et technique), IBM Plex Sans (texte
   courant), IBM Plex Mono (labels/tags, esprit "code").
   ============================================================= */

:root {
  --navy-void: #050b1e;
  --navy-panel: #0d1530;
  --navy-panel-light: #131c3d;
  --blue: #0b2ee0;
  --blue-bright: #3f6dff;
  --blue-mist: #a8bbf1;
  --white: #ffffff;
  --paper: #f5f6fa;      /* section claire, alternance avec le sombre */
  --ink: #10131c;
  --ink-light: #5c6272;
  --line-dark: rgba(255,255,255,0.1);
  --line-light: #e3e5ec;

  --font-display: "Sora", sans-serif;
  --font-body: "IBM Plex Sans", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;

  --section-padding: clamp(64px, 8vw, 108px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background-color: var(--navy-void);
  color: var(--white);
  line-height: 1.65;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2.5px solid var(--blue-bright);
  outline-offset: 3px;
}

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

.section { padding: var(--section-padding) 0; }

/* Sections claires (services, contact) : texte sombre */
.services, .contact { background-color: var(--paper); color: var(--ink); }

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--white);
}

.services h2, .services h3,
.contact h2, .contact h3 { color: var(--ink); }

.section-title {
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
  font-weight: 600;
  max-width: 640px;
  margin-bottom: 48px;
}

.section-title-light { color: var(--white); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue-mist);
  display: inline-block;
  margin-bottom: 14px;
}

.eyebrow-on-light { color: var(--blue); }

/* --- Boutons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 5px;
  font-weight: 600;
  font-size: 0.92rem;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
  background-color: var(--blue);
  color: var(--white);
}
.btn-primary:hover { background-color: var(--blue-bright); transform: translateY(-2px); }

.btn-ghost {
  background-color: transparent;
  border-color: rgba(255,255,255,0.3);
  color: var(--white);
}
.btn-ghost:hover { border-color: var(--blue-bright); }

/* -------------------------------------------------------------
   HEADER
------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: rgba(5, 11, 30, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, padding 0.3s ease;
}

.site-header.scrolled {
  border-bottom-color: var(--line-dark);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 0;
  transition: padding 0.3s ease;
}

.site-header.scrolled .header-inner { padding: 11px 0; }

.logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.logo-mark {
  height: 32px;
  width: auto;
}

.logo-word {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--white);
}

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

.main-nav ul { display: flex; gap: 34px; }

.nav-link {
  font-weight: 500;
  font-size: 0.92rem;
  color: rgba(255,255,255,0.82);
  position: relative;
  padding-bottom: 4px;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 2px;
  background-color: var(--blue-bright);
  transition: width 0.25s ease;
}
.nav-link:hover::after { width: 100%; }
.nav-link:hover { color: var(--white); }

.nav-cta { padding: 10px 22px; font-size: 0.85rem; flex-shrink: 0; }

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px; height: 38px;
  background: none; border: none; cursor: pointer;
  flex-shrink: 0;
}
.hamburger span {
  display: block; height: 2px; width: 100%;
  background-color: var(--white);
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* -------------------------------------------------------------
   HERO
------------------------------------------------------------- */
.hero { padding: clamp(64px, 9vw, 120px) 0; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 60px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.1rem, 3.6vw, 3rem);
  font-weight: 700;
  margin-bottom: 22px;
  max-width: 560px;
}

.hero-text {
  color: rgba(255,255,255,0.72);
  max-width: 460px;
  margin-bottom: 34px;
  font-size: 1.02rem;
}

.hero-actions { display: flex; gap: 18px; flex-wrap: wrap; }

/* --- Mini-terminal : signature visuelle, écho au motif "pixels qui se
       matérialisent" du logo (idée de compilation / construction) --- */
.hero-terminal {
  background-color: var(--navy-panel);
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(2, 6, 20, 0.5);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background-color: var(--navy-panel-light);
  border-bottom: 1px solid var(--line-dark);
}

.terminal-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background-color: rgba(255,255,255,0.18);
}

.terminal-title {
  margin-left: 8px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: rgba(255,255,255,0.5);
}

.terminal-body {
  padding: 26px 22px;
  min-height: 130px;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--blue-mist);
  display: flex;
  align-items: flex-start;
}

.terminal-line { white-space: pre-wrap; word-break: break-word; }

.terminal-cursor {
  color: var(--blue-bright);
  animation: blinkCursor 1s step-end infinite;
  margin-left: 2px;
}

@keyframes blinkCursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* -------------------------------------------------------------
   SERVICES — rangées asymétriques (alternance gauche/droite)
------------------------------------------------------------- */
.service-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 40px;
  align-items: center;
  padding: 36px 0;
  border-top: 1px solid var(--line-light);
}

.service-row:last-child { border-bottom: 1px solid var(--line-light); }

.service-row-reverse { direction: rtl; }
.service-row-reverse .service-text,
.service-row-reverse .service-icon { direction: ltr; }

.service-icon {
  width: 72px; height: 72px;
  border-radius: 8px;
  background-color: var(--navy-void);
  color: var(--blue-bright);
  display: flex;
  align-items: center;
  justify-content: center;
}

.service-icon svg { width: 34px; height: 34px; }

.service-tag {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--blue);
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.service-text h3 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.service-text p {
  color: var(--ink-light);
  max-width: 620px;
  font-size: 0.96rem;
}

/* -------------------------------------------------------------
   RÉALISATIONS
------------------------------------------------------------- */
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.project-card {
  display: block;
  background-color: var(--navy-panel);
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.project-card:hover {
  transform: translateY(-5px);
  border-color: var(--blue-bright);
}

.project-preview {
  height: 170px;
  overflow: hidden;
  position: relative;
  background-color: var(--navy-panel-light); /* couleur de secours pendant le chargement */
}

.project-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center; /* on privilégie le haut de la capture (header + hero) */
  transition: transform 0.4s ease;
}

.project-card:hover .project-preview img {
  transform: scale(1.04);
}

.project-body { padding: 22px; }

.project-tag {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--blue-mist);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.project-card h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.project-card p {
  color: rgba(255,255,255,0.65);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.project-link {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--blue-bright);
  font-weight: 600;
}

/* -------------------------------------------------------------
   CONTACT
------------------------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 56px;
  align-items: start;
}

.contact-lead {
  color: var(--ink-light);
  max-width: 420px;
  margin-bottom: 30px;
}

.contact-channels { display: flex; flex-direction: column; gap: 14px; }

.contact-channel {
  display: flex;
  flex-direction: column;
  padding: 16px 18px;
  border: 1.5px solid var(--line-light);
  border-radius: 6px;
  background-color: var(--white);
  transition: border-color 0.2s ease;
}
.contact-channel:hover { border-color: var(--blue); }

.contact-channel strong {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--blue);
  margin-bottom: 4px;
}

.contact-whatsapp strong { color: #1f9e57; }

.contact-form {
  background-color: var(--white);
  border: 1.5px solid var(--line-light);
  border-radius: 8px;
  padding: 34px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-group { margin-bottom: 18px; display: flex; flex-direction: column; }

.form-group label {
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 7px;
  color: var(--ink);
}

.form-group input, .form-group textarea {
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 12px 14px;
  border-radius: 5px;
  border: 1.5px solid var(--line-light);
  background-color: var(--white);
  color: var(--ink);
}

.form-group textarea { resize: vertical; }

.form-group.has-error input, .form-group.has-error textarea { border-color: #c0392b; }
.error-msg { color: #c0392b; font-size: 0.8rem; min-height: 18px; margin-top: 4px; }

.form-status {
  margin-top: 16px;
  font-weight: 600;
  font-size: 0.92rem;
  display: none;
}
.form-status.visible { display: block; }
.form-status.status-loading { color: var(--ink-light); display: block; }
.form-status.status-success { color: #1f9e57; display: block; }
.form-status.status-error { color: #c0392b; display: block; }

/* -------------------------------------------------------------
   FOOTER
------------------------------------------------------------- */
.site-footer {
  background-color: var(--navy-void);
  padding-top: 56px;
  border-top: 1px solid var(--line-dark);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--line-dark);
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  display: block;
  margin-bottom: 10px;
}

.footer-brand p { color: rgba(255,255,255,0.55); max-width: 260px; font-size: 0.92rem; }

.footer-links h3, .footer-legal h3 {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.5);
  margin-bottom: 14px;
}

.footer-links li, .footer-legal li { margin-bottom: 9px; }
.footer-links a, .footer-legal a { color: rgba(255,255,255,0.75); }
.footer-links a:hover, .footer-legal a:hover { color: var(--blue-bright); }

.footer-bottom {
  text-align: center;
  padding: 20px 0;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
}

/* -------------------------------------------------------------
   RESPONSIVE
------------------------------------------------------------- */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-terminal { max-width: 520px; }
  .project-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .main-nav {
    position: fixed;
    top: 0; right: 0;
    height: 100vh;
    width: min(300px, 80vw);
    background-color: var(--navy-panel);
    box-shadow: -12px 0 30px rgba(0,0,0,0.3);
    padding: 100px 30px 30px;
    transform: translateX(100%);
    transition: transform 0.35s ease;
    z-index: 1050;
  }
  .main-nav.open { transform: translateX(0); }
  .main-nav ul { flex-direction: column; gap: 24px; }
  .hamburger { display: flex; }
  .nav-cta { display: none; }
  .service-row, .service-row-reverse { grid-template-columns: 64px 1fr; direction: ltr; gap: 20px; }
  .service-icon { width: 56px; height: 56px; }
  .service-icon svg { width: 26px; height: 26px; }
}

@media (max-width: 640px) {
  .project-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
}
