/* ALDYN Labs — feuille de style unique. Tons clairs, couleurs du logo (violet → indigo → bleu). */
@font-face { font-family: 'Geist'; src: url('fonts/geist-latin-wght-normal.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Geist Mono'; src: url('fonts/geist-mono-latin-wght-normal.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }

:root {
  --paper: #f7f6fb; --paper2: #efedf8; --card: rgba(255, 255, 255, .72);
  --ink: #16132b; --mut: #6b6788; --line: rgba(22, 19, 43, .1);
  --violet: #8b3dff; --indigo: #5b5cf6; --blue: #2d8cff;
  --grad: linear-gradient(100deg, var(--violet), var(--indigo) 50%, var(--blue));
  --f: 'Geist', system-ui, sans-serif; --mono: 'Geist Mono', ui-monospace, monospace;
  --pad: clamp(18px, 4vw, 56px);
}
* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
body { background: var(--paper); color: var(--ink); font: 400 17px/1.55 var(--f); -webkit-font-smoothing: antialiased; overflow-x: clip; }
a { color: inherit; }
img, svg { display: block; }
::selection { background: rgba(139, 61, 255, .18); }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mono { font-family: var(--mono); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; }

/* fond : halo clair + champ de particules (canvas fixe) */
.bg { position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(60% 50% at 70% 20%, rgba(139, 61, 255, .10), transparent 70%), radial-gradient(50% 45% at 15% 85%, rgba(45, 140, 255, .10), transparent 70%), var(--paper); }
#stage { position: fixed; inset: 0; z-index: 1; width: 100%; height: 100%; pointer-events: none; }
.no-webgl #stage { display: none; }

/* en-tête */
.hdr { position: fixed; top: 0; left: 0; right: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 18px var(--pad); }
.hdr .brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.hdr .brand img { height: 22px; width: auto; }
.show-m { display: none; } @media (max-width: 760px) { .show-m { display: inline; } }
.hdr::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(var(--paper) 30%, transparent); }
.nav { display: flex; gap: clamp(14px, 2vw, 30px); align-items: center; }
.nav a { text-decoration: none; font-size: 14px; color: var(--mut); transition: color .2s; }
.nav a:hover, .nav a:focus-visible { color: var(--ink); }
.btn { display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 20px; border-radius: 999px; background: var(--ink); color: #fff !important; text-decoration: none; font-size: 14px; font-weight: 500; transition: transform .2s, box-shadow .2s; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 12px 30px -12px rgba(91, 92, 246, .6); }
.btn.grad { background: var(--grad); }
.btn.ghost { background: transparent; color: var(--ink) !important; border: 1px solid var(--line); }
@media (max-width: 760px) { .nav a:not(:last-child) { display: none; } .nav .btn { height: 38px; padding: 0 16px; font-size: 13px; white-space: nowrap; } .hide-m { display: none; } .hdr .brand img { height: 18px; } }

/* scènes : le texte occupe les bords, le centre est laissé aux particules */
main { position: relative; z-index: 5; }
/* chaque scène : un écran de texte, puis une respiration où seules les particules se transforment */
.scene { position: relative; min-height: 135vh; padding: 0 var(--pad); }
.edge { position: relative; height: 100vh; pointer-events: none; }
.edge > * { pointer-events: auto; }
.lbl { position: absolute; top: 40%; color: var(--mut); }
@media (max-width: 860px) { .lbl { display: none; } }
.lbl.l { left: 0; } .lbl.r { right: 0; text-align: right; }
.corner { position: absolute; max-width: 440px; }
.corner.bl { left: 0; bottom: clamp(28px, 6vh, 64px); } .corner.br { right: 0; bottom: clamp(28px, 6vh, 64px); text-align: right; }
.corner.tl { left: 0; top: clamp(90px, 14vh, 140px); } .corner.tr { right: 0; top: clamp(90px, 14vh, 140px); text-align: right; }
.k { display: block; color: var(--indigo); margin-bottom: 14px; }
h1 { font-size: clamp(38px, 4.8vw, 76px); line-height: .98; letter-spacing: -.045em; font-weight: 500; }
h2 { font-size: clamp(32px, 4.4vw, 64px); line-height: 1.02; letter-spacing: -.04em; font-weight: 500; }
h3 { font-size: 22px; letter-spacing: -.02em; font-weight: 500; line-height: 1.2; }
.lead { font-size: clamp(17px, 1.5vw, 21px); color: var(--mut); line-height: 1.5; text-wrap: pretty; }
/* lisibilité sur les particules : halo couleur papier autour des textes */
h1, h2, .lead, .k, .lbl { text-shadow: 0 0 14px var(--paper), 0 0 28px var(--paper), 0 0 3px var(--paper); }
.grad-text { text-shadow: none; filter: drop-shadow(0 0 12px var(--paper)); }
.lead strong { color: var(--ink); font-weight: 500; }
.scroll-hint { display: flex; align-items: center; gap: 12px; }
.scroll-hint i { width: 1px; height: 38px; background: linear-gradient(var(--indigo), transparent); animation: hint 2.2s ease-in-out infinite; transform-origin: top; }
@keyframes hint { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* apparition du texte au défilement (classe posée par main.js) */
[data-in] { opacity: 0; transform: translateY(24px); transition: opacity .9s cubic-bezier(.16, 1, .3, 1), transform .9s cubic-bezier(.16, 1, .3, 1); }
[data-in].on { opacity: 1; transform: none; }
.no-js [data-in] { opacity: 1; transform: none; }

/* cartes (méthode, créations, applis) */
.cards { display: grid; gap: 12px; }
.card { background: var(--card); border: 1px solid rgba(255, 255, 255, .9); border-radius: 22px; padding: 24px; backdrop-filter: blur(18px) saturate(1.2); -webkit-backdrop-filter: blur(18px) saturate(1.2); box-shadow: 0 30px 60px -40px rgba(45, 30, 120, .35); }
.card .n { color: var(--indigo); }
.card p { color: var(--mut); font-size: 15px; margin-top: 8px; }
.method { position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: min(460px, 100%); grid-template-columns: 1fr 1fr; }
.method .card { min-height: 190px; display: flex; flex-direction: column; justify-content: space-between; }
@media (max-width: 860px) {
  .method { position: static; transform: none; margin-top: 24px; }
  .edge.flow { position: relative; height: auto; min-height: 100vh; display: flex; flex-direction: column; justify-content: flex-end; padding-bottom: 60px; }
  .edge.flow .corner { position: static; max-width: none; text-align: left; }
}

/* ce que fait le studio */
.offer { position: absolute; left: 0; right: 0; bottom: clamp(28px, 6vh, 64px); grid-template-columns: repeat(3, minmax(0, 1fr)); }
.offer .card { min-height: 170px; }
@media (max-width: 860px) { .offer { position: static; grid-template-columns: 1fr; margin-top: 24px; } }

/* applis et logiciels */
.apps { padding: 18vh var(--pad) 10vh; position: relative; z-index: 5; }
.apps-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 36px; }
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 16px; }
.app { display: flex; flex-direction: column; gap: 22px; text-decoration: none; min-height: 320px; transition: transform .3s cubic-bezier(.16, 1, .3, 1), box-shadow .3s; }
.app:hover { transform: translateY(-4px); box-shadow: 0 40px 70px -40px rgba(91, 92, 246, .55); }
.app .tile { width: 84px; height: 84px; border-radius: 24px; background: var(--grad); display: grid; place-items: center; color: #fff; font-size: 30px; font-weight: 500; letter-spacing: -.04em; box-shadow: 0 18px 36px -18px rgba(91, 92, 246, .8); }
.app .meta { display: flex; gap: 8px; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, .6); font: 500 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mut); }
.pill.live::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--grad); }
.app .go { margin-top: auto; display: flex; justify-content: space-between; align-items: center; color: var(--indigo); font-size: 14px; font-weight: 500; }
.app.idea { background: linear-gradient(140deg, rgba(139, 61, 255, .10), rgba(45, 140, 255, .10)); border: 1px dashed rgba(91, 92, 246, .35); }
.app.idea .tile { background: none; border: 1.5px dashed rgba(91, 92, 246, .5); color: var(--indigo); box-shadow: none; }

/* contact et pied de page */
.contact { min-height: 100vh; display: flex; flex-direction: column; justify-content: flex-end; padding: 16vh var(--pad) 40px; position: relative; z-index: 5; }
.contact h2 { font-size: clamp(36px, 4.2vw, 72px); max-width: 12ch; }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(24px, 5vw, 80px); align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-card { padding: clamp(22px, 3.4vw, 44px); }
.contact-card form { display: flex; flex-direction: column; gap: 18px; position: relative; }
.form-t { font-size: clamp(24px, 2.4vw, 32px); font-weight: 500; letter-spacing: -.02em; }
.fld { display: flex; flex-direction: column; gap: 8px; }
.fl { font-size: 14px; font-weight: 500; }
.fld small { font-size: 12.5px; line-height: 1.4; color: var(--mut); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 14px; }
.input { width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: rgba(255, 255, 255, .85); border: 1px solid var(--line); border-radius: 14px; padding: 13px 15px; transition: border-color .2s, box-shadow .2s; }
.input::placeholder { color: #9b98b3; }
.input:focus { outline: none; border-color: var(--indigo); box-shadow: 0 0 0 4px rgba(91, 92, 246, .15); }
.input[aria-invalid="true"] { border-color: #e5484d; }
textarea.input { resize: vertical; min-height: 120px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill-opt { font: 500 14px var(--f); height: 38px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, .7); color: var(--ink); cursor: pointer; white-space: nowrap; }
.pill-opt[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.q-rgpd { display: flex; gap: 12px; align-items: flex-start; text-align: left; background: none; border: 0; padding: 0; font: 400 14px/1.45 var(--f); color: var(--mut); cursor: pointer; }
.q-rgpd a { color: var(--indigo); }
.q-box { flex: none; width: 22px; height: 22px; border-radius: 7px; border: 1.5px solid rgba(91, 92, 246, .5); display: grid; place-items: center; font-size: 12px; color: #fff; }
.q-rgpd[aria-pressed="true"] .q-box { background: var(--grad); border-color: transparent; }
.err { color: #c9353a; font-size: 14px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.contact-card .btn { align-self: flex-start; border: 0; cursor: pointer; font: 500 15px var(--f); }
.contact-card .btn:disabled { opacity: .6; cursor: progress; }
.c-done { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.c-check { width: 96px; height: 96px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; font-size: 42px; }
button.btn { border: 0; cursor: pointer; font: 500 14px var(--f); }
button.btn.ghost { border: 1px solid var(--line); }

/* questions fréquentes */
.faq { padding-top: 10vh; }
.faq-list { display: grid; gap: 10px; max-width: 900px; }
.qa { padding: 0; }
.qa summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 20px 24px; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary h3 { font-size: 18px; }
.qa-i { flex: none; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; color: var(--indigo); transition: transform .3s; }
.qa[open] .qa-i { transform: rotate(45deg); }
.qa p { padding: 0 24px 22px; margin: 0; }

/* méthode en liste ordonnée */
ol.cards { list-style: none; padding: 0; }

/* bandeau « une idée d'appli ? » des pages d'appli */
.idea-band { margin-top: 56px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; background: linear-gradient(140deg, rgba(139, 61, 255, .12), rgba(45, 140, 255, .12)); }
.idea-band h2 { font-size: clamp(26px, 3vw, 40px); margin: 6px 0; }
.back a { color: inherit; text-decoration: none; } .back a:hover { color: var(--ink); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* lisibilité : voile dépoli couleur papier derrière les textes posés sur les particules, bords fondus */
.corner { isolation: isolate; }
.contact-intro, .apps-head > div, .apps-head > p { position: relative; isolation: isolate; }
.corner::before, .contact-intro::before, .apps-head > div::before, .apps-head > p::before {
  content: ''; position: absolute; inset: -22px -28px; z-index: -1; border-radius: 32px; pointer-events: none;
  background: radial-gradient(closest-side, rgba(247, 246, 251, .93) 55%, rgba(247, 246, 251, .7) 80%, rgba(247, 246, 251, 0));
}

/* contact : colonne de gauche comme sur dylanraffin.fr (carte projet, informations, Nova) */
.contact-side { display: flex; flex-direction: column; gap: 16px; }
.project-card { display: flex; flex-direction: column; justify-content: space-between; gap: 34px; padding: clamp(22px, 3vw, 34px); border-radius: 28px; background: var(--grad); color: #fff; text-decoration: none; box-shadow: 0 30px 60px -34px rgba(91, 92, 246, .9); transition: transform .3s cubic-bezier(.16, 1, .3, 1); }
.project-card:hover { transform: translateY(-3px); }
.project-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.project-t { font-size: clamp(30px, 3.4vw, 48px); font-weight: 500; letter-spacing: -.04em; line-height: .95; }
.project-go { flex: none; width: 52px; height: 52px; border-radius: 50%; background: #fff; color: var(--indigo); display: grid; place-items: center; font-size: 20px; }
.infos { display: flex; flex-direction: column; gap: 14px; }
.infos > div { display: flex; flex-direction: column; gap: 2px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.infos .k { margin: 0; }
.infos .btn { align-self: flex-start; }
.infos-note { font-size: 13px; color: var(--mut); line-height: 1.5; }

/* vignettes et visuel d'une appli */
.tile-img { object-fit: cover; padding: 0; background: #bfe3fb; }
.shot { margin: 48px 0 0; border-radius: 28px; overflow: hidden; box-shadow: 0 40px 80px -40px rgba(45, 30, 120, .45); border: 1px solid #fff; }
.shot img { display: block; width: 100%; height: auto; }

/* Nova : naissance depuis le bouton, mots qui apparaissent, points de réflexion */
.nova { transform-origin: calc(100% - 30px) calc(100% + 40px); }
.nova-orb.think { animation: novaPulse .9s ease-in-out infinite; }
.nova-b .w { animation: novaWord .35s ease both; }
@keyframes novaWord { from { opacity: 0; filter: blur(3px); } }
.dots { display: inline-flex; gap: 4px; padding: 4px 0; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--indigo); animation: novaDot 1s ease-in-out infinite; }
.dots i:nth-child(2) { animation-delay: .15s; } .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes novaDot { 0%, 80%, 100% { transform: translateY(0); opacity: .35; } 40% { transform: translateY(-5px); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .nova-b .w, .dots i, .nova-orb.think { animation: none; } }

/* image fixe du logo en particules : visible dès le premier affichage, effacée quand l'animation démarre
   (reste seule sans WebGL ou avec un rendu logiciel) */
.stage-still { position: fixed; z-index: 1; right: 0; top: 50%; transform: translateY(-50%); width: min(62vw, 900px); height: auto; pointer-events: none; transition: opacity .8s; }
.anim .stage-still { opacity: 0; }
@media (max-width: 760px) { .stage-still { top: 70px; transform: none; width: 100vw; right: -6vw; } }

/* Nova, l'assistante */
.nova-fab { position: fixed; right: clamp(14px, 2.4vw, 28px); bottom: clamp(14px, 2.4vw, 28px); z-index: 60; display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 18px 0 8px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .9); background: rgba(255, 255, 255, .8); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 18px 40px -18px rgba(91, 92, 246, .6); font: 500 14px var(--f); color: var(--ink); cursor: pointer; }
.nova-fab[aria-busy="true"] .nova-orb { animation: novaPulse 1s ease-in-out infinite; }
.nova-orb { width: 36px; height: 36px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff 0 8%, transparent 30%), conic-gradient(from 200deg, var(--violet), var(--indigo), var(--blue), var(--violet)); box-shadow: 0 0 18px rgba(139, 61, 255, .45); flex: none; }
@keyframes novaPulse { 50% { transform: scale(.86); } }
.nova { position: fixed; right: clamp(10px, 2.4vw, 28px); bottom: calc(clamp(14px, 2.4vw, 28px) + 64px); z-index: 61; width: min(400px, calc(100vw - 20px)); height: min(560px, calc(100vh - 120px)); display: flex; flex-direction: column; border-radius: 24px; background: rgba(255, 255, 255, .92); backdrop-filter: blur(20px) saturate(1.2); -webkit-backdrop-filter: blur(20px) saturate(1.2); border: 1px solid #fff; box-shadow: 0 40px 80px -30px rgba(45, 30, 120, .45); overflow: hidden; }
.nova[hidden] { display: none; }
.nova-h { display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 16px; border-bottom: 1px solid var(--line); }
.nova-h span:nth-child(2) { display: flex; flex-direction: column; line-height: 1.2; flex: 1; }
.nova-h small { color: var(--mut); font-size: 12px; }
.nova-x { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: none; font-size: 20px; cursor: pointer; color: var(--ink); }
.nova-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.nova-b { max-width: 86%; padding: 10px 14px; border-radius: 18px; font-size: 15px; line-height: 1.45; }
.nova-b.bot { background: var(--paper2); align-self: flex-start; border-bottom-left-radius: 6px; }
.nova-b.me { background: var(--grad); color: #fff; align-self: flex-end; border-bottom-right-radius: 6px; }
.nova-b.wait { color: var(--mut); }
.nova-b.err { background: #fdecec; color: #9b2c2c; }
.nova-sug { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 10px; }
.nova-sug[hidden] { display: none; }
.nova-sug button { font: 500 13px var(--f); padding: 7px 12px; border-radius: 999px; border: 1px solid rgba(91, 92, 246, .35); background: #fff; color: var(--indigo); cursor: pointer; }
.nova-f { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); }
.nova-f input { flex: 1; font: 400 16px var(--f); border: 1px solid var(--line); border-radius: 999px; padding: 10px 16px; color: var(--ink); background: #fff; }
.nova-f input:focus { outline: none; border-color: var(--indigo); }
.nova-f button { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--grad); color: #fff; font-size: 18px; cursor: pointer; }
.nova-note { font-size: 11.5px; line-height: 1.4; color: var(--mut); padding: 0 14px 12px; }
.nova-note a { color: var(--indigo); }
@media (max-width: 760px) { .nova-fab-t { display: none; } .nova-fab { padding: 0 8px; } }
.foot { margin-top: 12vh; padding-top: 22px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; color: var(--mut); }
.foot img { height: 22px; width: auto; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; }
.foot-links a { text-decoration: none; color: var(--mut); } .foot-links a:hover { color: var(--ink); }
/* pages légales */
.legal { margin-top: 40px; display: grid; gap: 28px; max-width: 760px; }
.legal h2 { font-size: 22px; letter-spacing: -.02em; margin-bottom: 8px; }
.legal p { color: var(--mut); margin-top: 6px; }
.legal a { color: var(--indigo); }

/* page d'une appli */
.app-page { position: relative; z-index: 5; padding: 150px var(--pad) 60px; max-width: 1200px; margin: 0 auto; }
.app-hero { display: grid; grid-template-columns: auto 1fr; gap: clamp(24px, 4vw, 56px); align-items: center; }
.app-hero .tile { width: clamp(110px, 14vw, 168px); height: clamp(110px, 14vw, 168px); border-radius: 32%; font-size: clamp(40px, 5vw, 64px); }
@media (max-width: 640px) { .app-hero { grid-template-columns: 1fr; } }
.app-body { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 16px; margin-top: 56px; }
.app-body ul { padding-left: 18px; color: var(--mut); }
.back { display: inline-flex; gap: 8px; align-items: center; color: var(--mut); text-decoration: none; margin-bottom: 40px; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } [data-in] { transition: none; opacity: 1; transform: none; } .scroll-hint i { animation: none; } }
