/* =====================================================================
   Accueil — hero « vitrine » : réseau de points animé (canvas), titre à
   mot rotatif, composition de captures réelles et de schémas animés.
   ===================================================================== */
.hx {
  position: relative; overflow: hidden; isolation: isolate; color: rgba(255, 255, 255, .74);
  background: radial-gradient(1200px 700px at 70% 10%, #0E3352 0%, transparent 60%), linear-gradient(180deg, #051726 0%, #071F33 60%, #082337 100%);
  padding: 56px 0 140px;
}
.hx-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; opacity: .9; }
.hx-aurora { position: absolute; inset: 0; z-index: -2; pointer-events: none; filter: blur(70px); opacity: .55; }
.hx-aurora span { position: absolute; border-radius: 50%; }
.hx-aurora span:nth-child(1) { width: 520px; height: 520px; left: -140px; top: 30%; background: #1A62C2; }
.hx-aurora span:nth-child(2) { width: 460px; height: 460px; right: 4%; top: -12%; background: #22B25C; opacity: .55; }
.hx-aurora span:nth-child(3) { width: 360px; height: 360px; right: 30%; bottom: -18%; background: #EA9541; opacity: .35; }
.hx::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 160px; z-index: -1; background: linear-gradient(180deg, transparent, rgba(5, 23, 38, .65)); pointer-events: none; }

.hx-inner { position: relative; display: grid; gap: 56px; align-items: center; }
.hx-kicker {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 26px; padding: 7px 14px; border-radius: 999px;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14); color: rgba(255, 255, 255, .82);
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .04em; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.hx-live { width: 8px; height: 8px; border-radius: 50%; background: #22B25C; box-shadow: 0 0 0 0 rgba(34, 178, 92, .6); animation: hxLive 2.2s ease-out infinite; }

.hx-title { margin: 0 0 24px; color: #fff; font-size: clamp(42px, 6.2vw, 80px); line-height: 1.02; letter-spacing: -.035em; font-weight: 600; }
.hx-title > span[aria-hidden] { display: block; }
.hx-rotator { position: relative; display: grid !important; height: 1.12em; overflow: hidden; }
.hx-rotator span {
  grid-area: 1 / 1; display: block; white-space: nowrap;
  background: linear-gradient(92deg, #7FE3A8 0%, #8DB8EE 55%, #F5B26B 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  transform: translateY(105%); opacity: 0; transition: transform .7s var(--ease-out), opacity .5s;
}
.hx-rotator span.is-active { transform: none; opacity: 1; }
.hx-rotator span.is-leaving { transform: translateY(-105%); opacity: 0; }
.hx-lead { font-size: 18.5px; line-height: 1.62; color: rgba(255, 255, 255, .74); max-width: 34em; margin: 0 0 34px; }
.hx-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hx-btn-main { position: relative; overflow: hidden; background: #fff; color: var(--ink); box-shadow: 0 14px 40px -14px rgba(141, 184, 238, .7); }
.hx-btn-main::after { content: ''; position: absolute; top: 0; left: -60%; width: 40%; height: 100%; background: linear-gradient(100deg, transparent, rgba(26, 98, 194, .18), transparent); transform: skewX(-20deg); animation: hxShine 4.5s ease-in-out infinite 1.5s; }
.hx-btn-main:hover { background: #EEF4FB; transform: translateY(-2px); }
.hx-btn-ghost { background: rgba(255, 255, 255, .04); color: #fff; border-color: rgba(255, 255, 255, .28); }
.hx-btn-ghost:hover { border-color: rgba(255, 255, 255, .6); background: rgba(255, 255, 255, .08); }
.hx-facts { display: flex; flex-wrap: wrap; gap: 14px 32px; margin-top: 40px; padding-top: 26px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: 14px; color: rgba(255, 255, 255, .62); }
.hx-facts li { display: flex; align-items: baseline; gap: 10px; }
.hx-facts b { font-family: var(--font-mono); font-size: 28px; font-weight: 500; color: #fff; line-height: 1; }

/* ---------- Composition visuelle ---------- */
.hx-visual { position: relative; aspect-ratio: 1.08; width: 100%; max-width: 660px; margin: 0 auto; perspective: 1600px; }
.hx-visual > * { will-change: transform; }
.hx-screen {
  position: absolute; left: 6%; top: 10%; width: 86%; margin: 0; border-radius: 12px; overflow: hidden; background: #fff;
  border: 1px solid rgba(255, 255, 255, .18); box-shadow: 0 60px 120px -40px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .05);
  transform: rotateY(-16deg) rotateX(8deg) rotateZ(1deg) translate3d(var(--px, 0), var(--py, 0), 0);
}
.hx-screen img { display: block; width: 100%; height: auto; }
.hx-screen-bar { display: flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; background: #EEF2F6; border-bottom: 1px solid #DDE4EC; }
.hx-screen-bar span { width: 9px; height: 9px; border-radius: 50%; background: #CDD6E0; }
.hx-screen-bar span:first-child { background: #F2756A; }
.hx-screen-bar span:nth-child(2) { background: #F5C451; }
.hx-screen-bar span:nth-child(3) { background: #5CC97B; }
.hx-screen-bar em { margin: 0 auto; font-style: normal; font-family: var(--font-mono); font-size: 10.5px; color: #5D6D7E; display: inline-flex; gap: 6px; align-items: center; padding-right: 40px; }
.hx-screen-bar em i { color: #17884A; font-size: 9px; }
.hx-card {
  position: absolute; padding: 10px 10px 4px; border-radius: 14px; background: rgba(9, 34, 54, .86);
  border: 1px solid rgba(255, 255, 255, .16); box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .8);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); transform: translate3d(var(--px, 0), var(--py, 0), 0);
}
.hx-card .sv-visual { display: block; width: 100%; height: auto; }
.hx-card-label { display: inline-flex; align-items: center; gap: 6px; margin: 2px 0 2px 4px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: rgba(255, 255, 255, .7); }
.hx-card-label i { color: var(--sv-light); }
.hx-card-net { left: -4%; bottom: 0; width: 54%; }
.hx-card-sec { right: -2%; top: -2%; width: 36%; }
.hx-phone {
  position: absolute; right: 2%; bottom: -6%; width: 21%; margin: 0; padding: 5px; border-radius: 22px; background: #03101B;
  box-shadow: 0 40px 70px -24px rgba(0, 0, 0, .85), 0 0 0 1px rgba(255, 255, 255, .08); transform: translate3d(var(--px, 0), var(--py, 0), 0);
}
.hx-phone img { display: block; width: 100%; height: auto; border-radius: 17px; }
.hx-tag {
  position: absolute; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; white-space: nowrap;
  background: #fff; color: var(--ink); font-size: 13px; font-weight: 600; box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .6);
  transform: translate3d(var(--px, 0), var(--py, 0), 0);
}
.hx-tag i { color: var(--brand); }
.hx-tag-a { left: 2%; top: 4%; }
.hx-tag-b { right: 30%; bottom: -3%; }
.hx-tag-b i { color: #17884A; }

/* Indicateur de défilement */
.hx-scroll { position: absolute; left: 50%; bottom: 96px; width: 26px; height: 42px; margin-left: -13px; border: 2px solid rgba(255, 255, 255, .35); border-radius: 14px; display: none; }
.hx-scroll span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: #fff; animation: hxScroll 1.8s ease-in-out infinite; }

/* ---------- Barre d'accès en chevauchement ---------- */
.hx-strip { position: relative; z-index: 3; margin-top: -84px; }
.hx-strip-grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
.hx-strip-item {
  position: relative; display: flex; align-items: center; gap: 14px; padding: 20px 20px; background: #fff; border: 1px solid var(--line);
  border-radius: 14px; box-shadow: 0 24px 50px -30px rgba(5, 23, 38, .55); color: var(--ink); overflow: hidden;
  transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out), border-color .25s;
}
.hx-strip-item::before { content: ''; position: absolute; left: 0; top: 0; height: 3px; width: 100%; background: var(--brand-stripe); transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease-out); }
.hx-strip-item:hover { transform: translateY(-6px); box-shadow: 0 34px 60px -30px rgba(5, 23, 38, .65); border-color: var(--line-strong); }
.hx-strip-item:hover::before { transform: scaleX(1); }
.hx-strip-item b { display: block; font-size: 16px; }
.hx-strip-item small { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.hx-strip-ico { flex-shrink: 0; width: 46px; height: 46px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 20px; transition: transform .35s var(--ease-out); }
.hx-strip-item:hover .hx-strip-ico { transform: rotate(-8deg) scale(1.06); }
.c-blue { background: var(--blue-soft); color: var(--blue); }
.c-navy { background: #E6EEF4; color: var(--brand); }
.c-green { background: var(--green-soft); color: var(--green); }
.c-orange { background: var(--orange-soft); color: var(--orange); }
.hx-strip-arrow { margin-left: auto; color: var(--subtle); transition: transform .3s var(--ease-out), color .25s; }
.hx-strip-item:hover .hx-strip-arrow { transform: translate(3px, -3px); color: var(--ink); }
.page-home .tech-band { margin-top: 40px; border-top: 1px solid var(--line); }

/* ---------- Responsive ---------- */
@media (max-width: 1023px) {
  .hx-screen { transform: translate3d(0, 0, 0); left: 0; width: 92%; top: 8%; }
  .hx-card-net { width: 58%; left: -2%; bottom: 2%; }
  .hx-card-sec { width: 38%; }
  .hx-tag-b { display: none; }
}
@media (max-width: 559px) {
  .hx { padding-bottom: 120px; }
  .hx-visual { aspect-ratio: .95; }
  .hx-card-sec, .hx-tag-a { display: none; }
  .hx-card-net { width: 68%; }
  .hx-phone { width: 28%; }
  .hx-facts b { font-size: 24px; }
}
@media (min-width: 640px) {
  .hx-strip-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .hx { min-height: calc(100vh - var(--header-h)); display: flex; align-items: center; padding: 64px 0 150px; }
  .hx > .container { width: 100%; }
  .hx-inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr); gap: 48px; }
  .hx-scroll { display: block; }
  .hx-strip-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }
}

/* ---------- Animations ---------- */
@keyframes hxLive { 0% { box-shadow: 0 0 0 0 rgba(34, 178, 92, .6); } 70%, 100% { box-shadow: 0 0 0 8px rgba(34, 178, 92, 0); } }
@keyframes hxShine { 0%, 70% { left: -60%; } 100% { left: 130%; } }
@keyframes hxScroll { 0% { transform: translateY(0); opacity: 1; } 80% { transform: translateY(14px); opacity: 0; } 100% { opacity: 0; } }
@keyframes hxDrift { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(40px, -30px) scale(1.08); } }
@keyframes hxFloat { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
@media (prefers-reduced-motion: no-preference) {
  .hx-aurora span:nth-child(1) { animation: hxDrift 16s ease-in-out infinite; }
  .hx-aurora span:nth-child(2) { animation: hxDrift 19s ease-in-out infinite reverse; }
  .hx-aurora span:nth-child(3) { animation: hxDrift 22s ease-in-out infinite; }
  .hx-card-net { animation: hxFloat 7s ease-in-out infinite; }
  .hx-card-sec { animation: hxFloat 6s ease-in-out infinite .6s; }
  .hx-phone { animation: hxFloat 6.5s ease-in-out infinite 1.2s; }
  .hx-tag-a { animation: hxFloat 5s ease-in-out infinite .3s; }
  .hx-tag-b { animation: hxFloat 5.5s ease-in-out infinite 1s; }
}
@media (prefers-reduced-motion: reduce) {
  .hx-live, .hx-btn-main::after, .hx-scroll span { animation: none; }
  .hx-rotator span { transition: none; }
}

/* Mot rotatif : hauteur suffisante pour les jambages (g, p) */
.hx-rotator { height: 1.22em; margin-top: .02em; }
.hx-rotator span { line-height: 1.12; padding-bottom: .08em; }
/* ---------- Visuel photo (v2) ---------- */
.hx-visual-photo { aspect-ratio: 1.02; }
.hx-photo { position: absolute; margin: 0; border-radius: 16px; overflow: hidden; border: 1px solid rgba(255, 255, 255, .16); box-shadow: 0 50px 90px -40px rgba(0, 0, 0, .85); transform: translate3d(var(--px, 0), var(--py, 0), 0); background: #0A2A3C; }
.hx-photo img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease-out); }
.hx-photo::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(5, 23, 38, .55)); pointer-events: none; }
.hx-photo:hover img { transform: scale(1.04); }
.hx-photo-main { left: 0; top: 6%; width: 52%; aspect-ratio: 4 / 5; }
.hx-screen-sm { left: auto; right: 0; top: 0; width: 56%; transform: rotateY(-10deg) rotateX(5deg) translate3d(var(--px, 0), var(--py, 0), 0); }
.hx-photo-team { right: 2%; top: 46%; width: 46%; aspect-ratio: 3 / 2; }
.hx-photo-cable { left: 36%; bottom: 0; width: 25%; aspect-ratio: 1; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .85); }
.hx-photo-cable::after { display: none; }
.hx-photo-cable .hx-label { left: 50%; bottom: -14px; transform: translateX(-50%); white-space: nowrap; }
.hx-photo-cable { overflow: visible; }
.hx-photo-cable img { border-radius: 50%; }
.hx-label { position: absolute; left: 12px; bottom: 12px; z-index: 1; display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border-radius: 999px; background: #fff; color: var(--ink); font-size: 12.5px; font-weight: 600; box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .6); }
.hx-label i { color: var(--brand); }
.hx-tag-c { right: 6%; bottom: 8%; }
.hx-tag-c i { color: #17884A; }
@media (max-width: 1023px) { .hx-screen-sm { transform: none; } }
@media (max-width: 559px) { .hx-visual-photo { aspect-ratio: .95; } .hx-tag-c { display: none; } .hx-photo-cable { width: 30%; left: 30%; } }
@media (prefers-reduced-motion: no-preference) {
  .hx-photo-team { animation: hxFloat 7s ease-in-out infinite .4s; }
  .hx-photo-cable { animation: hxFloat 6s ease-in-out infinite 1s; }
  .hx-tag-c { animation: hxFloat 5.5s ease-in-out infinite .2s; }
}
.hx-label { white-space: nowrap; }
@media (max-width: 559px) { .hx-label { font-size: 11px; padding: 5px 9px; left: 8px; bottom: 8px; } }

/* ---------- Visuel structuré (grille) ---------- */
.hx-bento { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; width: 100%; max-width: 640px; margin: 0 auto; }
.hx-tile { margin: 0; border-radius: 14px; overflow: hidden; border: 1px solid rgba(255, 255, 255, .14); box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .8); }
.hx-tile-screen { grid-column: 1 / -1; background: #fff; }
.hx-tile-screen img { display: block; width: 100%; height: auto; }
.hx-tile-card { position: relative; display: flex; flex-direction: column; aspect-ratio: 1 / 1.05; padding: 12px; background: rgba(9, 34, 54, .82); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transition: transform .35s var(--ease-out), border-color .25s; }
.hx-tile-card:hover { transform: translateY(-4px); border-color: rgba(255, 255, 255, .32); }
.hx-tile-card .sv-visual { flex: 1; min-height: 0; width: 100%; height: 100%; }
.hx-tile-label { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: rgba(255, 255, 255, .78); margin-bottom: 6px; }
.hx-tile-label i { color: var(--sv-light, #8DB8EE); font-size: 13px; }
.hx-tile-phone-frame { flex: 1; min-height: 0; display: flex; justify-content: center; overflow: hidden; }
.hx-tile-phone-frame img { width: 62%; height: auto; align-self: flex-start; border-radius: 14px 14px 0 0; border: 4px solid #03101B; border-bottom: 0; }
.hx-tile-phone .hx-tile-label i { color: #7FE3A8; }
@media (max-width: 559px) {
  .hx-bento { gap: 10px; }
  .hx-tile-card { padding: 8px; border-radius: 12px; }
  .hx-tile-label { font-size: 9px; }
}
/* Mot rotatif : la plus longue variante tient dans la colonne */
.hx-rotator { font-size: .8em; height: 1.24em; }
.hx-rotator span { padding-right: .06em; }

/* Badge « Société informatique » */
.hx-badge {
  position: relative; display: inline-flex; align-items: center; gap: 12px; margin: 0 0 28px; padding: 6px 18px 6px 6px;
  border-radius: 12px; background: rgba(255, 255, 255, .05); color: rgba(255, 255, 255, .78);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.hx-badge::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(90deg, #3E7CB8, #22B25C 45%, #9AA4AF 70%, #EA9541);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}
.hx-badge-mark { width: 34px; height: 34px; border-radius: 9px; background: #fff; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.hx-badge-text { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 14px; }
.hx-badge-text b { color: #fff; font-weight: 600; letter-spacing: .01em; }
.hx-badge-text i { color: #22B25C; font-size: 12px; }
.hx-badge-sep { width: 4px; height: 4px; border-radius: 50%; background: rgba(255, 255, 255, .4); }
@media (prefers-reduced-motion: no-preference) {
  .hx-badge-mark circle { animation: dotPulse 3.6s ease-in-out infinite; animation-delay: var(--d, 0s); transform-box: fill-box; transform-origin: center; }
}
@media (max-width: 479px) { .hx-badge-sep { display: none; } .hx-badge-text { flex-direction: column; align-items: flex-start; gap: 2px; } }

.hx-badge { padding: 9px 18px; }
