@font-face {
  font-family: "Inter";
  src: url("fonts/inter.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("fonts/space-grotesk.woff2") format("woff2");
  font-weight: 500 700;
  font-display: swap;
}

:root {
  --bg: #0b1220;
  --bg-alt: #0e1628;
  --card: #131d33;
  --card-2: #16213a;
  --text: #e6ebf5;
  --muted: #9aa7c0;
  --faint: #6b7896;
  --accent: #3fb6ff;
  --accent-2: #7c5cff;
  --line: #22304f;
  --grad: linear-gradient(120deg, var(--accent), var(--accent-2));
  --radius: 18px;
  --max: 1160px;
  --display: "Space Grotesk", "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--display); letter-spacing: -0.02em; line-height: 1.12; }
a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; }

.wrap { max-width: var(--max); margin: 0 auto; padding-inline: 24px; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 24px; border-radius: 999px;
  font-weight: 600; font-size: 0.97rem;
  background: var(--grad); color: #fff; border: 0; cursor: pointer; font-family: inherit;
  box-shadow: 0 8px 30px -10px rgba(91, 135, 255, 0.7);
  transition: transform .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 14px 34px -10px rgba(91, 135, 255, 0.85); }
.btn svg { transition: transform .2s; }
.btn:hover svg { transform: translateX(3px); }
.btn.ghost {
  background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line);
  box-shadow: none; color: var(--text);
}
.btn.ghost:hover { border-color: #3a4a70; background: rgba(255, 255, 255, 0.06); }
.btn.small { padding: 9px 18px; font-size: 0.9rem; }

/* ---------- En-tête ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 18, 32, 0.72);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 32px; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 1.3rem; letter-spacing: 0.01em; }
.brand svg { flex: none; }
.nav { display: flex; gap: 6px; margin-left: auto; }
.nav a { padding: 8px 14px; border-radius: 999px; color: var(--muted); font-size: 0.94rem; transition: color .2s, background .2s; }
.nav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.menu-btn { display: none; margin-left: auto; background: none; border: 1px solid var(--line); border-radius: 10px; width: 42px; height: 42px; color: var(--text); cursor: pointer; }

/* ---------- Accueil ---------- */
.hero { position: relative; overflow: hidden; padding-block: 96px 110px; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(700px 420px at 85% 15%, rgba(124, 92, 255, 0.22), transparent 70%),
    radial-gradient(600px 400px at 5% 70%, rgba(63, 182, 255, 0.14), transparent 70%);
  mask-image: linear-gradient(#000 70%, transparent);
  -webkit-mask-image: linear-gradient(#000 70%, transparent);
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 75%);
}
.hero .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 64px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 14px 6px 8px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(19, 29, 51, 0.7);
  font-size: 0.85rem; color: var(--muted); margin-bottom: 26px;
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: #3ddc97; box-shadow: 0 0 0 4px rgba(61, 220, 151, 0.15); margin-left: 6px; }
.hero h1 { font-size: clamp(2.4rem, 5.4vw, 4rem); margin: 0 0 24px; }
.hero p.intro { font-size: 1.15rem; color: var(--muted); max-width: 560px; margin: 0 0 36px; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; }
.domains { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--line); color: var(--faint); font-size: 0.9rem; }
.domains span { display: inline-flex; align-items: center; gap: 8px; }
.domains span::before { content: ""; width: 6px; height: 6px; border-radius: 2px; background: var(--grad); }

/* Panneau illustré */
.visual {
  position: relative; border-radius: 24px; padding: 22px;
  background: linear-gradient(180deg, rgba(22, 33, 58, 0.9), rgba(15, 23, 41, 0.9));
  border: 1px solid var(--line);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.02) inset;
}
.visual::before {
  content: ""; position: absolute; inset: -1px; border-radius: 25px; padding: 1px; pointer-events: none;
  background: linear-gradient(140deg, rgba(63, 182, 255, 0.6), transparent 35%, transparent 65%, rgba(124, 92, 255, 0.6));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.visual-top { display: flex; align-items: center; gap: 7px; margin-bottom: 14px; }
.visual-top i { width: 10px; height: 10px; border-radius: 50%; background: #2a3757; }
.visual-top b { margin-left: 10px; font-weight: 500; font-size: 0.8rem; color: var(--faint); font-family: ui-monospace, monospace; }
.topology { display: block; width: 100%; height: auto; border-radius: 14px; background: rgba(11, 18, 32, 0.6); border: 1px solid var(--line); }
.topology .link { stroke: url(#lg); stroke-width: 1.6; fill: none; opacity: .55; }
.topology .flow { stroke: url(#lg); stroke-width: 2.2; fill: none; stroke-dasharray: 6 14; animation: flow 2.4s linear infinite; }
.topology .pulse { animation: pulse 3s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
@keyframes flow { to { stroke-dashoffset: -40; } }
@keyframes pulse { 0%, 100% { opacity: .25; transform: scale(1); } 50% { opacity: .6; transform: scale(1.35); } }
.status { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.status div { padding: 12px; border-radius: 12px; background: rgba(11, 18, 32, 0.6); border: 1px solid var(--line); font-size: 0.8rem; color: var(--muted); }
.status strong { display: flex; align-items: center; gap: 6px; color: var(--text); font-size: 0.9rem; font-weight: 600; margin-top: 2px; }
.status strong::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #3ddc97; }

/* ---------- Sections ---------- */
section { padding-block: 110px; }
.section-head { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: end; margin-bottom: 56px; }
.section-head.center { grid-template-columns: 1fr; gap: 0; text-align: center; justify-items: center; }
.kicker { display: inline-block; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 14px; }
h2 { font-size: clamp(2rem, 4vw, 2.9rem); margin: 0; }
.section-head p { color: var(--muted); font-size: 1.08rem; margin: 0; max-width: 520px; }
.section-head.center p { margin-top: 18px; }

/* Services : grille en mosaïque */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; }
.bento .card:nth-child(1) { grid-column: span 4; }
.bento .card:nth-child(2) { grid-column: span 2; }
.bento .card:nth-child(3) { grid-column: span 2; }
.bento .card:nth-child(4) { grid-column: span 4; }
.card {
  position: relative; overflow: hidden;
  padding: 34px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--line);
  transition: transform .3s, border-color .3s;
}
.card:hover { transform: translateY(-4px); border-color: #34446b; }
.card::after {
  content: ""; position: absolute; width: 280px; height: 280px; right: -110px; top: -110px; border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 92, 255, 0.16), transparent 70%); pointer-events: none;
}
.card-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 28px; }
.icon {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  background: linear-gradient(140deg, rgba(63, 182, 255, 0.18), rgba(124, 92, 255, 0.18));
  border: 1px solid rgba(63, 182, 255, 0.25); color: var(--accent);
}
.num { font-family: var(--display); font-size: 0.9rem; color: var(--faint); }
.card h3 { font-size: 1.4rem; margin: 0 0 10px; }
.card p { color: var(--muted); margin: 0; max-width: 480px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.tags span { padding: 5px 12px; border-radius: 999px; font-size: 0.82rem; color: #c3cde0; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); }

/* Approche : frise */
.alt { background: var(--bg-alt); border-block: 1px solid var(--line); }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; position: relative; }
.timeline li { position: relative; }
.timeline li:not(:last-child)::after {
  content: ""; position: absolute; top: 27px; left: 64px; right: -20px; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2)); opacity: .45;
}
.step-num {
  position: relative; z-index: 1;
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--display); font-weight: 700; font-size: 1.05rem;
  background: var(--bg-alt); border: 2px solid transparent;
  background-image: linear-gradient(var(--bg-alt), var(--bg-alt)), var(--grad);
  background-origin: border-box; background-clip: padding-box, border-box;
  margin-bottom: 24px;
}
.timeline h3 { font-size: 1.25rem; margin: 0 0 8px; }
.timeline p { color: var(--muted); margin: 0; }

/* À propos */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: center; }
.about .text p { color: var(--muted); font-size: 1.08rem; margin: 22px 0 0; }
.pillars { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pillar { padding: 24px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.pillar svg { color: var(--accent); margin-bottom: 14px; }
.pillar h3 { font-size: 1.05rem; margin: 0 0 6px; }
.pillar p { margin: 0; color: var(--muted); font-size: 0.92rem; }

/* Contact */
.contact-panel {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 56px;
  padding: 56px; border-radius: 28px;
  background:
    radial-gradient(500px 300px at 0% 0%, rgba(63, 182, 255, 0.14), transparent 70%),
    radial-gradient(500px 300px at 100% 100%, rgba(124, 92, 255, 0.18), transparent 70%),
    var(--card);
  border: 1px solid var(--line);
}
.contact-panel .text p { color: var(--muted); font-size: 1.08rem; margin: 18px 0 32px; }
.contact-line { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 14px; background: rgba(11, 18, 32, 0.5); border: 1px solid var(--line); }
.contact-line .icon { width: 42px; height: 42px; border-radius: 12px; }
.contact-line small { display: block; color: var(--faint); font-size: 0.8rem; }
.contact-line a { font-weight: 600; }
.contact-line a:hover { color: var(--accent); }
form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
form .full { grid-column: 1 / -1; }
label { display: block; font-size: 0.85rem; color: var(--muted); font-weight: 500; }
input, textarea {
  display: block; width: 100%; margin-top: 8px; padding: 14px 16px;
  border-radius: 12px; border: 1px solid var(--line);
  background: rgba(11, 18, 32, 0.6); color: var(--text); font: inherit;
  transition: border-color .2s, box-shadow .2s;
}
input:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(63, 182, 255, 0.15); }
textarea { min-height: 150px; resize: vertical; }
form .btn { justify-self: start; }

/* ---------- Pied de page ---------- */
.site-footer { border-top: 1px solid var(--line); padding-block: 56px 32px; color: var(--muted); font-size: 0.92rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; padding-bottom: 40px; }
.footer-grid p { margin: 14px 0 0; max-width: 320px; }
.footer-grid h4 { margin: 0 0 14px; color: var(--text); font-size: 0.9rem; font-weight: 600; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-grid a:hover { color: var(--text); }
.footer-bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 24px; border-top: 1px solid var(--line); color: var(--faint); font-size: 0.85rem; }

/* ---------- Page texte ---------- */
.page { padding-block: 80px 100px; max-width: 780px; }
.page h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin: 0 0 12px; }
.page .card { margin-top: 20px; }
.page .card h2 { font-size: 1.2rem; margin: 0 0 10px; }
.page .card p { max-width: none; }

/* ---------- Apparition au défilement ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .topology .flow, .topology .pulse, .topology .trunk-flow { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Adaptation écrans ---------- */
@media (max-width: 960px) {
  .hero .wrap, .about, .contact-panel, .section-head { grid-template-columns: 1fr; }
  .hero .wrap { gap: 56px; }
  .section-head { gap: 18px; }
  .bento .card:nth-child(n) { grid-column: span 3; }
  .timeline { grid-template-columns: 1fr 1fr; row-gap: 44px; }
  .timeline li::after { display: none; }
  .contact-panel { padding: 40px; gap: 40px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  section { padding-block: 80px; }
  .hero { padding-block: 56px 80px; }
  .menu-btn { display: grid; place-items: center; }
  .site-header .cta { display: none; }
  .nav {
    position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; gap: 0; padding: 12px 16px 20px;
    background: rgba(11, 18, 32, 0.97); border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 14px 12px; border-radius: 10px; }
  .bento .card:nth-child(n) { grid-column: 1 / -1; }
  .card { padding: 26px; }
  .timeline { grid-template-columns: 1fr; row-gap: 0; }
  .timeline li { display: grid; grid-template-columns: 56px 1fr; column-gap: 20px; padding-bottom: 32px; }
  .timeline li:not(:last-child)::before {
    content: ""; position: absolute; left: 27px; top: 56px; bottom: 0; width: 2px;
    background: linear-gradient(var(--accent), var(--accent-2)); opacity: .4;
  }
  .step-num { margin: 0; grid-row: span 2; }
  .timeline h3 { margin-top: 12px; }
  .pillars { grid-template-columns: 1fr; }
  .contact-panel { padding: 28px 22px; border-radius: 22px; }
  form { grid-template-columns: 1fr; }
  .status { grid-template-columns: 1fr 1fr; }
  .status div:last-child { grid-column: 1 / -1; }
  .wrap { padding-inline: 18px; }
}

/* Topologie : lien de redondance entre les switchs */
.topology .flow.late { animation-delay: -1.2s; }
.topology .trunk { stroke: #3ddc97; stroke-width: 2; opacity: .45; fill: none; }
.topology .trunk-flow { stroke: #3ddc97; stroke-width: 2.2; fill: none; stroke-dasharray: 5 11; animation: flow 1.8s linear infinite; }
.topology .trunk-flow.back { animation-delay: -.9s; }
.push { margin-left: auto; }
