/* ═══════════════════════════════════════════════════════════════
   Nofy IA — page d'accueil
   ═══════════════════════════════════════════════════════════════ */

/* ── Accroche ── */
.h-hero { position: relative; padding: 76px 0 40px; overflow: hidden; overflow: clip; isolation: isolate; }
.h-glow { position: absolute; inset: -10% 0 auto; height: 900px; z-index: -1; pointer-events: none; }
.h-glow span { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; animation: drift 18s ease-in-out infinite alternate; }
.h-glow span:nth-child(1) { width: 520px; height: 420px; left: 8%; top: 40px; background: rgba(59, 130, 246, .30); }
.h-glow span:nth-child(2) { width: 600px; height: 480px; right: 6%; top: 0; background: rgba(91, 76, 240, .32); animation-delay: -6s; }
.h-glow span:nth-child(3) { width: 420px; height: 360px; left: 40%; top: 320px; background: rgba(56, 189, 248, .22); animation-delay: -12s; }
@keyframes drift { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(40px, 30px) scale(1.08); } 100% { transform: translate(-30px, 10px) scale(.96); } }
.h-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background-image: radial-gradient(var(--border-strong) 1px, transparent 1px); background-size: 26px 26px; -webkit-mask-image: radial-gradient(60% 50% at 50% 30%, #000, transparent); mask-image: radial-gradient(60% 50% at 50% 30%, #000, transparent); opacity: .5; }

.h-hero-inner { text-align: center; display: flex; flex-direction: column; align-items: center; }
.h-pill { display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; border-radius: 999px; background: var(--bg-elev); border: 1px solid var(--border); box-shadow: var(--shadow-sm); font-size: 13.5px; font-weight: 500; color: var(--text-muted); text-decoration: none; transition: border-color .2s, transform .2s; animation: up .7s cubic-bezier(.2,.8,.2,1) both; }
.h-pill:hover { border-color: var(--border-strong); transform: translateY(-1px); color: var(--text); }
.h-pill-new { padding: 3px 9px; border-radius: 999px; background: var(--ink); color: var(--on-ink); font-size: 11.5px; font-weight: 700; }
.h-title { font-family: var(--font-serif); font-weight: 400; font-size: clamp(46px, 8vw, 96px); line-height: 1; letter-spacing: -.025em; margin: 28px 0 22px; animation: up .8s .05s cubic-bezier(.2,.8,.2,1) both; }
.h-rotate { position: relative; display: inline-grid; justify-items: start; text-align: left; vertical-align: bottom; font-style: italic; color: var(--accent); transition: width .55s cubic-bezier(.2,.8,.2,1); }
.h-word { grid-area: 1 / 1; opacity: 0; transform: translateY(.45em); filter: blur(6px); transition: opacity .55s, transform .55s cubic-bezier(.2,.8,.2,1), filter .55s; white-space: nowrap; padding-right: .06em; }
.h-word.is-on { opacity: 1; transform: none; filter: none; }
.h-word.is-out { opacity: 0; transform: translateY(-.45em); filter: blur(6px); }
.h-dot { color: var(--accent-2); }
.h-lead { max-width: 640px; font-size: clamp(17px, 2vw, 20px); color: var(--text-muted); line-height: 1.55; animation: up .8s .12s cubic-bezier(.2,.8,.2,1) both; }
.h-form { margin: 32px auto 0; width: 100%; max-width: 520px; animation: up .8s .18s cubic-bezier(.2,.8,.2,1) both; }
.h-hero .hero-note { animation: up .8s .22s both; }
@keyframes up { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ── Démo de l'application ── */
.show { margin-top: 60px; }
.show-tabs { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin: 0 auto 18px; padding: 5px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); width: fit-content; max-width: 100%; }
.show-tabs button { display: inline-flex; align-items: center; gap: 8px; padding: 9px 15px; border: 0; border-radius: 11px; background: transparent; color: var(--text-muted); font-size: 14px; font-weight: 600; cursor: pointer; position: relative; overflow: hidden; transition: color .2s, background .2s; }
.show-tabs button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.show-tabs button:hover { color: var(--text); }
.show-tabs button[aria-selected="true"] { background: var(--bg-elev); color: var(--text); box-shadow: var(--shadow-sm); }
.show-tabs button[aria-selected="true"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 3px; height: 2px; border-radius: 2px; background: var(--accent); transform-origin: left; animation: progress var(--scene-ms, 9s) linear both; }
.show.paused .show-tabs button::after { animation-play-state: paused; }
@keyframes progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.show-window { position: relative; border-radius: 20px; background: var(--bg-elev); border: 1px solid var(--border-strong); box-shadow: var(--shadow-lg), 0 0 0 8px color-mix(in srgb, var(--surface) 70%, transparent); overflow: hidden; }
.show-bar { display: flex; align-items: center; justify-content: space-between; padding: 11px 16px; border-bottom: 1px solid var(--border); background: var(--surface); }
.show-dots { display: flex; gap: 6px; } .show-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--surface-2); }
.show-dots.ghost { visibility: hidden; }
.show-url { font-size: 12px; color: var(--text-light); padding: 4px 40px; border-radius: 8px; background: var(--bg-elev); border: 1px solid var(--border); }
.show-app { display: flex; height: 500px; font-size: 13.5px; }
.show-sb { width: 200px; flex: none; background: var(--surface); border-right: 1px solid var(--border); padding: 14px 10px; display: flex; flex-direction: column; gap: 2px; }
.show-brand { display: flex; align-items: center; gap: 8px; font-family: var(--font-serif); font-size: 19px; padding: 0 6px 10px; }
.show-brand b { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; background: var(--ink); }
.show-brand svg { width: 13px; height: 13px; fill: var(--on-ink); }
.show-new { display: flex; align-items: center; gap: 8px; padding: 6px; font-weight: 600; }
.show-new i { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: #fff; font-style: normal; font-size: 14px; }
.show-nav { padding: 5px 8px; color: var(--text-muted); font-size: 12.5px; }
.show-group { font-size: 11px; color: var(--text-light); padding: 14px 8px 4px; font-weight: 600; }
.show-hist { display: flex; flex-direction: column; gap: 2px; }
.show-hist div { padding: 6px 8px; border-radius: 7px; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; animation: up .4s both; }
.show-hist div.on { background: var(--border); }
.show-main { flex: 1; min-width: 0; display: flex; flex-direction: column; position: relative; }
.show-top { height: 44px; display: flex; align-items: center; gap: 8px; padding: 0 18px; font-size: 13px; font-weight: 500; }
.show-crumb { color: var(--text-light); }
.show-crumb:not(:empty)::after { content: " /"; margin-left: 6px; }
.show-msgs { flex: 1; overflow: hidden; padding: 4px 26px 10px; display: flex; flex-direction: column; justify-content: flex-end; gap: 14px; }
.sm-user { align-self: flex-end; max-width: 78%; padding: 9px 14px; border-radius: 16px 16px 5px 16px; background: var(--surface-2); line-height: 1.5; animation: up .35s both; }
.sm-files { align-self: flex-end; display: flex; gap: 6px; animation: up .35s both; }
.sm-file { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; padding: 4px 9px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--bg-elev); color: var(--text-muted); }
.sm-file b { font-size: 9.5px; color: var(--accent); }
.sm-ai { display: flex; gap: 10px; line-height: 1.6; animation: up .35s both; }
.sm-ai > svg { flex: none; width: 22px; height: 22px; padding: 5px; border-radius: 7px; margin-top: 1px; fill: #fff; background: linear-gradient(135deg, #6d5cf6, #3b82f6); }
.sm-ai.thinking > svg { animation: spin 1.4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.sm-ai-body { flex: 1; min-width: 0; }
.sm-ai-body ul { margin: 6px 0 0; padding-left: 18px; }
.sm-ai-body strong { font-weight: 650; }
.sm-cursor { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-left: 3px; vertical-align: middle; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .2; } }
.sm-card { display: flex; align-items: center; gap: 10px; margin-top: 8px; padding: 9px 12px; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--bg-elev); max-width: 280px; animation: up .35s both; }
.sm-card i { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--surface); font-style: normal; font-size: 12px; color: var(--text-muted); }
.sm-card b { display: block; font-size: 12.5px; } .sm-card small { font-size: 11px; color: var(--text-light); }
.sm-card.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.sm-img { width: 220px; aspect-ratio: 1; border-radius: 14px; margin-top: 4px; overflow: hidden; position: relative; background: linear-gradient(110deg, var(--surface) 30%, var(--surface-2) 50%, var(--surface) 70%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.sm-img svg { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .8s; }
.sm-img.done { animation: none; } .sm-img.done svg { opacity: 1; }
.show-composer { margin: 0 22px 16px; padding: 10px 12px 8px 14px; border-radius: 16px; background: var(--bg-elev); box-shadow: 0 0 0 1px var(--border-strong), 0 4px 18px rgba(0,0,0,.05); min-height: 78px; position: relative; }
.show-typed { color: var(--text); }
.show-typed:empty::before { content: "Comment puis-je vous aider ?"; color: var(--text-light); }
.show-caret { display: inline-block; width: 1.5px; height: 15px; background: var(--text); vertical-align: -3px; margin-left: 1px; animation: blink 1s steps(1) infinite; }
.show-files { display: flex; gap: 6px; }
.show-files:not(:empty) { margin-bottom: 6px; }
.show-cbar { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.show-chip { display: inline-grid; place-items: center; min-width: 26px; height: 26px; border-radius: 8px; border: 1px solid var(--border-strong); font-size: 12px; color: var(--text-muted); padding: 0 8px; }
.show-send { margin-left: auto; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, #6d5cf6, #3b82f6); transition: transform .15s; }
.show-send svg { width: 15px; height: 15px; fill: none; stroke: #fff; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.show-send.press { transform: scale(.86); }
.show-panel { width: 0; flex: none; overflow: hidden; border-left: 1px solid transparent; transition: width .6s cubic-bezier(.2,.8,.2,1), border-color .6s; display: flex; flex-direction: column; background: var(--bg-elev); }
.show-panel.open { width: 46%; border-left-color: var(--border); }
.show-ph { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--border); min-width: 300px; }
.show-ph b { display: block; font-size: 13px; } .show-ph small { font-size: 11px; color: var(--text-light); }
.show-seg { display: flex; padding: 3px; border-radius: 8px; background: var(--surface); font-size: 11px; font-weight: 600; }
.show-seg i { font-style: normal; padding: 3px 8px; border-radius: 6px; color: var(--text-muted); }
.show-seg i.on { background: var(--bg-elev); color: var(--text); box-shadow: var(--shadow-sm); }
.show-pb { flex: 1; position: relative; min-width: 300px; }
.show-code { position: absolute; inset: 0; margin: 0; padding: 14px 16px; background: #1b1b22; color: #d4d2e0; font: 11.5px/1.65 ui-monospace, Consolas, monospace; white-space: pre-wrap; overflow: hidden; transition: opacity .4s; }
.show-code .t { color: #f0a6ff; } .show-code .a { color: #b5a8ff; } .show-code .s { color: #9fd59a; }
.show-site { position: absolute; inset: 0; background: #f6f8f3; color: #23331f; opacity: 0; transition: opacity .5s; font-family: Georgia, serif; overflow: hidden; }
.show-pb.preview .show-site { opacity: 1; } .show-pb.preview .show-code { opacity: 0; }
.site-nav { display: flex; justify-content: space-between; padding: 12px 16px; font-size: 11px; border-bottom: 1px solid rgba(59,42,26,.1); }
.site-nav span { color: #8a6d4f; }
.site-hero { padding: 26px 16px 18px; background: linear-gradient(135deg, #e3ecd9, #a9c196); }
.site-hero h4 { margin: 0 0 6px; font-size: 22px; line-height: 1.1; font-weight: 400; }
.site-hero p { font-size: 11.5px; margin-bottom: 12px; }
.site-hero span { display: inline-block; padding: 6px 12px; border-radius: 999px; background: #2f4a2a; color: #f6f8f3; font: 600 10.5px var(--font-sans); }
.site-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 14px 16px; }
.site-cards i { font-style: normal; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; border-radius: 10px; background: #fff; font: 600 10px var(--font-sans); text-align: center; box-shadow: 0 2px 8px rgba(59,42,26,.08); }
.site-cards em { font-style: normal; font-size: 20px; }
.show-caption { text-align: center; margin-top: 16px; color: var(--text-muted); font-size: 14.5px; min-height: 1.6em; transition: opacity .3s; }

/* ── Bande défilante ── */
.h-marquee { overflow: hidden; padding: 28px 0 8px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.h-marquee-track { display: flex; gap: 12px; width: max-content; animation: marquee 48s linear infinite; }
.h-marquee:hover .h-marquee-track { animation-play-state: paused; }
.h-marquee span { padding: 9px 16px; border-radius: 999px; border: 1px solid var(--border-strong); color: var(--text-muted); font-size: 14px; white-space: nowrap; background: var(--bg-elev); }
@keyframes marquee { to { transform: translateX(calc(-50% - 6px)); } }

/* ── Grille des fonctionnalités ── */
.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.b-card { position: relative; padding: 26px; border-radius: 22px; background: var(--bg-elev); border: 1px solid var(--border); overflow: hidden; display: flex; flex-direction: column; gap: 10px; transition: transform .3s cubic-bezier(.2,.8,.2,1), box-shadow .3s, border-color .3s; }
.b-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--border-strong); }
.b-card::before { content: ""; position: absolute; inset: 0; background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%), var(--accent-soft), transparent 45%); opacity: 0; transition: opacity .3s; pointer-events: none; }
.b-card:hover::before { opacity: 1; }
.b-card h3 { font-size: 19px; font-weight: 650; display: flex; align-items: center; gap: 8px; }
.b-card p { color: var(--text-muted); font-size: 15px; line-height: 1.55; }
.b-ico { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); margin-bottom: 4px; }
.b-ico svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.b-wide { grid-column: span 2; flex-direction: row; align-items: center; gap: 26px; }
.b-wide .b-text { flex: 1; display: flex; flex-direction: column; gap: 10px; }
.b-wide2 { grid-column: span 3; }
.b-visual { flex: 1; }
.b-art { display: flex; align-items: center; gap: 12px; }
.b-art-code, .b-art-prev { flex: 1; height: 170px; border-radius: 14px; padding: 14px; }
.b-art-code { background: #1b1b22; display: flex; flex-direction: column; gap: 9px; }
.b-art-code i { height: 7px; border-radius: 4px; background: linear-gradient(90deg, #f0a6ff, #b5a8ff); opacity: .75; animation: codeLine 3s ease-in-out infinite; transform-origin: left; }
.b-art-code i:nth-child(2n) { animation-delay: .4s; background: linear-gradient(90deg, #9fd59a, #b5a8ff); }
.b-art-code i:nth-child(3n) { animation-delay: .8s; }
@keyframes codeLine { 0%, 100% { transform: scaleX(.6); } 50% { transform: scaleX(1); } }
.b-art-arrow { font-size: 22px; color: var(--text-light); }
.b-art-prev { background: linear-gradient(160deg, #e3ecd9, #a9c196); display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: auto auto auto 1fr; gap: 8px; }
.b-art-prev b { grid-column: 1 / -1; height: 10px; width: 40%; border-radius: 5px; background: #3b2a1a; }
.b-art-prev > i { grid-column: 1 / -1; height: 14px; border-radius: 6px; background: rgba(59,42,26,.75); }
.b-art-prev > i + i { width: 60%; height: 8px; background: rgba(59,42,26,.4); }
.b-art-prev span { border-radius: 9px; background: rgba(255,255,255,.85); }
.b-files { display: flex; flex-direction: column; gap: 7px; margin-top: auto; }
.b-files span { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--border); font: 800 10px var(--font-sans); color: var(--accent); }
.b-files em { font: 500 13px var(--font-sans); color: var(--text); font-style: normal; }
.b-code { margin: auto 0 0; padding: 14px; border-radius: 12px; background: #1b1b22; color: #d4d2e0; font: 12.5px/1.6 ui-monospace, Consolas, monospace; overflow: hidden; }
.b-code b { color: #f0a6ff; font-weight: 400; }
.b-img { margin-top: auto; height: 120px; border-radius: 14px; background: radial-gradient(circle at 70% 35%, #e0e7ff 0 14%, transparent 15%), linear-gradient(180deg, #5b4cf0 0%, #7c6cf5 55%, #38bdf8 100%); position: relative; overflow: hidden; }
.b-img::after { content: ""; position: absolute; left: -10%; right: -10%; bottom: -30%; height: 70%; border-radius: 50%; background: #2a1f4f; box-shadow: 120px -10px 0 #3b2a6a; }
.b-src { display: flex; gap: 8px; margin-top: auto; }
.b-src span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--surface); border: 1px solid var(--border-strong); font-size: 12px; font-weight: 700; color: var(--text-muted); }
.b-keys { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 6px; font-size: 14px; color: var(--text-muted); }
.b-keys span { display: inline-flex; align-items: center; gap: 5px; }
.b-keys kbd { font: 600 12px var(--font-sans); padding: 3px 7px; border-radius: 6px; border: 1px solid var(--border-strong); border-bottom-width: 2px; background: var(--bg); color: var(--text); }

/* ── Petits écrans ── */
@media (max-width: 960px) {
  .bento { grid-template-columns: 1fr 1fr; }
  .b-wide { grid-column: span 2; flex-direction: column; align-items: stretch; }
  .b-wide2 { grid-column: span 2; }
  .show-sb { display: none; }
}
@media (max-width: 720px) {
  .h-hero { padding-top: 48px; }
  .show-app { height: 460px; font-size: 12.5px; }
  .show-panel.open { position: absolute; inset: 0; width: 100%; z-index: 2; }
  .show-ph, .show-pb { min-width: 0; }
  .show-tabs button { padding: 8px 10px; font-size: 13px; }
  .show-tabs button svg { display: none; }
  .show-url { padding: 4px 16px; }
  .show-msgs { padding: 4px 14px 10px; }
  .show-composer { margin: 0 12px 12px; }
}
@media (max-width: 640px) {
  .bento { grid-template-columns: 1fr; }
  .b-wide, .b-wide2 { grid-column: auto; }
  .b-art-code, .b-art-prev { height: 130px; }
  .h-form { flex-direction: column; }
  .h-form .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .h-glow span, .h-marquee-track, .b-art-code i { animation: none; }
  .h-pill, .h-title, .h-lead, .h-form, .h-hero .hero-note { animation: none; }
}
