/* FiscalBot CI — page de présentation
   Direction « le produit fait la démonstration » : des fragments de l'interface,
   vrais et à taille réelle, posés sur un fond neutre. */

:root {
  --bg: #F0F2F5;
  --surface: #FFFFFF;
  --raised: #F6F7F9;
  --field: #E2E5EA;
  --field-2: #C9CED8;
  --line: #E3E6EA;
  --rule: #EEF0F3;
  --control: #D1D5DB;
  --ink: #1A1A2E;
  --muted: #5F6368;
  --accent: #F06800;       /* orange du logo : les actions, texte à l'encre dessus */
  --accent-dark: #D95E00;
  --green: #0F4A22;        /* vert du logo : la marque et les données */

  --s-sm: 13px;
  --s-body: 16px;
  --s-h: 26px;
  --s-xl: 36px;

  --m: clamp(20px, 5vw, 72px);
  --gap-section: clamp(120px, 16vh, 200px);
  --r: 6px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 var(--s-body)/1.55 'Inter', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
::selection { background: #CFE3D5; color: var(--ink); }
input, textarea { caret-color: var(--accent); }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Barre du haut ---------- */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 24px var(--m);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; text-decoration: none; }
.brand img { border-radius: var(--r); display: block; }
.top-links { display: flex; align-items: center; gap: 28px; }
.top-links a { text-decoration: none; }
.top-links a:hover { text-decoration: underline; text-underline-offset: 4px; }
.top-signin { font-weight: 600; }

/* ---------- Boutons et liens ---------- */
.btn {
  display: inline-flex; align-items: center; height: 48px; padding: 0 22px;
  background: var(--accent); color: var(--ink); border-radius: var(--r);
  font-weight: 600; text-decoration: none;
  transition: background .15s, transform .1s;
}
.btn:hover { background: var(--accent-dark); }
.btn:active { transform: translateY(1px); }
.link-arrow { font-weight: 600; text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.link-arrow span { transition: transform .2s var(--ease); }
.link-arrow:hover span { transform: translateX(4px); }
.link-arrow:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Ouverture ---------- */
.hero {
  display: grid; grid-template-columns: 5fr 7fr; align-items: center;
  gap: clamp(32px, 5vw, 96px);
  padding: clamp(40px, 9vh, 112px) var(--m) 0;
}
.hero h1 { font-size: var(--s-xl); font-weight: 600; line-height: 1.15; letter-spacing: -0.02em; max-width: 14em; }
.lead { margin-top: 20px; max-width: 34em; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 28px; }

/* Fragment : la conversation */
.chat {
  justify-self: end; width: 100%; max-width: 660px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
}
.chat-head { display: flex; align-items: center; gap: 10px; padding: 14px 20px; border-bottom: 1px solid var(--rule); } /* taste-skill-ignore: filet d'interface dans un fragment data-ui */
.chat-head img { border-radius: 50%; }
.chat-stage { display: grid; padding: 20px 20px 8px; }
.qa { grid-area: 1 / 1; opacity: 0; transition: opacity 1.6s ease; display: flex; flex-direction: column; }
.qa.is-on { opacity: 1; }
html:not(.js) .chat-stage { display: block; }
html:not(.js) .qa { opacity: 1; margin-bottom: 24px; }
.q {
  align-self: flex-end; max-width: 80%;
  background: var(--field); padding: 10px 14px; border-radius: 12px 12px 4px 12px;
}
.a {
  margin-top: 14px; max-width: 94%;
  border: 1px solid var(--line); padding: 14px 16px; border-radius: 12px 12px 12px 4px;
}
.src { margin-top: 10px; font-size: var(--s-sm); color: var(--muted); }
.chip {
  display: inline-block; white-space: nowrap; margin: 2px 2px 0 4px;
  background: var(--raised); border: 1px solid var(--line); border-radius: 4px;
  padding: 1px 8px; font-size: var(--s-sm); color: var(--ink);
}
.chat-picks { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 20px 16px; }
.pick {
  font: inherit; font-size: var(--s-sm); color: var(--ink); cursor: pointer;
  background: var(--surface); border: 1px solid var(--control); border-radius: var(--r);
  padding: 6px 12px; transition: border-color .15s, background .15s;
}
.pick:hover { border-color: var(--ink); }
.pick.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }
.chat-input {
  margin: 0 20px 20px; padding: 12px 14px; color: var(--muted);
  border: 1px solid var(--control); border-radius: var(--r);
}

/* ---------- Calcul en direct ---------- */
.calc { padding: var(--gap-section) var(--m) 0; }
.calc-intro { max-width: 640px; }
.calc h2, .features > h2, .letter h2 { font-size: var(--s-h); font-weight: 600; letter-spacing: -0.01em; }
.calc-intro p { margin-top: 12px; }
.calc-panel {
  margin-top: 40px; display: grid; grid-template-columns: 62fr 38fr;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
}
.calc-out { padding: 32px; display: flex; flex-direction: column; gap: 16px; }
.out-label { color: var(--muted); }
.out-total { font-size: var(--s-xl); font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.unit { font-size: var(--s-body); color: var(--muted); font-weight: 500; }
.finding { padding: 10px 14px; background: #E7F0EA; color: var(--green); border-radius: var(--r); font-weight: 500; }
.calc-steps { margin: 0; }
.calc-steps div { display: flex; justify-content: space-between; gap: 24px; padding: 12px 0; border-top: 1px solid var(--rule); } /* taste-skill-ignore: filet d'interface dans un fragment data-ui */
.calc-steps dt { min-width: 0; }
.calc-steps dd { margin: 0; font-variant-numeric: tabular-nums; white-space: nowrap; }
.calc-steps .strong { font-weight: 600; }
.ref { display: block; font-size: var(--s-sm); color: var(--muted); font-weight: 400; }
.calc-out .link-arrow { margin-top: auto; padding-top: 8px; }
.calc-ctl { background: var(--raised); border-left: 1px solid var(--line); padding: 28px; margin: 0; } /* taste-skill-ignore: filet d'interface dans un fragment data-ui */
.ctl { border: 0; margin: 0 0 26px; padding: 0; display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; align-items: baseline; }
.ctl label, .ctl legend, .ctl-name { font-weight: 600; }
.ctl legend { margin-bottom: 8px; padding: 0; }
.ctl output { font-variant-numeric: tabular-nums; }
.ctl input[type=range] { grid-column: 1 / -1; width: 100%; accent-color: var(--green); height: 28px; cursor: pointer; }
.seg, .presets { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.seg label {
  font-weight: 400; display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--control); border-radius: var(--r); padding: 8px 12px;
}
.seg label:has(input:checked) { border-color: var(--ink); }
.seg input { accent-color: var(--ink); margin: 0; }
.presets button {
  font: inherit; color: var(--ink); cursor: pointer;
  background: var(--surface); border: 1px solid var(--control); border-radius: var(--r); padding: 8px 12px;
  transition: border-color .15s, transform .1s;
}
.presets button:hover { border-color: var(--ink); }
.presets button:active { transform: translateY(1px); }
.calc-note { margin-top: 16px; font-size: var(--s-sm); color: var(--muted); }

/* ---------- Ce que fait FiscalBot ---------- */
.features { padding: var(--gap-section) var(--m) 0; }
.feat {
  display: grid; grid-template-columns: 5fr 7fr; gap: clamp(32px, 5vw, 96px);
  align-items: start; margin-top: clamp(56px, 9vh, 112px);
}
.feat-text h3 { font-size: var(--s-body); font-weight: 600; }
.feat-text p { margin-top: 8px; max-width: 30em; }
.feat-ui { padding-top: 4px; }
.mini-answer, .due-list, .doc-table, .fav {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
}
.mini-answer { padding: 16px 18px; max-width: 520px; }
.due-list { list-style: none; margin: 0; padding: 4px 0; }
.due-list li { display: flex; justify-content: space-between; gap: 24px; padding: 12px 18px; }
.due-list li + li { border-top: 1px solid var(--rule); } /* taste-skill-ignore: filet d'interface dans un fragment data-ui */
.due-date { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.doc-table { width: 100%; border-collapse: separate; border-spacing: 0; overflow: hidden; }
.doc-table th { text-align: left; font-size: var(--s-sm); font-weight: 500; color: var(--muted); padding: 12px 16px; }
.doc-table td { padding: 12px 16px; border-top: 1px solid var(--rule); }
.doc-table td:nth-child(2) { color: var(--muted); }
.pill { display: inline-block; white-space: nowrap; background: #DCFAE5; color: #04250E; border-radius: 4px; padding: 1px 8px; font-size: var(--s-sm); font-weight: 500; }
.fav { padding: 16px 18px; max-width: 460px; }
.fav-q { font-weight: 600; }
.fav-tags { margin: 8px 0 0 -4px; }
.fav-actions { display: flex; gap: 8px; margin-top: 14px; }
.ui-btn { font-size: var(--s-sm); border: 1px solid var(--control); border-radius: var(--r); padding: 6px 12px; }

/* ---------- Une question, du début à la fin ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); margin: var(--gap-section) var(--m) 0; border-radius: var(--r); overflow: hidden; }
.field { position: relative; min-height: 84svh; padding: 28px; display: flex; flex-direction: column; }
.f1 { background: var(--field); }
.f2 { background: var(--field-2); }
.f3 { background: var(--green); color: #fff; }
.f4 { background: var(--ink); color: #fff; }
.field h2 { font-size: var(--s-h); font-weight: 700; line-height: 1.2; max-width: 11em; }
.field .card {
  position: absolute; top: 38%; left: 50%; width: min(260px, calc(100% - 40px));
  transform: translateX(-50%); transition: transform .15s ease;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 14px;
}
.field:hover .card { transform: translate(-50%, -6px); }
.card-q { font-weight: 600; }
.card-meta { margin-top: 8px; font-size: var(--s-sm); color: var(--muted); }
.card-line { margin-top: 8px; font-size: var(--s-sm); }
.card-line .chip { margin-left: 0; }
.clause { margin-top: auto; font-size: var(--s-h); line-height: 1.2; font-weight: 500; max-width: 10em; }

/* ---------- Lettre ---------- */
.letter { padding: var(--gap-section) var(--m); display: grid; justify-items: center; }
.letter h2 { width: min(100%, 560px); }
.letter-body { width: min(100%, 560px); margin-top: 28px; display: grid; gap: 20px; }
.portrait {
  width: 44px; height: 44px; border-radius: 50%; background: var(--field);
  display: grid; place-items: center; font-weight: 600; font-size: var(--s-sm);
}
.sign { font-size: var(--s-h); font-weight: 600; margin-top: 8px; }
.sign span { display: block; font-weight: 400; font-size: var(--s-body); color: var(--muted); margin-top: 4px; }

/* ---------- Questions fréquentes ---------- */
.faq {
  display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px;
  padding: 0 var(--m) var(--gap-section);
}
.faq-list { grid-column: 1 / 6; list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; align-content: start; }
.faq-head h2 { font-size: var(--s-body); font-weight: 600; color: var(--muted); }
.faq-q {
  font: inherit; color: var(--muted); background: none; border: 0; padding: 0 0 0 20px;
  text-align: left; cursor: pointer; position: relative; transition: color .15s;
}
.faq-q::before {
  content: ''; position: absolute; left: 0; top: .55em; width: 8px; height: 8px; border-radius: 50%;
  background: var(--control); transition: background .15s;
}
.faq-item.is-on .faq-q { color: var(--ink); }
.faq-item.is-on .faq-q::before { background: var(--green); }
.faq-q:hover { color: var(--ink); }
.faq-a { margin: 10px 0 0 20px; }
.js .faq-a { display: none; }
.faq-pane { grid-column: 7 / 13; position: sticky; top: 120px; align-self: start; }
.faq-pane p { font-size: var(--s-h); line-height: 1.3; max-width: 30ch; transition: opacity .15s; }
html:not(.js) .faq-pane { display: none; }

/* ---------- Inscription ---------- */
.cta { padding: 0 var(--m) var(--gap-section); text-align: center; }
.cta-sentence { font-size: var(--s-xl); font-weight: 500; line-height: 1.5; letter-spacing: -0.01em; }
.cta-sentence input, .cta-sentence button {
  font: inherit; height: 1.3em; vertical-align: baseline; border-radius: var(--r); border: 0;
}
.cta-sentence input {
  width: 9.5em; padding: 0 .3em; background: var(--field); color: var(--ink);
}
.cta-sentence input::placeholder { color: var(--muted); }
.cta-sentence button {
  padding: 0 .35em; background: var(--accent); color: var(--ink); cursor: pointer; transition: background .15s;
}
.cta-sentence button:hover { background: var(--accent-dark); }
.cta-note { margin-top: 16px; color: var(--muted); }

/* ---------- Pied de page en tuiles ---------- */
.tiles {
  display: grid; grid-template-columns: repeat(12, 1fr); gap: 8px; padding: 0 var(--m) var(--m);
  grid-template-rows: 220px 320px;
}
.tile { background: var(--surface); border-radius: var(--r); padding: 24px; display: flex; flex-direction: column; }
.t-statement { grid-column: 1 / 5; justify-content: space-between; }
.t-nav { grid-column: 5 / 8; gap: 8px; }
.t-nav a { text-decoration: none; }
.t-nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.t-time { grid-column: 8 / 10; justify-content: space-between; }
.t-mail { grid-column: 10 / 13; justify-content: space-between; }
.t-mail a { text-decoration: none; overflow-wrap: anywhere; }
.t-mail a:hover { text-decoration: underline; }
.t-big { font-size: var(--s-h); font-weight: 600; line-height: 1.2; }
.t-small { font-size: var(--s-sm); color: var(--muted); }
.t-time .t-small, .t-statement .t-small { margin-top: 12px; }
.t-word {
  grid-column: 1 / 9; background: var(--ink); color: #fff; align-items: center; justify-content: center;
  font-size: clamp(64px, 9vw, 168px); font-weight: 700; letter-spacing: -0.04em; line-height: 1;
}
.t-go {
  grid-column: 9 / 13; background: var(--accent); color: var(--ink); text-decoration: none;
  justify-content: space-between; transition: background .15s;
}
.t-go svg { align-self: flex-end; transition: transform .25s var(--ease); }
.t-go:hover { background: var(--accent-dark); }
.t-go:hover svg { transform: translate(4px, -4px); }

/* ---------- Apparitions ---------- */
.js .rv { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s var(--ease); transition-delay: calc(var(--d, 0) * 80ms); }
.js .rv.in { opacity: 1; transform: none; }

/* ---------- Tablette et téléphone ---------- */
@media (max-width: 1000px) {
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .chat { justify-self: stretch; max-width: none; }
  .calc-panel { grid-template-columns: 1fr; }
  .calc-ctl { border-left: 0; border-top: 1px solid var(--line); order: -1; } /* taste-skill-ignore: filet d'interface dans un fragment data-ui */
  .feat { grid-template-columns: 1fr; gap: 20px; }
  .steps { grid-template-columns: 1fr; }
  .field { min-height: 64svh; }
  .faq-list { grid-column: 1 / -1; }
  .faq-pane { display: none; }
  .js .faq-item.is-on .faq-a { display: block; }
  .tiles { grid-template-columns: 1fr 1fr; grid-template-rows: none; gap: 6px; }
  .t-word { grid-column: 1 / -1; order: -2; min-height: 160px; }
  .t-go { grid-column: 1 / -1; order: -1; min-height: 160px; }
  .t-nav, .t-mail, .t-time, .t-statement { grid-column: span 1; min-height: 180px; }
}
@media (max-width: 640px) {
  :root { --s-h: 24px; --s-xl: 28px; }
  .top-links a:not(.top-signin) { display: none; }
  .hero h1 { font-size: 28px; }
  .steps { grid-template-columns: 1fr; }
  .field { padding: 28px 20px; min-height: 0; }
  .field .card { position: static; transform: none; width: auto; max-width: 300px; margin: 32px 0 24px; }
  .field:hover .card { transform: none; }
  .clause { margin-top: 0; order: -1; }
  .field h2 { margin-bottom: 12px; order: -2; }
  .cta-sentence { font-size: 26px; }
  .cta-sentence input { display: block; width: 100%; margin: 6px 0; }
  .calc-out, .calc-ctl { padding: 20px; }
  .out-total { font-size: 28px; }
  .tiles { grid-template-columns: 1fr; }
  .t-nav, .t-mail, .t-time, .t-statement { grid-column: 1 / -1; min-height: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .rv { opacity: 1; transform: none; transition: none; }
  .qa { transition: none; }
  .field .card, .t-go svg, .link-arrow span { transition: none; }
}
