/* Ayiti Law — page d'accueil publique (styles propres à cette page ; le reste est dans theme.css). */

/* ── En-tête ─────────────────────────────────────────────── */
.top {
  position: sticky; top: 0; z-index: 40;
  background: var(--header-bg); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-top: 5px double var(--ink); border-bottom: 1px solid var(--line);
}
.top.is-scrolled { border-bottom-color: var(--rule); }
.top__row { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 68px; }

.nav { display: none; }
.nav.is-open {
  display: flex; flex-direction: column; position: absolute; left: 0; right: 0; top: 100%;
  padding: 12px 20px 20px; background: var(--page); border-bottom: 1px solid var(--rule);
}
.nav__link { padding: 11px 0; color: var(--ink2); font-size: 16px; }
.nav__link:hover { color: var(--ink); }
.nav__actions { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }

.top__tools { display: flex; align-items: center; gap: 8px; }
.nav-toggle { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); cursor: pointer; }

@media (min-width: 1000px) {
  .nav { display: flex; align-items: center; gap: 26px; margin-left: auto; }
  .nav__link { padding: 0; font-size: 15px; }
  .nav__actions { flex-direction: row; align-items: center; gap: 8px; margin: 0 0 0 4px; }
  .nav-toggle { display: none; }
  .theme-toggle__label { display: inline; }
  .top__tools { margin-left: 16px; }
}

/* ── Titres ──────────────────────────────────────────────── */
.h2 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(2rem, 1.3rem + 2.6vw, 3.25rem); line-height: 1.07; letter-spacing: -.02em;
}
.h2--wide { max-width: 16em; }

/* ── Héros ───────────────────────────────────────────────── */
.hero { padding: 52px 0 40px; }
.hero__grid { display: grid; gap: 44px; align-items: center; }
.hero h1 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(2.5rem, 1.2rem + 4.6vw, 4.5rem); line-height: 1.03; letter-spacing: -.025em;
}
.lead { font-size: 1.15rem; line-height: 1.6; color: var(--lead); margin: 24px 0 32px; max-width: 32em; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; }
.ticks { margin-top: 32px; display: grid; gap: 10px; font-size: 15px; color: var(--ink2); }
.ticks li { display: flex; align-items: center; gap: 10px; }
.ticks .ico { color: var(--blue-ink); width: 17px; height: 17px; }
.sample { margin-top: 28px; font-size: 12.5px; color: var(--ink3); }
.sample--center { text-align: center; margin-top: 16px; }

/* Les factures : papier clair dans les deux thèmes */
.sheets { position: relative; }
.sheet {
  position: relative; background: #fdfdfc; color: #15171c; border: 1px solid #d9dce3;
  padding: 28px 28px 26px; box-shadow: 0 30px 60px -28px rgba(21, 23, 28, .45), 0 0 0 1px rgba(255, 255, 255, .04);
}
.sheet--back { display: none; }
.sheet__title { font-family: var(--serif); font-weight: 500; font-size: 26px; letter-spacing: -.01em; line-height: 1.2; }
.sheet__no { font-size: 12px; color: #5f6571; margin-top: 2px; }
.sheet__to { font-size: 13px; margin: 16px 0 14px; color: #454a55; }
.sheet__rows { border-top: 1px solid #15171c; font-size: 12.5px; }
.sheet__rows div { display: flex; justify-content: space-between; gap: 14px; padding: 9px 0; border-bottom: 1px solid #e1e3e9; color: #454a55; }
.sheet__rows b { font-weight: 550; color: #15171c; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sheet__total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 14px; font-family: var(--serif); font-size: 22px; }
.sheet__total--top { margin-top: 16px; }
.stamp {
  position: absolute; right: 22px; top: 22px; width: 92px; height: 92px; border-radius: 50%;
  display: grid; place-items: center; text-align: center;
  border: 2px solid #1d4ed8; color: #1d4ed8; outline: 1px solid #1d4ed8; outline-offset: -7px;
  font-weight: 700; font-size: 13px; letter-spacing: .04em; transform: rotate(-12deg);
  animation: stamp .45s cubic-bezier(.2, .8, .2, 1) .5s both;
}
@keyframes stamp {
  from { opacity: 0; transform: rotate(-20deg) scale(1.6); }
  to { opacity: 1; transform: rotate(-12deg) scale(1); }
}

@media (min-width: 960px) {
  .hero { padding: 84px 0 56px; }
  .hero__grid { grid-template-columns: 7fr 5fr; gap: 64px; }
  .sheets { height: 560px; }
  .sheet { position: absolute; width: 360px; padding: 30px 32px; }
  .sheet--back { display: block; right: 0; top: 0; }
  .sheet--front { left: 0; top: 132px; z-index: 2; }
  .sheet--back::after { content: ""; display: block; height: 210px; }
}

/* ── Maquettes d'interface (clair / sombre par variables) ── */
.win { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--win-shadow); overflow: hidden; text-align: left; }
.win__bar { padding: 11px 16px; border-bottom: 1px solid var(--line); font-size: 12.5px; font-weight: 550; color: var(--ink3); }
.win__body { padding: 18px; }

.pill {
  display: inline-flex; align-items: center; gap: 5px; padding: 1px 9px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface2); color: var(--ink2);
  font-size: 11px; font-weight: 550; line-height: 1.5; white-space: nowrap;
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: var(--dot-glow); }
.pill--amber { color: var(--amber); background: var(--amber-bg); border-color: var(--amber-line); }
.pill--blue { color: var(--blue-ink); background: var(--blue-bg); border-color: var(--blue-line); }
.pill--red { color: var(--red-ink); background: var(--red-bg); border-color: var(--red-line); }

.chrono {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 16px; text-align: left;
  padding: 14px 18px; border-radius: 12px; background: var(--surface);
  border: 1px solid var(--red-line); box-shadow: 0 0 0 3px var(--red-bg), 0 0 34px -6px var(--glow-red-halo);
}
.chrono__l { font-size: 12.5px; font-weight: 650; color: var(--ink); }
.chrono__t { font-size: 30px; font-weight: 650; line-height: 1.15; letter-spacing: .01em; color: var(--red-ink); font-variant-numeric: tabular-nums; }
.stopbtn { padding: 9px 15px; border-radius: 8px; background: #dc2626; color: #fff; font-size: 13px; font-weight: 600; white-space: nowrap; }
.chrono.is-stopped { border-color: var(--line); box-shadow: none; }
.chrono.is-stopped .chrono__t { color: var(--ink); }

/* Aperçu de l'application sous le héros */
.app { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.appwin {
  display: grid; background: var(--surface); border: 1px solid var(--line); border-bottom: 0;
  border-radius: 8px 8px 0 0; box-shadow: var(--win-shadow); overflow: hidden; text-align: left;
}
.side { display: none; padding: 16px 12px; background: var(--side); border-right: 1px solid var(--line); }
.side .brand { padding: 4px 8px 16px; font-size: 14px; }
.nv { display: flex; align-items: center; gap: 10px; margin-bottom: 2px; padding: 8px 10px; border-radius: 6px; font-size: 13.5px; color: var(--ink3); }
.nv .ico { width: 16px; height: 16px; }
.nv--on { background: var(--surface2); color: var(--ink); font-weight: 550; }
.main { padding: 20px 18px 24px; }
.case-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.case-title { font-family: var(--serif); font-weight: 500; font-size: 22px; line-height: 1.25; letter-spacing: -.015em; }
.case-sub { font-size: 12.5px; color: var(--ink3); margin-top: 3px; }
.case-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.case-grid { display: grid; gap: 12px; }
.case-side { display: grid; gap: 12px; align-content: start; }
.ui-card { padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.ui-h { margin-bottom: 8px; font-size: 12.5px; font-weight: 650; }
.ui-line { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--ink2); }
.ui-h + .ui-line { border-top: 0; padding-top: 0; }
.tl { margin-left: 5px; border-left: 2px solid var(--line); font-size: 12.5px; line-height: 1.45; }
.tl li { position: relative; padding: 0 0 13px 14px; }
.tl li:last-child { padding-bottom: 0; }
.tl li::before { content: ""; position: absolute; left: -7px; top: 3px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--blue); }
.tl span { display: block; font-size: 11px; color: var(--ink3); }

@media (min-width: 700px) {
  .case-grid { grid-template-columns: 1.15fr 1fr; }
  .main { padding: 22px 24px 28px; }
}
@media (min-width: 900px) {
  .appwin { grid-template-columns: 210px 1fr; }
  .side { display: block; }
}

/* ── Sections ────────────────────────────────────────────── */
.sec { padding: 72px 0 80px; border-top: 1px solid var(--line); overflow-x: hidden; overflow-x: clip; }
.sec--ruled { border-top: 1px solid var(--rule); }
.sec--raised { background: var(--surface); }

.split { display: grid; gap: 40px; align-items: center; }
.split--top { align-items: start; }
.split__text { min-width: 0; }
.split__lead { margin-top: 18px; max-width: 31em; color: var(--ink2); }
.try { margin-top: 24px; font-size: 14.5px; color: var(--blue-ink); font-weight: 550; }
@media (min-width: 960px) {
  .sec { padding: 104px 0 112px; }
  .split { grid-template-columns: 5fr 7fr; gap: 72px; }
  .split--flip { grid-template-columns: 7fr 5fr; }
  .split--flip > :first-child { order: 2; }
}

.points { margin-top: 28px; border-top: 1px solid var(--rule); }
.points li { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 15.5px; color: var(--ink2); }
.points b { color: var(--ink); font-weight: 600; }

/* Articles */
.arts { margin-top: 44px; border-top: 1px solid var(--rule); }
.art { display: grid; gap: 6px; padding: 28px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.art__n { font-family: var(--serif); font-style: italic; font-size: 18px; color: var(--blue-ink); }
.art h3 { font-family: var(--serif); font-weight: 500; font-size: 1.75rem; line-height: 1.2; letter-spacing: -.015em; }
.art p { color: var(--ink2); font-size: 16px; max-width: 38em; }
@media (min-width: 900px) {
  .art { grid-template-columns: 110px 1fr 1.25fr; gap: 28px; padding: 30px 0; }
}

/* Démo du chrono */
.td__clock { margin-bottom: 0; }
.td__actions { display: flex; gap: 8px; }
.td__panel { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); animation: reveal .3s ease both; }
.td__title { margin-bottom: 12px; font-size: 14px; font-weight: 650; }
.td__fields { display: grid; gap: 12px; margin-bottom: 14px; }
.tf { display: grid; gap: 4px; min-width: 0; }
.tf__l { font-size: 12px; font-weight: 600; color: var(--ink3); }
.tf__v { display: flex; align-items: center; min-height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface2); font-size: 14px; color: var(--ink2); }
.tf__in, .dur input {
  width: 100%; min-height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px;
  background: var(--surface); color: var(--ink); font-size: 14px;
}
.tf__in:focus-visible, .dur input:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.dur { display: flex; align-items: center; gap: 6px; }
.dur i { font-style: normal; font-size: 13px; color: var(--ink3); }
.amount { padding: 12px 16px; border: 1px solid var(--blue-line); border-radius: 8px; background: var(--blue-bg); }
.amount__l { font-size: 12px; font-weight: 600; color: var(--blue-ink); }
.amount__v { margin-top: 2px; font-family: var(--serif); font-size: 32px; line-height: 1.2; color: var(--blue-ink); font-variant-numeric: tabular-nums; }
.amount__f { margin-top: 2px; min-height: 1.4em; font-size: 12.5px; line-height: 1.4; color: var(--ink2); }
.td__foot { display: flex; justify-content: flex-end; margin-top: 14px; }
.td__done { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); animation: reveal .3s ease both; }
.done__msg { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--green-ink); }
.done__line { display: flex; justify-content: space-between; gap: 12px; margin-top: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; font-size: 13px; color: var(--ink2); }
.done__line b { color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
@keyframes reveal { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (min-width: 560px) {
  .td__fields { grid-template-columns: 1fr 1fr; }
  .tf--wide { grid-column: 1 / -1; }
}

/* Tableau des factures */
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 13.5px; }
.tbl th { padding: 12px 16px; border-bottom: 1px solid var(--rule); text-align: left; font-size: 12px; font-weight: 600; color: var(--ink3); }
.tbl td { padding: 14px 16px; border-bottom: 1px solid var(--line); color: var(--ink2); vertical-align: middle; }
.tbl .r { text-align: right; white-space: nowrap; }
.tbl tfoot td { border-bottom: 0; border-top: 1px solid var(--rule); font-family: var(--serif); font-size: 17px; color: var(--ink); }

/* Assistant */
.says { margin-top: 28px; border-top: 1px solid var(--rule); }
.says__row { display: grid; gap: 8px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.bubble {
  justify-self: start; padding: 9px 14px; border-radius: 14px 14px 14px 4px;
  background: var(--bubble-me); color: var(--bubble-me-ink); font-size: 15px; line-height: 1.45;
}
.says__do { font-size: 14.5px; color: var(--ink2); }
@media (min-width: 640px) {
  .says__row { grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
}

.phone-wrap { display: grid; justify-items: center; }
.phone {
  display: flex; flex-direction: column; width: min(100%, 330px); height: 610px; overflow: hidden;
  background: var(--surface); border: 7px solid var(--phone-edge); border-radius: 36px;
  box-shadow: var(--win-shadow);
}
.phone__head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.phone__name { font-size: 14px; font-weight: 650; line-height: 1.2; }
.phone__sub { font-size: 11.5px; color: var(--ink3); }
.chat { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; padding: 14px 12px; background: var(--chat-bg); overflow: hidden; }
.msg { max-width: 88%; padding: 9px 12px; border-radius: 14px; font-size: 13.2px; line-height: 1.45; }
.msg time { display: block; margin-top: 2px; text-align: right; font-size: 10.5px; color: var(--ink3); }
.msg--me { align-self: flex-end; background: var(--bubble-me); color: var(--bubble-me-ink); border-bottom-right-radius: 4px; }
.msg--me time { color: inherit; opacity: .7; }
.msg--bot { align-self: flex-start; background: var(--bubble-bot); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg__list { margin: 6px 0; }
.msg__list li { display: flex; justify-content: space-between; gap: 10px; padding: 2px 0; font-size: 12px; }
.msg__list b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.typing { align-self: flex-start; display: flex; gap: 4px; padding: 11px 14px; border-radius: 14px; border-bottom-left-radius: 4px; background: var(--bubble-bot); border: 1px solid var(--line); }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink3); animation: blink 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 60%, 100% { opacity: .25; } 30% { opacity: 1; } }
.phone__input { display: flex; justify-content: space-between; align-items: center; margin: 10px 12px; padding: 9px 10px 9px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; color: var(--ink3); }
.send { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--blue); color: #fff; }
.send .ico { width: 14px; height: 14px; }

/* Sécurité */
.facts div { padding: 20px 0; border-bottom: 1px solid var(--line); }
.facts { border-top: 1px solid var(--rule); }
.facts dt { font-family: var(--serif); font-weight: 500; font-size: 1.35rem; letter-spacing: -.01em; }
.facts dd { margin-top: 4px; color: var(--ink2); font-size: 15.5px; max-width: 34em; }

/* Questions */
.faq { border-top: 1px solid var(--rule); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 0; cursor: pointer;
  font-family: var(--serif); font-size: 1.2rem; line-height: 1.35; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--sans); font-size: 24px; line-height: 1; color: var(--ink3); flex: none; }
.faq details[open] summary::after { content: "−"; }
.faq summary:hover { color: var(--blue-ink); }
.faq p { padding: 0 0 22px; max-width: 36em; color: var(--ink2); font-size: 16px; }

/* Contact */
.contact__alt { margin-top: 24px; font-size: 15px; color: var(--ink2); }
.contact__alt a { color: var(--blue-ink); font-weight: 600; }
.contact__alt a:hover { text-decoration: underline; }
.cform { display: grid; gap: 18px; padding: 24px 20px; border: 1px solid var(--line); border-top: 1px solid var(--rule); background: var(--page); }
.cform__row { display: grid; gap: 18px; }
.cform__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cfield { display: grid; gap: 6px; min-width: 0; }
.cfield label { font-size: 13px; font-weight: 600; color: var(--ink2); }
.cfield input, .cfield textarea {
  width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 6px;
  background: var(--surface); color: var(--ink); font: inherit; font-size: 15px; line-height: 1.5;
  transition: border-color .15s;
}
.cfield input { min-height: 46px; }
.cfield textarea { resize: vertical; min-height: 130px; }
.cfield input::placeholder, .cfield textarea::placeholder { color: var(--ink3); opacity: .8; }
.cfield input:hover, .cfield textarea:hover { border-color: var(--ink3); }
.cfield input:focus-visible, .cfield textarea:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; border-color: var(--blue); box-shadow: 0 0 0 5px var(--glow-blue); }
.cfield .is-invalid { border-color: var(--red-ink); }
.cform__status { min-height: 1.4em; font-size: 14.5px; line-height: 1.45; color: var(--ink2); }
.cform__status.is-success { color: var(--green-ink); font-weight: 600; }
.cform__status.is-error { color: var(--red-ink); font-weight: 550; }
.cform__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.cform__note { font-size: 13px; color: var(--ink3); }
@media (min-width: 640px) {
  .cform { padding: 30px 32px; }
  .cform__row { grid-template-columns: 1fr 1fr; }
}

/* Pied de page */
.foot { padding: 36px 0 44px; border-top: 1px solid var(--rule); font-size: 14px; color: var(--ink3); }
.foot__row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }
.foot .brand { color: var(--ink); }
.foot__links { display: flex; gap: 20px; margin-left: auto; }
.foot__links a:hover { color: var(--ink); }
.foot__copy { flex-basis: 100%; }
@media (min-width: 700px) { .foot__copy { flex-basis: auto; } }

/* ── Lumières ─────────────────────────────────────────────
   Quelques touches de couleur douces, reprises du halo rouge du chrono : une lueur bleue et une lueur
   rouge dans le fond du héros, un halo derrière le téléphone et le formulaire, un filet lumineux en haut
   de deux sections. Rien ne bouge, tout est très faible (et presque invisible en mode clair). */
.hero { position: relative; isolation: isolate; overflow-x: hidden; overflow-x: clip; }
.hero::before, .hero::after, .phone-wrap::before, .sec--contact::after {
  content: ""; position: absolute; z-index: -1; border-radius: 50%; pointer-events: none;
}
.hero::before { width: 640px; height: 640px; left: -240px; top: -300px; background: radial-gradient(closest-side, var(--glow-blue), transparent); }
.hero::after { width: 540px; height: 540px; right: -140px; bottom: -80px; background: radial-gradient(closest-side, var(--glow-red), transparent); }

.phone-wrap { position: relative; isolation: isolate; }
.phone-wrap::before { width: 460px; height: 460px; left: 50%; top: 8%; transform: translateX(-50%); background: radial-gradient(closest-side, var(--glow-blue), transparent); }

.sec--contact { position: relative; isolation: isolate; }
.sec--contact::after { width: 520px; height: 520px; right: -160px; top: -100px; background: radial-gradient(closest-side, var(--glow-red), transparent); }

.sec--ruled, .sec--contact { position: relative; }
.sec--ruled::before, .sec--contact::before {
  content: ""; position: absolute; top: -1px; left: 0; right: 0; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, transparent 4%, var(--blue-ink) 30%, var(--red-ink) 70%, transparent 96%);
  opacity: var(--hair-opacity);
}
