/* ===========================
   DEVIX — CSS Principal
   =========================== */

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

:root {
  --violet: #7c3aed;
  --violet-light: #a78bfa;
  --violet-dark: #4c1d95;
  --violet-glow: rgba(124, 58, 237, 0.25);
  --pink: #db2777;
  --bg: #06040f;
  --bg2: #0d0a1e;
  --bg3: #130f24;
  --text: #f1eeff;
  --text-muted: #9d8ec4;
  --text-soft: #c4b8e8;
  --border: rgba(124, 58, 237, 0.2);
  --border-soft: rgba(255,255,255,0.07);
  --card-bg: rgba(13,10,30,0.8);
  --font-head: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --radius: 16px;
  --radius-sm: 10px;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  width: 100%;
}

/* ===========================
   UTILITAIRES
   =========================== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2rem); width: 100%; box-sizing: border-box; }
.section { padding: 6rem 0; }

.gradient-text {
  background: linear-gradient(135deg, var(--violet-light) 0%, #f472b6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-tag {
  display: block;
  text-align: center;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--violet-light);
  background: rgba(124,58,237,0.12);
  border: 1px solid rgba(124,58,237,0.3);
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 1.2rem;
}

.section-title {
  font-family: var(--font-head);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  margin-bottom: 1rem;
  line-height: 1.1;
  text-align: center;
}

.section-sub {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 560px;
  margin-bottom: 3.5rem;
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

/* ===========================
   REVEAL ANIMATIONS
   =========================== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===========================
   NAVBAR
   =========================== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 1.2rem 0;
  transition: background 0.3s, backdrop-filter 0.3s, border-bottom 0.3s;
}
.navbar.scrolled {
  background: rgba(6,4,15,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-soft);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  gap: 2.5rem;
}
.logo {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.logo-dot { color: var(--violet-light); }
.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
  margin-left: auto;
}
.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 400;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }

.btn-nav {
  background: var(--violet);
  color: #fff;
  padding: 9px 22px;
  border-radius: 100px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.2s, transform 0.2s;
}
.btn-nav:hover { background: #6d28d9; transform: translateY(-1px); }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  margin-left: auto;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: 0.3s;
}

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 0;
  padding: 1rem 2rem;
  background: rgba(6,4,15,0.95);
  border-top: 1px solid var(--border-soft);
}
.mobile-menu a {
  color: var(--text-muted);
  text-decoration: none;
  padding: 14px 0;
  font-size: 1.1rem;
  border-bottom: 1px solid var(--border-soft);
  transition: color 0.2s;
}
.mobile-menu a:hover { color: var(--text); }
.mobile-menu.open { display: flex; }

/* ===========================
   HERO
   =========================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 7rem 2rem 4rem;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  gap: 4rem;
  flex-wrap: wrap;
  width: 100%;
  box-sizing: border-box;
}

.hero-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
  animation: float 8s ease-in-out infinite;
}
.orb1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, #7c3aed, transparent);
  top: -200px; left: -200px;
}
.orb2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, #db2777, transparent);
  bottom: -100px; right: -150px;
  animation-delay: -4s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-20px, -30px); }
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(124,58,237,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124,58,237,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
}

.hero-content { flex: 1; min-width: min(320px, 100%); width: 100%; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--violet-light);
  background: rgba(124,58,237,0.1);
  border: 1px solid rgba(124,58,237,0.3);
  padding: 7px 18px;
  border-radius: 100px;
  margin-bottom: 1.8rem;
  animation: pulse-border 3s ease-in-out infinite;
}

@keyframes pulse-border {
  0%, 100% { border-color: rgba(124,58,237,0.3); }
  50% { border-color: rgba(124,58,237,0.7); }
}

.hero-title {
  font-family: var(--font-head);
  font-size: clamp(2rem, 8vw, 4.8rem);
  font-weight: 800;
  line-height: 1.05;
  margin-bottom: 1.4rem;
  letter-spacing: -0.02em;
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 500px;
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

.hero-ctas {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3.5rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--violet) 0%, #9333ea 100%);
  color: #fff;
  padding: 14px 32px;
  border-radius: 100px;
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 24px var(--violet-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(124,58,237,0.4);
}

.btn-ghost {
  color: var(--text);
  padding: 14px 28px;
  border-radius: 100px;
  text-decoration: none;
  font-weight: 400;
  font-size: 1rem;
  border: 1px solid var(--border-soft);
  transition: border-color 0.2s, background 0.2s;
}
.btn-ghost:hover {
  border-color: rgba(124,58,237,0.5);
  background: rgba(124,58,237,0.08);
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-wrap: nowrap;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.stat-num {
  font-family: var(--font-head);
  font-size: clamp(1.4rem, 5vw, 2.2rem);
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}
.stat span:not(.stat-num):not(.stat-label) {
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--violet-light);
  margin-left: 2px;
}
.stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 400;
}
.stat-sep {
  width: 1px;
  height: 40px;
  background: var(--border-soft);
}

/* ===========================
   CODE CARD (HERO VISUAL)
   =========================== */
.hero-visual {
  flex: 1;
  min-width: min(300px, 100%);
  max-width: 500px;
  display: flex;
  justify-content: center;
}

.code-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  max-width: 440px;
  overflow: hidden;
  box-shadow: 0 0 60px rgba(124,58,237,0.15), 0 20px 60px rgba(0,0,0,0.5);
  position: relative;
}

.code-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 14px 18px;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--border-soft);
}
.dot {
  width: 12px; height: 12px;
  border-radius: 50%;
}
.dot.red { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green { background: #28c840; }
.code-filename {
  margin-left: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-family: 'Courier New', monospace;
}

.code-body {
  padding: 1.5rem 1.8rem;
  font-family: 'Courier New', monospace;
  font-size: 0.88rem;
  line-height: 1.8;
  overflow-x: auto;
  overflow-y: visible;
  max-width: 100%;
  word-break: break-word;
}
code { font-family: inherit; }
.c-kw  { color: #c792ea; }
.c-var { color: #82aaff; }
.c-key { color: #f07178; }
.c-str { color: #c3e88d; }
.c-fn  { color: #82aaff; }

.code-cursor {
  position: absolute;
  bottom: 1.8rem;
  right: 1.8rem;
  width: 2px;
  height: 1.2em;
  background: var(--violet-light);
  animation: blink 1s step-end infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ===========================
   SERVICES
   =========================== */
.services { background: var(--bg2); }

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 1.5rem;
}

.service-card {
  background: var(--card-bg);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 2rem;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(124,58,237,0.06) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
}
.service-card:hover::before { opacity: 1; }
.service-card:hover {
  border-color: rgba(124,58,237,0.4);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(124,58,237,0.12);
}

.featured-card {
  border-color: rgba(124,58,237,0.4);
  background: linear-gradient(135deg, rgba(124,58,237,0.08) 0%, rgba(13,10,30,0.8) 100%);
}
.featured-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--violet-light);
  background: rgba(124,58,237,0.15);
  border: 1px solid rgba(124,58,237,0.3);
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 1rem;
}

.service-icon {
  font-size: 2.2rem;
  margin-bottom: 1rem;
}
.service-card h3 {
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.7rem;
}
.service-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.2rem;
  line-height: 1.6;
}
.service-card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.service-card ul li {
  font-size: 0.88rem;
  color: var(--text-soft);
  padding-left: 0;
}

/* ===========================
   STACK
   =========================== */
.stack-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.stack-item {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-soft);
  background: var(--bg3);
  border: 1px solid var(--border-soft);
  padding: 8px 20px;
  border-radius: 100px;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
  cursor: default;
}
.stack-item:hover {
  border-color: var(--violet-light);
  color: var(--violet-light);
  background: rgba(124,58,237,0.08);
}

/* ===========================
   TARIFS
   =========================== */
.tarifs { background: var(--bg); }

.tarifs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 1.5rem;
  align-items: stretch;
}

.tarif-card {
  background: var(--card-bg);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 2.2rem;
  position: relative;
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
}
.tarif-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.4);
}

.tarif-card.featured {
  border-color: var(--violet);
  background: linear-gradient(135deg, rgba(124,58,237,0.1) 0%, var(--card-bg) 100%);
  box-shadow: 0 0 40px rgba(124,58,237,0.15);
}

.tarif-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--violet), #9333ea);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 18px;
  border-radius: 100px;
  white-space: nowrap;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.tarif-header { margin-bottom: 1.8rem; }
.tarif-header h3 {
  font-family: var(--font-head);
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}
.tarif-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 0.5rem;
}
.price {
  font-family: var(--font-head);
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--text);
}
.currency {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--violet-light);
}
.tarif-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.tarif-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-soft);
  flex: 1;
}
.tarif-features li {
  font-size: 0.9rem;
  color: var(--text-soft);
}
.tarif-features li.disabled {
  color: rgba(157,142,196,0.35);
}

.btn-tarif {
  display: block;
  text-align: center;
  padding: 13px 20px;
  border-radius: 100px;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  border: 1px solid var(--border);
  color: var(--text);
  background: rgba(124,58,237,0.08);
  transition: all 0.2s;
}
.btn-tarif:hover {
  border-color: var(--violet);
  background: rgba(124,58,237,0.18);
}
.featured-btn {
  background: linear-gradient(135deg, var(--violet), #9333ea);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 20px var(--violet-glow);
}
.featured-btn:hover {
  background: linear-gradient(135deg, #6d28d9, #7c3aed);
  transform: translateY(-1px);
  box-shadow: 0 8px 28px rgba(124,58,237,0.4);
}

/* ===========================
   PORTFOLIO
   =========================== */
.portfolio { background: var(--bg2); }

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 1.5rem;
}

.portfolio-card {
  background: var(--card-bg);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.portfolio-card:hover {
  transform: translateY(-6px);
  border-color: rgba(124,58,237,0.4);
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.portfolio-img {
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.portfolio-emoji {
  font-size: 4rem;
  filter: drop-shadow(0 4px 20px rgba(0,0,0,0.3));
  transition: transform 0.3s;
}
.portfolio-card:hover .portfolio-emoji {
  transform: scale(1.15) rotate(-5deg);
}

.portfolio-info { padding: 1.5rem; }
.portfolio-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}
.portfolio-tags span {
  font-size: 0.75rem;
  color: var(--violet-light);
  background: rgba(124,58,237,0.1);
  border: 1px solid rgba(124,58,237,0.25);
  padding: 3px 10px;
  border-radius: 100px;
}
.portfolio-info h3 {
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.portfolio-info p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ===========================
   CONTACT
   =========================== */
.contact { background: var(--bg); }

.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 4rem;
  align-items: start;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}
.contact-icon {
  font-size: 1.4rem;
  width: 48px;
  height: 48px;
  background: rgba(124,58,237,0.1);
  border: 1px solid rgba(124,58,237,0.2);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.contact-item strong {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 3px;
  font-weight: 500;
}
.contact-item a, .contact-item span {
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s;
}
.contact-item a:hover { color: var(--violet-light); }

/* FORM */
.contact-form {
  background: var(--card-bg);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 2.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 1.2rem;
}
.form-group label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}
.form-group input,
.form-group select,
.form-group textarea {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color 0.2s, background 0.2s;
  outline: none;
  resize: vertical;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--violet);
  background: rgba(124,58,237,0.06);
}
.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(157,142,196,0.5);
}
.form-group select option {
  background: var(--bg3);
  color: var(--text);
}

.btn-submit {
  width: 100%;
  background: linear-gradient(135deg, var(--violet), #9333ea);
  color: #fff;
  border: none;
  padding: 15px;
  border-radius: 100px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
  box-shadow: 0 4px 24px var(--violet-glow);
}
.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(124,58,237,0.45);
}
.btn-submit:active { transform: translateY(0); }
.btn-submit:disabled { opacity: 0.6; cursor: not-allowed; }

.form-success {
  display: none;
  text-align: center;
  margin-top: 1.2rem;
  padding: 12px 20px;
  background: rgba(16,185,129,0.1);
  border: 1px solid rgba(16,185,129,0.3);
  border-radius: var(--radius-sm);
  color: #34d399;
  font-size: 0.95rem;
}
.form-success.show { display: block; }

/* ===========================
   FOOTER
   =========================== */
.footer {
  background: var(--bg2);
  border-top: 1px solid var(--border-soft);
  padding: 4rem 0 2rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--border-soft);
  text-align: center;
}

.footer-brand .logo {
  display: inline-block;
  margin-bottom: 1rem;
}
.footer-brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.footer-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}
.footer-links h4 {
  font-family: var(--font-head);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.4rem;
}
.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--violet-light); }

.socials {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
  justify-content: center;
}
.socials a {
  width: 36px; height: 36px;
  background: var(--bg3);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted) !important;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s !important;
}
.socials a:hover {
  border-color: var(--violet) !important;
  color: var(--violet-light) !important;
}

.footer-bottom {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  text-align: center;
}
.footer-bottom p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ===========================
   PORTFOLIO PREVIEW HINT
   =========================== */
.preview-trigger { cursor: pointer; }

.demo-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 1.2rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--violet-light);
  border-top: 1px solid var(--border-soft);
  padding-top: 1rem;
  width: 100%;
  transition: gap 0.2s, color 0.2s;
  letter-spacing: 0.01em;
}
.portfolio-card:hover .demo-link {
  gap: 10px;
  color: #c4b5fd;
}
  bottom: 12px;
  right: 12px;
  background: rgba(124,58,237,0.85);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 100px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s, transform 0.25s;
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.15);
}
.preview-trigger:hover .preview-hint {
  opacity: 1;
  transform: translateY(0);
}

/* ===========================
   MODALE APERÇU
   =========================== */
.preview-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.preview-modal.open {
  opacity: 1;
  pointer-events: all;
}

.preview-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6,4,15,0.88);
  backdrop-filter: blur(10px);
  cursor: pointer;
}

.preview-container {
  position: relative;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  width: 100%;
  max-width: 860px;
  box-shadow: 0 0 80px rgba(124,58,237,0.25), 0 30px 80px rgba(0,0,0,0.7);
  transform: scale(0.93) translateY(20px);
  transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1);
}
.preview-modal.open .preview-container {
  transform: scale(1) translateY(0);
}

.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--border-soft);
}
.preview-title {
  font-family: var(--font-head);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}
.preview-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}
.preview-close:hover {
  background: rgba(255,255,255,0.07);
  color: var(--text);
}

.preview-img-wrap {
  overflow: hidden;
  max-height: 70vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  background: var(--bg2);
}
.preview-img-wrap img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 6s ease;
  transform-origin: top center;
}
.preview-modal.open .preview-img-wrap img {
  transform: scale(1.06);
}

.preview-caption {
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  padding: 10px;
  background: rgba(124,58,237,0.06);
  border-top: 1px solid var(--border-soft);
}

/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 1024px) {
  .contact-wrapper {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .hero {
    flex-direction: column;
    padding: 6rem 1.5rem 3rem;
    min-height: auto;
    gap: 3rem;
  }
  .hero-visual { max-width: 100%; }
  .nav-links, .btn-nav { display: none; }
  .hamburger { display: flex; }
  .form-row { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .section { padding: 4rem 0; }
}

@media (max-width: 480px) {
  .hero-stats { gap: 1.2rem; }
  .stat-num { font-size: 1.8rem; }
  .tarifs-grid, .portfolio-grid, .services-grid {
    grid-template-columns: 1fr;
  }
}
