/* ==========================================================================
   PAGE D'ACCUEIL PUBLIQUE — préfixe .hm-
   Les couleurs, polices et jetons viennent de styles.css (palette inchangée, #4169E1).
   Le fond 3D (login-scene.js) reste visible derrière la page : aucun fond opaque pleine page ici.
   ========================================================================== */

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body.hm-body { margin: 0; }

.hm-root {
  --hm-max: 1180px;
  --hm-gutter: 24px;
  --hm-nav-h: 64px;
  --hm-card: rgba(21, 23, 28, 0.74);
  --hm-card-solid: #15171c;
  --hm-chat: #2b2d31;
  --hm-chat-2: #1e1f22;
  --hm-radius: 16px;
  --hm-section: clamp(56px, 8vw, 96px);
  min-height: 100vh;
  overflow-x: clip; /* clip (et non hidden) : ne crée pas de conteneur de défilement, la navbar reste collante */
  color: var(--text-primary);
  font-family: var(--font-native);
}
@media (max-width: 640px) { .hm-root { --hm-gutter: 16px; --hm-nav-h: 58px; } }

.hm-wrap { width: 100%; max-width: calc(var(--hm-max) + var(--hm-gutter) * 2); margin: 0 auto; padding: 0 var(--hm-gutter); box-sizing: border-box; }

.hm-skip { position: absolute; left: 12px; top: -48px; z-index: 1000; background: var(--accent); color: #fff; padding: 8px 14px; border-radius: 8px; text-decoration: none; transition: top 0.15s ease; }
.hm-skip:focus { top: 10px; }

/* ---------- Boutons ---------- */
.hm-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--control-h, 40px); padding: 0 18px; border-radius: 10px; box-sizing: border-box;
  font: 600 14px/1 var(--font-native); text-decoration: none; cursor: pointer; white-space: nowrap;
  color: var(--text-primary); background: rgba(255, 255, 255, 0.06); border: 1px solid var(--border-strong);
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.hm-btn:hover { background: rgba(255, 255, 255, 0.1); border-color: #4b5060; }
.hm-btn:active { transform: translateY(1px); }
.hm-btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.hm-btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); box-shadow: 0 8px 28px rgba(65, 105, 225, 0.35); }
.hm-btn-discord { background: #5865f2; border-color: #5865f2; color: #fff; }
.hm-btn-discord:hover { background: #6b77f5; border-color: #6b77f5; }
.hm-btn-lg { height: 48px; padding: 0 24px; font-size: 15px; border-radius: 12px; }
.hm-btn-sm { height: 36px; padding: 0 14px; font-size: 13px; }

/* ---------- Barre de navigation ---------- */
.hm-nav { position: sticky; top: 0; z-index: 100; background: rgba(10, 11, 14, 0.62); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); border-bottom: 1px solid rgba(255, 255, 255, 0.07); transition: background 0.2s ease, border-color 0.2s ease; }
.hm-nav.is-scrolled { background: rgba(10, 11, 14, 0.86); border-bottom-color: rgba(255, 255, 255, 0.1); }
.hm-nav-in { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; height: var(--hm-nav-h); max-width: calc(var(--hm-max) + var(--hm-gutter) * 2); margin: 0 auto; padding: 0 var(--hm-gutter); box-sizing: border-box; }

.hm-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text-primary); justify-self: start; border-radius: 10px; padding: 4px 6px 4px 0; }
.hm-brand img { width: 34px; height: 34px; border-radius: 50%; transition: transform 0.25s ease; }
.hm-brand:hover img { transform: rotate(-8deg) scale(1.06); }
.hm-brand span { font-family: var(--font-display); font-weight: 700; font-size: 17px; letter-spacing: 0.01em; }

.hm-links { display: flex; align-items: center; gap: 4px; }
.hm-links a { position: relative; padding: 8px 12px; border-radius: 8px; color: var(--text-secondary); font-size: 14px; font-weight: 500; text-decoration: none; transition: color 0.18s ease, background 0.18s ease; white-space: nowrap; }
.hm-links a:hover { color: var(--text-primary); background: rgba(255, 255, 255, 0.06); }
.hm-links a.is-active { color: var(--text-primary); }
.hm-links a.is-active::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 2px; border-radius: 2px; background: var(--accent); }

.hm-actions { display: flex; align-items: center; gap: 10px; justify-self: end; }

.hm-lang { display: inline-flex; padding: 3px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); border: 1px solid var(--border); }
.hm-lang button { border: 0; background: transparent; color: var(--text-secondary); font: 600 12px/1 var(--font-native); padding: 6px 10px; border-radius: 999px; cursor: pointer; transition: background 0.18s ease, color 0.18s ease; }
.hm-lang button:hover { color: var(--text-primary); }
.hm-lang button.is-on { background: var(--accent); color: #fff; }

.hm-account { position: relative; }
.hm-avatar-btn { display: inline-flex; align-items: center; padding: 0; border: 2px solid transparent; border-radius: 50%; background: none; cursor: pointer; transition: border-color 0.18s ease, transform 0.18s ease; }
.hm-avatar-btn:hover, .hm-avatar-btn[aria-expanded="true"] { border-color: var(--accent); }
.hm-avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; display: block; }
.hm-avatar-fallback { width: 34px; height: 34px; border-radius: 50%; background: var(--accent-soft); color: #fff; display: inline-flex; align-items: center; justify-content: center; font: 700 14px/1 var(--font-native); }
.hm-menu { position: absolute; right: 0; top: calc(100% + 10px); min-width: 230px; padding: 8px; border-radius: 14px; background: var(--hm-card-solid); border: 1px solid var(--border-strong); box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5); display: none; }
.hm-menu.is-open { display: block; animation: hmPop 0.16s ease; }
.hm-menu-user { padding: 8px 10px 10px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.hm-menu-user small { display: block; color: var(--text-muted); font-size: 11.5px; }
.hm-menu-user strong { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-menu a { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 8px; color: var(--text-primary); text-decoration: none; font-size: 14px; transition: background 0.15s ease; }
.hm-menu a:hover { background: rgba(255, 255, 255, 0.07); }
.hm-menu a.hm-danger { color: #ff8a8a; }
@keyframes hmPop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

.hm-burger { display: none; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border-strong); background: rgba(255, 255, 255, 0.06); color: var(--text-primary); cursor: pointer; align-items: center; justify-content: center; }
.hm-burger svg { width: 20px; height: 20px; }

.hm-mobile { display: none; }

@media (max-width: 900px) {
  .hm-nav-in { grid-template-columns: 1fr auto; }
  .hm-links { display: none; }
  .hm-burger { display: inline-flex; }
  .hm-actions .hm-lang { display: none; }
  .hm-mobile.is-open { display: block; border-top: 1px solid rgba(255, 255, 255, 0.07); background: rgba(10, 11, 14, 0.96); max-height: calc(100vh - var(--hm-nav-h)); overflow-y: auto; animation: hmPop 0.18s ease; }
  .hm-mobile-in { padding: 12px var(--hm-gutter) 20px; display: flex; flex-direction: column; gap: 4px; }
  .hm-mobile-in a.hm-m-link { padding: 13px 8px; border-radius: 10px; color: var(--text-primary); text-decoration: none; font-size: 16px; font-weight: 500; }
  .hm-mobile-in a.hm-m-link:hover, .hm-mobile-in a.hm-m-link.is-active { background: rgba(255, 255, 255, 0.07); }
  .hm-mobile-in .hm-m-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 8px 4px; }
  .hm-mobile-in .hm-btn { width: 100%; margin-top: 10px; }
}
@media (max-width: 420px) { .hm-actions .hm-btn-login { display: none; } }

/* ---------- Sections ---------- */
.hm-section { padding: 0 0 var(--hm-section); scroll-margin-top: calc(var(--hm-nav-h) + 8px); }
.hm-section-tight { padding-top: 0; }
.hm-head { max-width: 720px; margin: 0 0 clamp(28px, 4vw, 44px); }
.hm-head.is-center { margin-left: auto; margin-right: auto; text-align: center; }
.hm-eyebrow { display: inline-block; margin: 0 0 12px; padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-hover); background: var(--accent-soft); border: 1px solid rgba(65, 105, 225, 0.35); }
.hm-h2 { margin: 0 0 14px; font-family: var(--font-display); font-size: clamp(26px, 3.6vw, 38px); line-height: 1.15; letter-spacing: -0.01em; }
.hm-lead { margin: 0; color: var(--text-secondary); font-size: clamp(15px, 1.6vw, 17px); line-height: 1.65; }
.hm-h3 { margin: 0 0 10px; font-family: var(--font-display); font-size: clamp(20px, 2.4vw, 26px); line-height: 1.2; }

/* ---------- Héros ---------- */
.hm-hero { padding: clamp(40px, 7vw, 80px) 0 clamp(40px, 6vw, 72px); scroll-margin-top: 0; }
.hm-hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.hm-hero h1 { margin: 0 0 18px; font-family: var(--font-display); font-size: clamp(34px, 5.4vw, 60px); line-height: 1.06; letter-spacing: -0.02em; }
.hm-hero h1 em { font-style: normal; color: var(--accent-hover); }
.hm-hero .hm-lead { max-width: 560px; margin-bottom: 28px; }
.hm-cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 26px; }
.hm-stats { display: flex; flex-wrap: wrap; gap: 8px 10px; padding: 0; margin: 0; list-style: none; }
.hm-stats li { padding: 6px 12px; border-radius: 999px; font-size: 13px; color: var(--text-secondary); background: rgba(255, 255, 255, 0.05); border: 1px solid var(--border); }
.hm-stats b { color: var(--text-primary); }
.hm-caption { margin: 10px 0 0; color: var(--text-muted); font-size: 12px; text-align: center; }
@media (max-width: 900px) { .hm-hero-grid { grid-template-columns: minmax(0, 1fr); } .hm-hero .hm-lead { max-width: none; } }
@media (max-width: 640px) { .hm-cta-row .hm-btn { flex: 1 1 100%; } }

/* ---------- Cartes ---------- */
.hm-card { background: var(--hm-card); border: 1px solid var(--border); border-radius: var(--hm-radius); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease; }
.hm-card.is-hover:hover { transform: translateY(-3px); border-color: rgba(65, 105, 225, 0.55); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35); }

/* ---------- Blocs 2 colonnes alternés ---------- */
.hm-blocks { display: flex; flex-direction: column; gap: clamp(40px, 6vw, 72px); }
.hm-block { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); align-items: center; }
.hm-block.is-reverse .hm-block-text { order: 2; }
.hm-block-text .hm-lead { margin-bottom: 16px; font-size: 15.5px; }
.hm-bullets { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.hm-bullets li { position: relative; padding-left: 26px; color: var(--text-secondary); font-size: 14.5px; line-height: 1.5; }
.hm-bullets li::before { content: ""; position: absolute; left: 0; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.4l2.3 2.3 4.7-5' fill='none' stroke='%235578e8' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat; }
.hm-block-link { display: inline-flex; margin-top: 18px; }
@media (max-width: 860px) {
  .hm-block { grid-template-columns: minmax(0, 1fr); }
  .hm-block.is-reverse .hm-block-text { order: 0; }
}

/* ---------- Panneau de réglages (aperçu) ---------- */
.hm-panel { padding: 18px; }
.hm-panel-head { display: flex; align-items: center; gap: 10px; padding-bottom: 14px; margin-bottom: 6px; border-bottom: 1px solid var(--border); }
.hm-panel-icon { width: 34px; height: 34px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--accent-soft); font-size: 17px; }
.hm-panel-title { flex: 1; font-weight: 700; font-size: 15px; font-family: var(--font-display); }
.hm-switch { position: relative; width: 38px; height: 22px; border-radius: 999px; background: var(--accent); flex-shrink: 0; }
.hm-switch::after { content: ""; position: absolute; top: 3px; right: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; }
.hm-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 44px; padding: 8px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.05); font-size: 14px; }
.hm-row:last-of-type { border-bottom: 0; }
.hm-row span:first-child { color: var(--text-secondary); }
.hm-pill { padding: 5px 11px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border-strong); font-size: 13px; font-weight: 600; white-space: nowrap; }
.hm-panel-foot { margin: 10px 0 0; color: var(--text-muted); font-size: 11.5px; }

/* ---------- Faux Discord (chat) ---------- */
.hm-chat { border-radius: var(--hm-radius); overflow: hidden; background: var(--hm-chat); border: 1px solid #1a1b1e; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45); font-family: "gg sans", "Inter", system-ui, sans-serif; text-align: left; }
.hm-chat-head { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px; background: var(--hm-chat); border-bottom: 1px solid #1e1f22; color: #f2f3f5; font-weight: 700; font-size: 15px; }
.hm-chat-head i { color: #80848e; font-style: normal; font-weight: 500; font-size: 20px; }
.hm-chat-body { height: var(--hm-chat-h, 340px); padding: 14px 16px; display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; overflow: hidden; }
.hm-chat.is-tall { --hm-chat-h: 370px; }
.hm-msg { display: flex; gap: 12px; align-items: flex-start; min-width: 0; }
.hm-av { width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; color: #fff; overflow: hidden; }
.hm-av img { width: 100%; height: 100%; }
.hm-msg-main { min-width: 0; flex: 1; }
.hm-msg-name { display: flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 600; line-height: 1.2; }
.hm-msg-name small { color: #949ba4; font-weight: 500; font-size: 11.5px; }
.hm-tag { padding: 1px 5px; border-radius: 4px; background: #5865f2; color: #fff; font-size: 10px; font-weight: 700; letter-spacing: 0.02em; }
.hm-msg-text { color: #dbdee1; font-size: 15px; line-height: 1.4; margin-top: 2px; word-break: break-word; }
.hm-sys { display: flex; align-items: center; gap: 8px; color: #949ba4; font-size: 13.5px; padding-left: 4px; }
.hm-sys::before { content: "→"; color: #23a559; font-weight: 700; }
.hm-sys.is-time::before { content: "⏱"; }
.hm-sys.is-cmd::before { content: "/"; color: #80848e; }
.hm-embed { margin-top: 6px; max-width: 440px; border-radius: 4px; border-left: 4px solid var(--accent); background: var(--hm-chat-2); padding: 10px 14px 12px; }
.hm-embed.is-warn { border-left-color: #f0b232; }
.hm-embed.is-ok { border-left-color: #23a559; }
.hm-embed.is-bad { border-left-color: #f23f42; }
.hm-embed-title { color: #f2f3f5; font-weight: 700; font-size: 14.5px; margin-bottom: 4px; }
.hm-embed-text { color: #dbdee1; font-size: 14px; line-height: 1.4; }
.hm-embed-fields { display: grid; gap: 8px; margin-top: 8px; }
.hm-embed-fields.is-inline { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
.hm-embed-fields b { display: block; color: #f2f3f5; font-size: 12.5px; margin-bottom: 1px; }
.hm-embed-fields span { color: #dbdee1; font-size: 13.5px; }
.hm-embed-foot { margin-top: 8px; color: #949ba4; font-size: 12px; }
.hm-embed-banner { height: 92px; border-radius: 4px; margin-top: 10px; background: radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.28) 0 2px, transparent 3px), radial-gradient(circle at 70% 60%, rgba(255, 255, 255, 0.22) 0 2px, transparent 3px), radial-gradient(circle at 85% 20%, rgba(255, 255, 255, 0.3) 0 1.5px, transparent 2.5px), linear-gradient(120deg, #1d2a66, #4169e1 55%, #7b93f0); position: relative; overflow: hidden; }
.hm-embed-banner img { position: absolute; left: 50%; top: 50%; width: 58px; height: 58px; margin: -29px 0 0 -29px; border-radius: 50%; box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.25), 0 8px 24px rgba(0, 0, 0, 0.4); }
.hm-embed-thumb { float: right; width: 56px; height: 56px; border-radius: 6px; margin-left: 12px; }
.hm-btn-d { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; padding: 7px 14px; border-radius: 4px; background: #5865f2; color: #fff; font-size: 13.5px; font-weight: 600; transition: background 0.2s ease, transform 0.2s ease; }
.hm-btn-d.is-pressed { background: #4752c4; transform: scale(0.96); }
.hm-btn-d.is-green { background: #248046; }
.hm-captcha { margin-top: 8px; display: inline-block; padding: 8px 16px; border-radius: 4px; background: repeating-linear-gradient(115deg, #3a3d44 0 6px, #30333a 6px 12px); color: #e9ecff; font: 700 26px/1 "Courier New", monospace; letter-spacing: 0.28em; transform: skewX(-8deg); text-shadow: 2px 1px 0 rgba(65, 105, 225, 0.7); }
.hm-in { animation: hmLineIn 0.32s ease both; }
@keyframes hmLineIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.hm-chat-foot { margin: 0; padding: 0 16px 12px; background: var(--hm-chat); }
.hm-chat-input { height: 38px; border-radius: 8px; background: #383a40; display: flex; align-items: center; padding: 0 14px; color: #80848e; font-size: 14px; }

/* ---------- Cartes de logs / accueil ---------- */
.hm-logstack { display: flex; flex-direction: column; gap: 10px; }
.hm-log { padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; border-left: 4px solid var(--accent); }
.hm-log.is-ok { border-left-color: #23a559; }
.hm-log.is-warn { border-left-color: #f0b232; }
.hm-log.is-bad { border-left-color: #f23f42; }
.hm-log-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.hm-log-top b { font-size: 14px; }
.hm-log-top small { color: var(--accent-hover); font-size: 12px; font-weight: 600; }
.hm-log p { margin: 0; color: var(--text-secondary); font-size: 13.5px; line-height: 1.45; }

.hm-steps { padding: 20px; display: flex; flex-direction: column; gap: 0; }
.hm-step { display: flex; gap: 14px; align-items: flex-start; position: relative; padding-bottom: 20px; }
.hm-step:last-child { padding-bottom: 0; }
.hm-step::before { content: ""; position: absolute; left: 14px; top: 30px; bottom: 0; width: 2px; background: var(--border-strong); }
.hm-step:last-child::before { display: none; }
.hm-step-dot { width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); border: 1px solid rgba(65, 105, 225, 0.5); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex-shrink: 0; }
.hm-step b { display: block; font-size: 14.5px; margin-bottom: 2px; }
.hm-step span { color: var(--text-secondary); font-size: 13px; }

/* ---------- Démonstrations ---------- */
.hm-demo { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 20px; align-items: start; }
.hm-demo-list { padding: 8px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: calc(var(--hm-nav-h) + 16px); }
.hm-demo-tab { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 12px; border-radius: 10px; border: 0; background: transparent; color: var(--text-secondary); font: 600 14px/1.2 var(--font-native); text-align: left; cursor: pointer; transition: background 0.18s ease, color 0.18s ease; }
.hm-demo-tab:hover { background: rgba(255, 255, 255, 0.06); color: var(--text-primary); }
.hm-demo-tab.is-on { background: var(--accent-soft); color: #fff; box-shadow: inset 3px 0 0 var(--accent); }
.hm-demo-tab .hm-ico { width: 28px; height: 28px; border-radius: 8px; background: rgba(255, 255, 255, 0.06); display: inline-flex; align-items: center; justify-content: center; font-size: 15px; flex-shrink: 0; }
.hm-demo-stage { padding: clamp(16px, 2.4vw, 26px); display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(16px, 2.4vw, 28px); align-items: start; }
.hm-demo-info { transition: opacity 0.2s ease, transform 0.2s ease; }
.hm-demo-info .hm-lead { font-size: 14.5px; margin-bottom: 18px; }
.hm-demo-info h4 { margin: 0 0 10px; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.hm-demo-view { min-width: 0; transition: opacity 0.2s ease; }
.hm-demo-stage.is-swapping .hm-demo-info, .hm-demo-stage.is-swapping .hm-demo-view { opacity: 0; transform: translateY(6px); }
.hm-demo-note { margin: 10px 0 0; color: var(--text-muted); font-size: 12px; }
.hm-demo-note button { background: none; border: 0; padding: 0; margin-left: 8px; color: var(--accent-hover); font: inherit; cursor: pointer; text-decoration: underline; }
@media (max-width: 980px) {
  .hm-demo { grid-template-columns: minmax(0, 1fr); }
  .hm-demo-list { position: static; flex-direction: row; overflow-x: auto; padding: 6px; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
  .hm-demo-tab { width: auto; flex-shrink: 0; white-space: nowrap; }
  .hm-demo-tab.is-on { box-shadow: inset 0 -3px 0 var(--accent); }
  .hm-demo-stage { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Vitrine du dashboard ---------- */
.hm-dash { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(24px, 5vw, 56px); align-items: center; padding: clamp(20px, 3.4vw, 40px); }
.hm-mock { border-radius: 14px; overflow: hidden; border: 1px solid var(--border-strong); background: #0f1115; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5); }
.hm-mock-bar { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; background: #15171c; border-bottom: 1px solid var(--border); }
.hm-mock-bar img { width: 20px; height: 20px; border-radius: 50%; }
.hm-mock-bar b { font-size: 13px; font-family: var(--font-display); }
.hm-mock-bar i { margin-left: auto; width: 54px; height: 8px; border-radius: 6px; background: var(--surface-2); }
.hm-mock-body { display: grid; grid-template-columns: 150px minmax(0, 1fr); min-height: 300px; }
.hm-mock-side { padding: 12px 8px; border-right: 1px solid var(--border); display: flex; flex-direction: column; gap: 4px; background: #12141a; }
.hm-mock-side span { padding: 8px 10px; border-radius: 8px; font-size: 12.5px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-mock-side span.is-on { background: var(--accent-soft); color: #fff; }
.hm-mock-main { padding: 16px; }
.hm-mock-title { margin: 0 0 2px; font-family: var(--font-display); font-size: 16px; }
.hm-mock-sub { margin: 0 0 14px; color: var(--text-muted); font-size: 12px; }
.hm-mock-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 10px; }
.hm-mock-tile { padding: 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); }
.hm-mock-tile b { display: block; font-size: 12.5px; margin-bottom: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-mock-tile strong { font-size: 20px; font-family: var(--font-display); }
.hm-mock-tile small { color: var(--text-muted); font-size: 11.5px; margin-left: 4px; }
.hm-mock-bar2 { height: 5px; border-radius: 4px; margin-top: 10px; background: var(--surface-2); overflow: hidden; }
.hm-mock-bar2 i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.hm-dash .hm-bullets { margin: 18px 0 22px; }
@media (max-width: 900px) { .hm-dash { grid-template-columns: minmax(0, 1fr); } .hm-mock-body { grid-template-columns: 110px minmax(0, 1fr); } }
@media (max-width: 480px) { .hm-mock-body { grid-template-columns: minmax(0, 1fr); } .hm-mock-side { display: none; } }

/* ---------- Catalogue ---------- */
.hm-cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.hm-cat { padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.hm-cat-top { display: flex; align-items: center; gap: 12px; }
.hm-cat-top .hm-panel-icon { width: 40px; height: 40px; font-size: 20px; }
.hm-cat-top h3 { margin: 0; font-size: 16px; font-family: var(--font-display); }
.hm-cat-top small { display: block; color: var(--accent-hover); font-size: 12px; font-weight: 600; }
.hm-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.hm-chips li { padding: 4px 10px; border-radius: 999px; font-size: 12.5px; color: var(--text-secondary); background: rgba(255, 255, 255, 0.05); border: 1px solid var(--border); }

/* ---------- Appel final & pied de page ---------- */
.hm-final { text-align: center; padding: clamp(32px, 5vw, 56px) clamp(20px, 4vw, 48px); background: linear-gradient(180deg, rgba(65, 105, 225, 0.16), rgba(65, 105, 225, 0.06)); border-color: rgba(65, 105, 225, 0.35); }
.hm-final .hm-lead { max-width: 560px; margin: 0 auto 24px; }
.hm-final .hm-cta-row { justify-content: center; margin: 0; }
.hm-foot { padding: 32px 0 40px; color: var(--text-muted); font-size: 13px; }
.hm-foot-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-top: 24px; border-top: 1px solid var(--border); }
.hm-foot nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.hm-foot a { color: var(--text-secondary); text-decoration: none; transition: color 0.15s ease; }
.hm-foot a:hover { color: var(--text-primary); }

/* ---------- Apparition au défilement (jamais sur la scène 3D) ---------- */
.hm-js .hm-reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.hm-js .hm-reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .hm-js .hm-reveal { opacity: 1; transform: none; transition: none; }
  .hm-in, .hm-menu.is-open, .hm-mobile.is-open { animation: none; }
  .hm-btn, .hm-card, .hm-brand img, .hm-demo-info, .hm-demo-view { transition: none; }
  .hm-card.is-hover:hover, .hm-btn:active { transform: none; }
}

/* Aucun défilement horizontal, quel que soit l'écran. */
.hm-root, .hm-root * { box-sizing: border-box; }
.hm-root img { max-width: 100%; }

.hm-sys.is-del::before { content: "✕"; color: #f23f42; }
.hm-sys.is-leave::before { content: "←"; color: #f23f42; }
#hm-cta { padding-bottom: clamp(24px, 4vw, 40px); }
@media (min-width: 1100px) { .hm-cat-grid .hm-cat:last-child:nth-child(4n + 3) { grid-column: span 2; } }

/* Documentation : même fond 3D que l'accueil ; le contenu est posé sur une carte translucide pour rester lisible. */
.docs-card { margin: clamp(20px, 4vw, 40px) auto 60px; padding: clamp(18px, 3vw, 32px); background: rgba(21, 23, 28, 0.78); border: 1px solid var(--border); border-radius: 16px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
@media (max-width: 760px) { .docs-card { margin-left: 12px; margin-right: 12px; } }

/* Barre de la documentation sur petit écran : pas de burger, les liens passent sur une seconde ligne défilante. */
@media (max-width: 900px) {
  .hm-nav.is-docs .hm-nav-in { height: auto; padding-top: 8px; padding-bottom: 6px; row-gap: 4px; }
  .hm-nav.is-docs .hm-links { display: flex; grid-column: 1 / -1; overflow-x: auto; scrollbar-width: none; margin: 0 -4px; }
  .hm-nav.is-docs .hm-actions .hm-lang { display: inline-flex; }
}
@media (max-width: 900px) {
  .hm-nav.is-docs .hm-brand { grid-row: 1; grid-column: 1; }
  .hm-nav.is-docs .hm-actions { grid-row: 1; grid-column: 2; }
  .hm-nav.is-docs .hm-links { grid-row: 2; }
}
