/* caht — pages publiques : accueil, connexion, pages légales (complète base.css). Mise en page sobre, façon Apple. */
.wrap { max-width: 980px; margin: 0 auto; padding: 0 22px; }
body.home, body.legal-page { background: var(--panel); }

/* ------------------------------------------------------------------ barre de navigation (translucide, collante) */
.nav { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--panel) 80%, transparent);
       -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
       border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.nav-in { display: flex; align-items: center; gap: 22px; height: 52px; }
.logo { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 20px;
        letter-spacing: -.02em; }
.logo .cat { width: 34px; }
.nav .links { display: flex; gap: 24px; margin-left: auto; align-items: center; }
.nav .links a { color: var(--ink-2); text-decoration: none; font-size: 13.5px; letter-spacing: -.01em; }
.nav .links a:hover { color: var(--ink); }
.nav .links a.btn { color: #fff; height: 30px; padding: 0 14px; font-size: 13.5px; }

/* ------------------------------------------------------------------ héros */
.hero { text-align: center; padding: 84px 0 0; overflow: hidden; }
.hero h1 { font-family: var(--display); font-size: clamp(40px, 7.4vw, 80px); line-height: 1.05; letter-spacing: -.015em;
           font-weight: 700; margin: 0 auto 18px; max-width: 11em; text-wrap: balance; }
.hero .sub { font-size: clamp(19px, 2.2vw, 24px); line-height: 1.38; letter-spacing: .005em; color: var(--muted); max-width: 40ch;
             margin: 0 auto 30px; text-wrap: balance; font-weight: 400; }
.hero .cta { display: flex; gap: 28px; justify-content: center; align-items: center; flex-wrap: wrap; }
.link-more { color: var(--link); text-decoration: none; font-size: 17px; }
.link-more:hover { text-decoration: underline; }

/* démonstration : la fenêtre de question, avec le chat perché dessus (comme sur le logo) */
.demo-wrap { max-width: 720px; }
.demo { position: relative; padding-top: 92px; margin-top: 30px; text-align: left; }
.demo-cat { position: absolute; top: 0; right: 64px; width: 138px; height: 96px; overflow: hidden; }
.demo-cat .cat { width: 138px; position: absolute; bottom: -12px; }
.demo-cat .c-base { display: none; }
.demo-card { position: relative; background: var(--panel); border-radius: var(--r-xl) var(--r-xl) 0 0; border: 1px solid var(--line);
             border-bottom: 0; padding: 22px 22px 34px; box-shadow: 0 -2px 40px rgba(0, 0, 0, .06); }
.demo-q { display: flex; align-items: center; gap: 12px; background: var(--panel-2); border-radius: 22px; padding: 10px 10px 10px 18px; min-height: 60px; }
.demo-q .typed { flex: 1; font-size: 17px; min-height: 26px; }
.demo-q .typed::after { content: ""; display: inline-block; width: 2px; height: 1.1em; background: var(--accent); vertical-align: -3px; margin-left: 2px;
                        animation: caret 1s steps(1) infinite; }
.demo-q.sent .typed::after { display: none; }
@keyframes caret { 50% { opacity: 0; } }
.demo-q .go { width: 38px; height: 38px; border-radius: 50%; background: var(--accent); flex: none; display: flex; align-items: center;
              justify-content: center; color: #fff; }
.demo-step { font-size: 15px; color: var(--muted); margin: 16px 6px 0; min-height: 22px; }
.demo-a { margin: 8px 6px 0; color: var(--ink-2); opacity: 0; transform: translateY(8px); transition: opacity .6s, transform .6s; }
.demo-a.on { opacity: 1; transform: none; }
.demo-a p { margin: 0 0 14px; }
.demo-a b { color: var(--ink); font-weight: 600; }
blockquote { font-family: var(--serif); font-size: 1.06em; line-height: 1.5; letter-spacing: 0; color: var(--ink); margin: 0 0 14px;
             padding-left: 16px; border-left: 2px solid var(--line); }
sup { font-size: .62em; color: var(--link); font-family: var(--sans); }
.demo-a .note { font-size: 14px; color: var(--muted); letter-spacing: -.01em; }

/* ------------------------------------------------------------------ sections */
.band { background: var(--bg); }
.hero + .band { border-top: 1px solid var(--line); }
section h2 { text-wrap: balance; font-family: var(--display); font-size: clamp(32px, 4.6vw, 48px); line-height: 1.08; letter-spacing: -.005em; font-weight: 700;
             margin: 0 0 14px; max-width: 18ch; }
.lede { font-size: clamp(18px, 1.9vw, 21px); line-height: 1.42; color: var(--muted); max-width: 46ch; margin: 0 0 44px; }
.asks-band, .story, .free, .method, #questions { padding: 96px 0; }

/* exemples : une rangée qui défile horizontalement */
.asks { display: grid; grid-auto-flow: column; grid-auto-columns: min(420px, 82vw); gap: 18px; overflow-x: auto;
        scroll-snap-type: x mandatory; padding: 4px max(22px, calc((100vw - 980px) / 2 + 22px)) 18px; scrollbar-width: none; }
.asks::-webkit-scrollbar { display: none; }
.ask { scroll-snap-align: start; background: var(--panel); border-radius: var(--r-lg); padding: 26px 26px 22px; display: flex; flex-direction: column; }
.ask .q { margin: 0 0 16px; font-size: 21px; line-height: 1.3; font-weight: 600; color: var(--ink); letter-spacing: -.015em; }
.ask .a { margin: 0 0 18px; color: var(--ink-2); flex: 1; font-size: 16px; line-height: 1.5; }
.ask .ref { margin: 0; font-size: 13.5px; color: var(--muted); padding-top: 14px; border-top: 1px solid var(--line); }

/* comment caht répond : étapes à gauche, page qui change à droite */
.story-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: 64px; }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.step { counter-increment: s; padding: 0 0 0 46px; position: relative; min-height: 46vh; display: flex; flex-direction: column;
        justify-content: center; color: var(--muted); transition: color .3s; }
.step::before { content: counter(s); position: absolute; left: 0; top: 50%; translate: 0 -50%; width: 30px; height: 30px; border-radius: 50%;
                border: 1.5px solid var(--line); display: flex; align-items: center; justify-content: center; font-size: 14px;
                font-weight: 600; color: var(--muted); transition: all .3s; margin-top: -24px; }
.step.on { color: var(--ink-2); }
.step.on::before { background: var(--ink); border-color: var(--ink); color: var(--panel); }
.step h3 { margin: 0 0 8px; font-size: 24px; letter-spacing: -.015em; line-height: 1.2; color: inherit; }
.step.on h3 { color: var(--ink); }
.step p { margin: 0; max-width: 36ch; }
.stage { position: relative; }
.stage .page { position: sticky; top: calc(50vh - 190px); }
.page { background: var(--panel-2); border-radius: var(--r-lg); padding: 30px 30px 28px; min-height: 340px; transition: opacity .16s, transform .16s; }
.page.turn { opacity: 0; transform: translateY(6px); }
.pg-label { margin: 0 0 18px; font-size: 14px; font-weight: 600; color: var(--muted); }
.pg-q { font-size: 26px; line-height: 1.25; font-weight: 600; letter-spacing: -.02em; margin: 0 0 22px; }
.pg-tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; }
.pg-tags li { background: var(--panel); border-radius: 980px; padding: 6px 14px; font-size: 14.5px; color: var(--ink-2); }
.pg-ar { font-family: var(--quran); font-size: 30px; line-height: 2; margin: 0 0 12px; text-align: right; color: var(--ink); letter-spacing: 0; }
.page blockquote { font-size: 21px; border: 0; padding: 0; margin: 0 0 16px; }
.pg-ref { margin: 0; font-size: 15px; color: var(--muted); }
.pg-grade { margin: 18px 0 0; display: inline-block; font-size: 14px; color: var(--ok); background: var(--ok-soft); border-radius: 980px; padding: 5px 12px; }
.pg-p { margin: 0 0 14px; font-size: 18px; line-height: 1.5; color: var(--ink-2); }
.pg-p b { color: var(--ink); }
.pg-hint { margin: 18px 0 0; font-size: 14px; color: var(--muted); }
.m-only { display: none; }

/* gratuit */
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.fact .big { font-size: 22px; line-height: 1.25; font-weight: 600; letter-spacing: -.015em; margin: 0 0 10px; color: var(--ink); }
.fact p { margin: 0; color: var(--ink-2); font-size: 16px; line-height: 1.5; }

/* méthode */
.principles { display: grid; grid-template-columns: 1fr 1fr; gap: 44px 64px; margin-top: 40px; }
.principles h3 { margin: 0 0 8px; font-size: 21px; letter-spacing: -.015em; }
.principles p { margin: 0; color: var(--ink-2); font-size: 16.5px; line-height: 1.5; }

/* questions fréquentes */
.faq { max-width: 760px; }
.faq h2 { margin-bottom: 30px; }
.faq details { border-top: 1px solid var(--line); padding: 20px 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 600; font-size: 19px; list-style: none; display: flex; justify-content: space-between; gap: 16px;
               letter-spacing: -.015em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; width: 10px; height: 10px; flex: none; margin-top: 6px; border-right: 2px solid var(--muted);
                      border-bottom: 2px solid var(--muted); rotate: 45deg; transition: rotate .2s; }
.faq details[open] summary::after { rotate: 225deg; margin-top: 11px; }
.faq p { color: var(--ink-2); margin: 12px 0 0; font-size: 16.5px; line-height: 1.5; max-width: 62ch; }

.final { text-align: center; padding: 110px 0 120px; }
.final-cat .cat { width: 110px; margin: 0 auto 22px; }
.final h2 { margin: 0 auto 28px; max-width: 16ch; }

footer { background: var(--bg); border-top: 1px solid var(--line); padding: 22px 0 34px; color: var(--muted); font-size: 12.5px; letter-spacing: -.01em; }
footer .wrap { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; }
footer nav { display: flex; gap: 18px; flex-wrap: wrap; margin-left: auto; }
footer a { color: var(--ink-2); text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* ------------------------------------------------------------------ connexion */
.auth-page { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: var(--bg); }
.auth-main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 28px 16px 64px; }
.auth { position: relative; width: min(420px, 100%); padding-top: 76px; }
.auth .perch { position: absolute; top: 0; right: 40px; width: 120px; height: 84px; overflow: hidden; }
.auth .perch .cat { width: 120px; position: absolute; bottom: -11px; }
.auth .perch .c-base { display: none; }
.card { background: var(--panel); border-radius: var(--r-lg); padding: 32px 28px 28px; }
.card h1 { font-family: var(--display); font-size: 28px; letter-spacing: -.01em; margin: 0 0 6px; text-align: center; }
.card .intro { color: var(--muted); text-align: center; margin: 0 0 24px; font-size: 16px; }
.tabs { display: flex; background: var(--panel-2); border-radius: 10px; padding: 3px; margin-bottom: 22px; }
.tabs button { flex: 1; border: 0; background: none; border-radius: 8px; height: 34px; color: var(--ink-2); font-size: 14px; }
.tabs button.on { background: var(--panel); color: var(--ink); box-shadow: 0 1px 4px rgba(0, 0, 0, .12); font-weight: 600; }
.google { width: 100%; height: 46px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); display: flex;
          align-items: center; justify-content: center; gap: 10px; font-weight: 500; font-size: 16px; }
.google:hover { background: var(--panel-2); }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; margin: 18px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13.5px; color: var(--ink-2); }
.field input { height: 46px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); padding: 0 14px; font-size: 17px; }
.field input:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-2); margin: 4px 0 18px; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.card .btn { border-radius: 12px; }
.form-msg { font-size: 14px; border-radius: 10px; padding: 10px 12px; margin: 0 0 14px; }
.form-msg.err { background: var(--danger-soft); color: var(--danger); }
.form-msg.ok { background: var(--ok-soft); color: var(--ok); }
.below { text-align: center; margin: 16px 0 0; font-size: 14px; }
.below button { border: 0; background: none; color: var(--link); padding: 0; }
.legal-mini { text-align: center; color: var(--muted); font-size: 12.5px; margin-top: 18px; }
.legal-mini a { color: var(--muted); }
.legal-mini a + a { margin-left: 18px; }

/* ------------------------------------------------------------------ pages légales */
.legal { max-width: 720px; margin: 0 auto; padding: 40px 22px 90px; }
.legal h1 { font-family: var(--display); font-size: 40px; letter-spacing: -.01em; margin: 10px 0 6px; line-height: 1.1; }
.legal .updated { color: var(--muted); margin: 0 0 34px; font-size: 15px; }
.legal h2 { font-size: 21px; margin: 36px 0 10px; letter-spacing: -.015em; }
.legal p, .legal li { color: var(--ink-2); font-size: 16.5px; line-height: 1.55; }

/* ------------------------------------------------------------------ tailles d'écran */
@media (max-width: 860px) {
  .story-grid { display: block; }
  .stage { display: none; }
  .m-only { display: block; }
  .step { min-height: 0; padding: 0 0 44px; color: var(--ink-2); }
  .step::before { position: static; translate: none; margin: 0 0 12px; }
  .step h3 { color: var(--ink); }
  .step .page { margin-top: 18px; min-height: 0; }
  .facts { grid-template-columns: 1fr; gap: 30px; }
  .principles { grid-template-columns: 1fr; gap: 30px; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .nav .links { gap: 16px; }
  .nav .links .hide-m { display: none; }
  .hero { padding-top: 56px; }
  .hero .cta { flex-direction: column; gap: 16px; }
  .demo { padding-top: 74px; }
  .demo-cat { right: 30px; width: 108px; height: 76px; }
  .demo-cat .cat { width: 108px; bottom: -9px; }
  .demo-card { padding: 16px 16px 28px; border-radius: var(--r-lg) var(--r-lg) 0 0; }
  .asks-band, .story, .free, .method, #questions { padding: 64px 0; }
  .asks { padding-left: 16px; padding-right: 16px; }
  .page { padding: 22px; }
  .pg-q { font-size: 22px; }
  .page blockquote { font-size: 19px; }
  .card { padding: 26px 20px 22px; }
  footer nav { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .page, .step, .step::before, .demo-a { transition: none; }
}

/* ------------------------------------------------------------------ questions d'inscription */
.wide-auth { width: min(520px, 100%); }
.field select { height: 46px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); padding: 0 12px; font-size: 16px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.checks { border: 0; padding: 0; margin: 0 0 14px; }
.checks legend { font-size: 13.5px; color: var(--ink-2); margin-bottom: 6px; padding: 0; }
.checks label { display: flex; gap: 10px; align-items: center; font-size: 15px; padding: 5px 0; }
.checks input { width: 18px; height: 18px; accent-color: var(--accent); }
.opt { color: var(--muted); font-weight: 400; }
@media (max-width: 520px) { .row2 { grid-template-columns: 1fr; gap: 0; } }
/* v3 : petits écrans (320 px) — aucun champ ne dépasse */
.field input, .field select, .card input, .card select { width: 100%; min-width: 0; box-sizing: border-box; }
.card { max-width: 100%; box-sizing: border-box; }
@media (max-width: 360px) { .card { padding-left: 16px; padding-right: 16px; } .field input { font-size: 16px; } }
