/* ===========================================================
   AUXIMOR — Hero d'accueil (prod)
   Namespacé sous .home-hero. Réutilise .bp / .halo / .btn de site.css.
   Carrousel d'outils piloté en JS (sync pastilles garantie).
   =========================================================== */

.home-hero {
  --ok:        #2fae74;
  --ok-dim:    rgba(47,174,116,0.18);
  --ok-line:   rgba(47,174,116,0.42);
  --warn:      #e0a13a;
  --warn-dim:  rgba(224,161,58,0.16);
  --warn-line: rgba(224,161,58,0.4);
  --excel:     #1e6b43;
  --word:      #2a5699;

  position: relative; overflow: hidden;
  min-height: calc(100svh - var(--nav-h));
  display: flex; align-items: center;
  padding: clamp(30px,4.5vh,56px) var(--pad) clamp(40px,5.5vh,64px);
}

.home-hero .hh-inner {
  position: relative; z-index: 2; width: 100%; max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: minmax(0,0.92fr) minmax(0,1.08fr);
  gap: clamp(32px,5vw,68px); align-items: center;
}

/* entrance primitives (gated on .play) */
.home-hero .rise, .home-hero .fade { opacity: 0; }
.home-hero.play .rise { animation: hhRise .85s cubic-bezier(.16,1,.3,1) both; animation-delay: var(--d,0ms); }
.home-hero.play .fade { animation: hhFade .7s ease both; animation-delay: var(--d,0ms); }
@keyframes hhRise { from{opacity:0;transform:translateY(24px)} to{opacity:1;transform:none} }
@keyframes hhFade { from{opacity:0} to{opacity:1} }
.home-hero .mask { display: block; overflow: hidden; padding-bottom: .05em; }
.home-hero .mask > span { display: block; opacity: 0; transform: translateY(112%); }
.home-hero.play .mask > span { animation: hhLineUp 1s cubic-bezier(.16,1,.3,1) both; animation-delay: var(--d,0ms); }
@keyframes hhLineUp { from{opacity:0;transform:translateY(112%)} to{opacity:1;transform:none} }

/* ---------------- Left: kinetic copy ---------------- */
.home-hero .copy { display: flex; flex-direction: column; align-items: flex-start; }
.home-hero .bad {
  font-weight: 600; letter-spacing: -0.035em; line-height: 1.04;
  font-size: clamp(22px,2.9vw,38px); color: var(--muted);
}
.home-hero .bad .kstrike { position: relative; color: var(--fg-2); white-space: nowrap; }
.home-hero .bad .kstrike::after {
  content: ""; position: absolute; left: -2%; right: -2%; top: 56%; height: 0.06em;
  background: linear-gradient(90deg,var(--acc),var(--acc-2)); border-radius: 3px;
  box-shadow: 0 0 16px var(--acc-glow);
  transform: rotate(-2.2deg) scaleX(0); transform-origin: left center;
}
.home-hero.play .bad .kstrike::after { animation: hhStrike .5s cubic-bezier(.16,1,.3,1) both; animation-delay: var(--sd,0.6s); }
@keyframes hhStrike { to { transform: rotate(-2.2deg) scaleX(1); } }

.home-hero .rule { width: 100%; max-width: 340px; height: 1px; background: var(--line); margin: clamp(13px,1.9vh,20px) 0; transform: scaleX(0); transform-origin: left; }
.home-hero.play .rule { animation: hhRule .9s cubic-bezier(.16,1,.3,1) both; animation-delay: .95s; }
@keyframes hhRule { to { transform: scaleX(1); } }

.home-hero .resolve {
  position: relative; font-weight: 600; letter-spacing: -0.04em; line-height: 1.0;
  font-size: clamp(28px,4vw,52px); margin: 0; max-width: 15ch;
}
.home-hero .resolve .grad {
  background: linear-gradient(92deg,var(--acc-3),#fff 46%,var(--acc-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.home-hero .resolve .glow {
  position: absolute; left: 8%; top: 50%; width: 460px; height: 460px; translate: 0 -50%;
  background: radial-gradient(circle,var(--acc-glow),transparent 65%); filter: blur(42px);
  opacity: 0; z-index: -1; pointer-events: none;
}
.home-hero.play .resolve .glow { animation: hhGlow 1.3s ease both; animation-delay: 1.05s; }
@keyframes hhGlow { 0%{opacity:0;transform:scale(.6)} 45%{opacity:.42} 100%{opacity:.18;transform:scale(1)} }

.home-hero .hh-sub { color: var(--fg-2); font-weight: 350; line-height: 1.6; font-size: clamp(15px,1.4vw,18px); max-width: 46ch; margin: clamp(14px,2vh,20px) 0 0; }
.home-hero .hh-sub b { color: var(--fg); font-weight: 500; }
.home-hero .hh-sub .xl { color: #7a96d2; font-weight: 600; }
.home-hero .hh-sub .gn { color: var(--ok); font-weight: 600; }

.home-hero .cta-row { display: flex; gap: 13px; flex-wrap: wrap; align-items: center; margin-top: clamp(16px,2.2vh,24px); }

/* ---------------- Right: showcase ---------------- */
.home-hero .showcase { position: relative; width: 100%; }
.home-hero .show-cap {
  display: flex; align-items: center; gap: 9px; margin-bottom: 14px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--acc-3);
}
.home-hero .show-cap .pdot { width: 6px; height: 6px; border-radius: 50%; background: var(--acc-2); box-shadow: 0 0 12px var(--acc-glow); }
.home-hero .stage-wrap { position: relative; }

/* chaos pile (Excel + Word) */
.home-hero .chaos { position: absolute; inset: 0; z-index: 4; display: grid; place-items: center; pointer-events: none; }
.home-hero .file {
  position: absolute; width: clamp(150px,21vw,210px); border-radius: 10px; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line-2);
  box-shadow: 0 26px 64px -34px rgba(0,0,0,0.92); transform-origin: center;
}
.home-hero .file .fbar { height: 24px; display: flex; align-items: center; gap: 6px; padding: 0 9px; }
.home-hero .file .fbar .ico { width: 8px; height: 8px; border-radius: 2px; background: rgba(255,255,255,0.85); }
.home-hero .file .fbar .nm { font-family: var(--mono); font-size: 10px; color: rgba(255,255,255,0.92); letter-spacing: .02em; }
.home-hero .file.xls .fbar { background: var(--excel); }
.home-hero .file.doc .fbar { background: var(--word); }
.home-hero .file .fbody { padding: 9px; display: grid; gap: 5px; }
.home-hero .file.xls .row { display: grid; grid-template-columns: 1.4fr 1fr .8fr; gap: 4px; }
.home-hero .file.xls .c { height: 9px; border-radius: 2px; background: var(--surface-3); }
.home-hero .file.xls .c.hl { background: rgba(217,119,87,0.55); }
.home-hero .file.doc .ln { height: 7px; border-radius: 3px; background: var(--surface-3); }
.home-hero .file.doc .ln.t { height: 10px; width: 62%; background: rgba(122,150,210,0.6); margin-bottom: 3px; }
.home-hero .file.doc .ln.s { width: 88%; }
.home-hero .file.doc .ln.sm { width: 64%; }
.home-hero .file.f1 { transform: translate(-58px,-46px) rotate(-9deg); z-index: 2; }
.home-hero .file.f2 { transform: translate(46px,-18px) rotate(7deg); }
.home-hero .file.f3 { transform: translate(-30px,40px) rotate(-4deg); z-index: 3; }
.home-hero .file.f4 { transform: translate(60px,52px) rotate(9deg); }
.home-hero.play .chaos { animation: hhChaosOut 1.0s cubic-bezier(.7,0,.84,0) both; animation-delay: .95s; }
@keyframes hhChaosOut { 0%{opacity:1} 100%{opacity:0; transform:scale(.8) translateY(8px); filter:blur(7px)} }
.home-hero.play .file.f1 { animation: hhJit1 .95s ease-in-out both; }
.home-hero.play .file.f4 { animation: hhJit2 .95s ease-in-out both; }
@keyframes hhJit1 { 0%,100%{transform:translate(-58px,-46px) rotate(-9deg)} 50%{transform:translate(-64px,-50px) rotate(-11deg)} }
@keyframes hhJit2 { 0%,100%{transform:translate(60px,52px) rotate(9deg)} 50%{transform:translate(66px,57px) rotate(11deg)} }

.home-hero .arrow-flash {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%; z-index: 5; opacity: 0;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--acc-3);
  display: flex; align-items: center; gap: 7px; white-space: nowrap;
}
.home-hero.play .arrow-flash { animation: hhArrow 1.0s ease both; animation-delay: 1.05s; }
@keyframes hhArrow { 0%{opacity:0;transform:translate(-50%,-50%) scale(.8)} 35%{opacity:1} 72%{opacity:1} 100%{opacity:0;transform:translate(-50%,-50%) scale(1.12)} }

/* device */
.home-hero .device {
  position: relative; z-index: 3; width: 100%; max-width: 600px; margin-left: auto;
  border-radius: 16px; overflow: hidden; background: linear-gradient(160deg,var(--surface-2),var(--surface));
  border: 1px solid var(--acc-line);
  box-shadow: 0 60px 120px -54px rgba(0,0,0,0.95), 0 0 0 1px rgba(61,90,254,0.05), inset 0 1px 0 rgba(255,255,255,0.05);
  opacity: 0; transform: scale(.95);
}
.home-hero.play .device { animation: hhDeviceIn .9s cubic-bezier(.16,1,.3,1) both; animation-delay: 1.35s; }
@keyframes hhDeviceIn { from{opacity:0;transform:scale(.95)} to{opacity:1;transform:scale(1)} }

.home-hero .dev-chrome { height: 40px; display: flex; align-items: center; gap: 10px; padding: 0 14px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,0.02); }
.home-hero .dev-chrome .lights { display: flex; gap: 6px; }
.home-hero .dev-chrome .lights i { width: 9px; height: 9px; border-radius: 50%; background: var(--surface-3); }
.home-hero .dev-chrome .lights i:first-child { background: rgba(61,90,254,0.6); }
.home-hero .dev-chrome .addr { display: inline-flex; align-items: center; gap: 7px; font-family: var(--mono); font-size: 12px; color: var(--fg-2); letter-spacing: 0.02em; }
.home-hero .dev-chrome .addr svg { width: 12px; height: 12px; color: var(--ok); }

.home-hero .dev-main { display: grid; grid-template-columns: 52px 1fr; height: clamp(290px,38vh,344px); }
.home-hero .dev-rail { border-right: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 0; background: rgba(255,255,255,0.012); }
.home-hero .dev-rail .ri { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: var(--muted); }
.home-hero .dev-rail .ri svg { width: 17px; height: 17px; }
.home-hero .dev-rail .ri.on { background: var(--acc-dim); border: 1px solid var(--acc-line); color: var(--acc-2); }
.home-hero .dev-rail .sp { flex: 1; }
.home-hero .dev-rail .av { width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(140deg,var(--acc),var(--acc-2)); }

.home-hero .dev-screen { position: relative; overflow: hidden; }
.home-hero .track { display: flex; height: 100%; width: 100%; transition: transform .7s cubic-bezier(.76,0,.24,1); }
.home-hero .tool { flex: 0 0 100%; width: 100%; height: 100%; display: flex; flex-direction: column; min-width: 0; }
.home-hero .tool-head { display: flex; align-items: center; gap: 10px; padding: 13px 16px 11px; border-bottom: 1px solid var(--line); }
.home-hero .tool-head .ttl { font-size: 15px; font-weight: 600; letter-spacing: -0.02em; }
.home-hero .tool-head .badge { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--acc-3); padding: 3px 8px; border-radius: 999px; background: var(--acc-dim); border: 1px solid var(--acc-line); }
.home-hero .tool-head .act { margin-left: auto; display: flex; gap: 7px; }
.home-hero .tool-head .act .b { height: 22px; border-radius: 6px; background: var(--surface-3); }
.home-hero .tool-head .act .b.s { width: 22px; }
.home-hero .tool-head .act .b.w { width: 54px; background: var(--acc); }
.home-hero .tool-body { flex: 1; padding: 13px 16px; min-height: 0; overflow: hidden; }

/* tool 1: Suivi Dossiers */
.home-hero .t-list { display: grid; gap: 7px; }
.home-hero .t-row { display: grid; grid-template-columns: 22px 1fr auto auto; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; background: var(--surface); border: 1px solid var(--line); }
.home-hero .t-row .dot { width: 22px; height: 22px; border-radius: 7px; background: var(--acc-dim); border: 1px solid var(--acc-line); }
.home-hero .t-row .nm { display: grid; gap: 4px; }
.home-hero .t-row .nm .a { height: 7px; width: 92px; border-radius: 3px; background: var(--fg-2); opacity: .8; }
.home-hero .t-row .nm .b { height: 5px; width: 58px; border-radius: 3px; background: var(--surface-3); }
.home-hero .t-row .date { font-family: var(--mono); font-size: 10px; color: var(--muted); }
.home-hero .st { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.03em; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.home-hero .st.ok { color: var(--ok); background: var(--ok-dim); border: 1px solid var(--ok-line); }
.home-hero .st.wait { color: var(--warn); background: var(--warn-dim); border: 1px solid var(--warn-line); }
.home-hero .st.run { color: var(--acc-2); background: var(--acc-dim); border: 1px solid var(--acc-line); }

/* tool 2: ERP */
.home-hero .t-kpis { display: grid; grid-template-columns: repeat(3,1fr); gap: 9px; margin-bottom: 11px; }
.home-hero .t-kpi { padding: 10px 11px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); display: grid; gap: 6px; }
.home-hero .t-kpi .lab { font-family: var(--mono); font-size: 9px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
.home-hero .t-kpi .val { font-size: 18px; font-weight: 600; letter-spacing: -0.03em; }
.home-hero .t-kpi .val.up { color: var(--ok); }
.home-hero .t-chart { height: 96px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); padding: 11px 12px; display: flex; align-items: flex-end; gap: 7px; }
.home-hero .t-chart .bar { flex: 1; border-radius: 4px 4px 0 0; background: linear-gradient(180deg,var(--acc-2),var(--acc)); opacity: .9; }
.home-hero .t-chart .bar:nth-child(odd) { background: linear-gradient(180deg,var(--surface-3),var(--surface-2)); }

/* tool 3: Gestion de projets */
.home-hero .t-kanban { display: grid; grid-template-columns: repeat(3,1fr); gap: 9px; height: 100%; }
.home-hero .t-col { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.home-hero .t-col .ch { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.home-hero .t-col .ch i { width: 6px; height: 6px; border-radius: 2px; }
.home-hero .t-col .ch.a i { background: var(--muted); }
.home-hero .t-col .ch.b i { background: var(--acc); }
.home-hero .t-col .ch.c i { background: var(--ok); }
.home-hero .kcard { border-radius: 8px; background: var(--surface); border: 1px solid var(--line); padding: 9px; display: grid; gap: 6px; }
.home-hero .kcard .l { height: 6px; border-radius: 3px; background: var(--surface-3); }
.home-hero .kcard .l.t { width: 80%; background: var(--fg-2); opacity: .75; height: 7px; }
.home-hero .kcard .meta { display: flex; align-items: center; gap: 6px; margin-top: 1px; }
.home-hero .kcard .meta .pin { width: 16px; height: 16px; border-radius: 50%; background: linear-gradient(140deg,var(--acc),var(--acc-2)); }
.home-hero .kcard .meta .tag { height: 12px; width: 34px; border-radius: 4px; background: var(--acc-dim); border: 1px solid var(--acc-line); }
.home-hero .kcard.gn { border-color: var(--ok-line); }

/* tool 4: Suivi de la prospection */
.home-hero .t-pipe { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; height: 100%; }
.home-hero .t-stage { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.home-hero .t-stage .sh { font-family: var(--mono); font-size: 9px; letter-spacing: 0.03em; text-transform: uppercase; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-hero .t-stage .sh b { color: var(--acc-2); font-weight: 600; }
.home-hero .dcard { border-radius: 8px; background: var(--surface); border: 1px solid var(--line); padding: 8px; display: grid; gap: 5px; }
.home-hero .dcard .nm { height: 6px; width: 78%; border-radius: 3px; background: var(--fg-2); opacity: .72; }
.home-hero .dcard .amt { font-family: var(--mono); font-size: 10px; color: var(--ok); }
.home-hero .dcard.win { border-color: var(--ok-line); background: linear-gradient(160deg,var(--ok-dim),var(--surface)); }

/* progress dots (JS-synced via .on) */
.home-hero .dev-dots { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 11px 14px; border-top: 1px solid var(--line); background: rgba(255,255,255,0.012); }
.home-hero .dev-dots .d { display: flex; align-items: center; gap: 7px; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.02em; color: var(--muted); transition: color .35s; }
.home-hero .dev-dots .d i { width: 6px; height: 6px; border-radius: 50%; background: var(--surface-3); transition: background .35s, box-shadow .35s, transform .35s; }
.home-hero .dev-dots .d.on { color: var(--fg); }
.home-hero .dev-dots .d.on i { background: var(--acc); box-shadow: 0 0 10px var(--acc-glow); transform: scale(1.25); }

/* "et bien d'autres" link */
.home-hero .show-more { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; font-size: 14px; color: var(--muted); text-decoration: none; transition: color .2s; }
.home-hero .show-more b { color: var(--fg-2); font-weight: 500; transition: color .2s; }
.home-hero .show-more .arw { transition: transform .2s; }
.home-hero .show-more:hover { color: var(--fg-2); }
.home-hero .show-more:hover b { color: var(--acc-2); }
.home-hero .show-more:hover .arw { transform: translateX(4px); }

/* ---------------- Responsive ---------------- */
@media (max-width: 940px) {
  /* Sur mobile la pile est verticale : on cale en haut pour que le texte
     remplisse le premier écran (au lieu d'être centré, ce qui laissait le
     haut vide et poussait l'illustration tout en bas). */
  .home-hero { align-items: flex-start; min-height: auto; padding-top: clamp(24px,4vh,44px); }
  .home-hero .hh-inner { grid-template-columns: 1fr; gap: clamp(26px,4vh,40px); align-items: start; }
  .home-hero .resolve { max-width: 18ch; }
  .home-hero .device { margin: 0 auto; max-width: 560px; }

  /* ---- Animation spéciale mobile ----
     Cascade rapide de haut en bas : tout le texte est visible en ~0,8 s,
     puis l'aperçu de l'outil glisse à la suite. Fini l'effet "page vide". */
  .home-hero.play .bad:nth-of-type(1) > span { animation-delay: .05s; }
  .home-hero.play .bad:nth-of-type(2) > span { animation-delay: .14s; }
  .home-hero.play .bad:nth-of-type(1) .kstrike::after { animation-delay: .5s; }
  .home-hero.play .bad:nth-of-type(2) .kstrike::after { animation-delay: .62s; }
  .home-hero.play .rule { animation-delay: .26s; }
  .home-hero.play .resolve .glow { animation-delay: .34s; }
  .home-hero.play .resolve .mask:nth-child(2) > span { animation-delay: .30s; }
  .home-hero.play .resolve .mask:nth-child(3) > span { animation-delay: .39s; }
  .home-hero.play .resolve .mask:nth-child(4) > span { animation-delay: .48s; }
  .home-hero.play .hh-sub  { animation-delay: .60s; }
  .home-hero.play .cta-row { animation-delay: .72s; }
  .home-hero.play .show-cap { animation-delay: .50s; }
  .home-hero.play .chaos { animation-delay: .20s; }
  .home-hero.play .arrow-flash { animation-delay: .34s; }
  .home-hero.play .device { animation-delay: .60s; }
}
@media (max-width: 560px) {
  .home-hero .dev-main { grid-template-columns: 44px 1fr; height: 320px; }
  .home-hero .dev-rail .ri { width: 26px; height: 26px; }
  .home-hero .tool-head .ttl { font-size: 13.5px; }
  .home-hero .tool-body { padding: 11px 12px; }
  .home-hero .t-pipe { gap: 6px; }
  .home-hero .dcard, .home-hero .kcard { padding: 7px; }
  .home-hero .dev-dots { gap: 9px; }
  .home-hero .dev-dots .d span { display: none; }
  .home-hero .file { width: clamp(128px,42vw,168px); }
}
@media (max-width: 380px) {
  .home-hero .t-row { grid-template-columns: 18px 1fr auto; }
  .home-hero .t-row .date { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .home-hero *, .home-hero .halo { animation: none !important; }
  .home-hero .rise, .home-hero .fade, .home-hero .mask > span, .home-hero .device { opacity: 1 !important; transform: none !important; }
  .home-hero .bad .kstrike::after { transform: rotate(-2.2deg) scaleX(1) !important; }
  .home-hero .chaos { display: none !important; }
  .home-hero .rule { transform: scaleX(1) !important; }
  .home-hero .track { transform: translateX(0) !important; }
}
