/* ============================================================
   Landing API (/api-annonces-legales) — design v2.

   Portage de DesignSystem/ui_kits/marketing/api.html.
   Le vocabulaire partagé (display-mega, kicker, section-head,
   tricolor-strip-thick, cta-final, foot-kicker) vit dans
   marketing-v2.css et n'est PAS redéfini ici : cette feuille ne
   porte que ce qui est propre à la page API.
   ============================================================ */

/* Garde-fou : les enfants de grille valent min-width:auto par défaut, ce qui
   laisse un contenu non sécable (blocs de code, URI mono) élargir toute la
   mise en page et provoquer un débordement horizontal sur mobile. */
.persona-grid > *,
.path-grid > *,
.feat-grid > *,
.ep-row > *,
.section-head > * { min-width: 0; }

/* Les libellés de section sont plus longs ici (« 01 · Annonce légale »)
   que la colonne de 160px prévue par marketing-v2.css. */
@media (min-width: 768px) {
  .landing-api .section-head { grid-template-columns: 200px 1fr; }
}

/* ============== CODE CARD (terminal) ============== */
.code-card {
  background: var(--lgdf-ink-900);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 30px 80px -28px rgba(11,42,107,.45), 0 2px 0 rgba(11,42,107,.04);
  min-width: 0;
  max-width: 100%;
}
.code-card.flat { box-shadow: none; }
.code-head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.03);
}
.code-head .verb {
  font-family: var(--lgdf-font-mono);
  font-size: .64rem; font-weight: 600; letter-spacing: .1em;
  padding: 3px 8px; border-radius: 5px; flex: none;
}
.code-head .verb.post { background: rgba(88,212,155,.16); color: #7fe3b4; }
.code-head .verb.get  { background: rgba(120,170,255,.16); color: #9fc4ff; }
.code-head .uri {
  font-family: var(--lgdf-font-mono); font-size: .76rem;
  color: rgba(255,255,255,.9); word-break: break-all;
}
.code-head .tag {
  margin-left: auto; font-family: var(--lgdf-font-mono);
  font-size: .62rem; letter-spacing: .12em; text-transform: uppercase;
  color: rgba(255,255,255,.4);
}
.code-body {
  margin: 0; padding: 18px 18px 20px;
  overflow-x: auto; max-width: 100%;
  font-family: var(--lgdf-font-mono); font-size: .78rem; line-height: 1.65;
  color: rgba(255,255,255,.88); white-space: pre; tab-size: 2;
}
.code-body .c { color: rgba(255,255,255,.38); }
.code-body .k { color: #9fc4ff; }
.code-body .s { color: #7fe3b4; }
.code-body .n { color: #f0c36d; }

/* ============== PERSONAS ============== */
.persona-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 720px)  { .persona-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .persona-grid { grid-template-columns: repeat(3, 1fr); } }
.persona-card {
  background: var(--lgdf-paper-0);
  border: 1px solid var(--lgdf-stone-200);
  border-radius: 16px;
  padding: 26px 24px 24px;
  display: flex; flex-direction: column;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.persona-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 48px -26px rgba(11,42,107,.35);
  border-color: var(--lgdf-stone-300);
}
.persona-card .ic-tile {
  width: 42px; height: 42px; border-radius: 11px;
  background: var(--lgdf-ink-50); color: var(--lgdf-ink-700);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
}
.persona-card .ic-tile svg { width: 20px; height: 20px; stroke-width: 1.75; }
.persona-card h3 {
  font-weight: 700; color: var(--lgdf-ink-900);
  margin: 0 0 10px; font-size: 1.06rem; letter-spacing: -.01em;
}
.persona-card p { color: var(--lgdf-stone-600); font-size: .9rem; margin: 0; line-height: 1.55; }
.persona-card .tagline {
  font-family: var(--lgdf-font-mono); font-size: .64rem;
  letter-spacing: .12em; text-transform: uppercase; color: var(--lgdf-stone-400);
  margin-top: auto; padding-top: 18px;
}

/* ============== DEUX CHEMINS D'INTÉGRATION ============== */
.path-grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 1000px) { .path-grid { grid-template-columns: repeat(2, 1fr); } }
.path-card {
  background: var(--lgdf-paper-0);
  border: 1px solid var(--lgdf-stone-200);
  border-radius: 18px;
  padding: 26px 24px 24px;
  display: flex; flex-direction: column; height: 100%;
  min-width: 0;
}
.path-card .col-tag {
  display: inline-flex; align-items: center; gap: 7px; align-self: flex-start;
  font-family: var(--lgdf-font-mono); font-size: .66rem;
  letter-spacing: .12em; text-transform: uppercase; font-weight: 600;
  padding: 4px 10px; border-radius: 999px; margin-bottom: 16px;
}
.path-card.widget  .col-tag { background: var(--lgdf-ink-50); color: var(--lgdf-ink-700); }
.path-card.backend .col-tag { background: #E6F6EE; color: #056647; }
.path-card h3 {
  font-weight: 700; color: var(--lgdf-ink-900);
  margin: 0 0 10px; font-size: 1.24rem; letter-spacing: -.015em;
}
.path-card > p { color: var(--lgdf-stone-600); font-size: .92rem; line-height: 1.6; margin: 0 0 20px; }

/* étapes numérotées */
.steps { list-style: none; margin: 0 0 20px; padding: 0; counter-reset: st; }
.steps li {
  counter-increment: st; position: relative;
  padding: 9px 0 9px 34px; font-size: .88rem; color: var(--lgdf-ink-800);
  border-bottom: 1px dashed var(--lgdf-stone-200);
}
.steps li:last-child { border-bottom: 0; }
.steps li::before {
  content: counter(st, decimal-leading-zero);
  position: absolute; left: 0; top: 10px;
  font-family: var(--lgdf-font-mono); font-size: .68rem; font-weight: 600;
  color: var(--lgdf-ink-700); background: var(--lgdf-ink-50);
  border-radius: 6px; padding: 2px 6px;
}
.steps li code {
  font-family: var(--lgdf-font-mono); font-size: .8rem; color: var(--lgdf-ink-900);
  background: var(--lgdf-paper-50); border: 1px solid var(--lgdf-stone-200);
  border-radius: 5px; padding: 1px 5px;
}
.steps li small { display: block; color: var(--lgdf-stone-500); font-size: .78rem; margin-top: 3px; }

/* note factuelle */
.note-inline {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--lgdf-paper-50);
  border: 1px solid var(--lgdf-stone-200);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: .84rem; color: var(--lgdf-stone-600); line-height: 1.55;
}
.note-inline .ic {
  width: 28px; height: 28px; border-radius: 8px; flex: none;
  background: var(--lgdf-paper-0); border: 1px solid var(--lgdf-stone-200);
  color: var(--lgdf-ink-700);
  display: flex; align-items: center; justify-content: center;
}
.note-inline .ic svg { width: 15px; height: 15px; }
.note-inline b { color: var(--lgdf-ink-900); font-weight: 600; }

/* ============== CARTES CAPACITÉS ============== */
.feat-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 720px)  { .feat-grid.three { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .feat-grid.three { grid-template-columns: repeat(3, 1fr); } }
.feat-card {
  background: var(--lgdf-paper-0);
  border: 1px solid var(--lgdf-stone-200);
  border-radius: 16px;
  padding: 22px 22px 20px;
  display: flex; flex-direction: column;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.feat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 48px -26px rgba(11,42,107,.35);
  border-color: var(--lgdf-stone-300);
}
.feat-card .ic-tile {
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--lgdf-ink-50); color: var(--lgdf-ink-700);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.feat-card .ic-tile svg { width: 18px; height: 18px; stroke-width: 1.75; }
.feat-card h3 {
  font-weight: 700; color: var(--lgdf-ink-900);
  margin: 0 0 7px; font-size: 1rem; letter-spacing: -.01em;
}
.feat-card p { color: var(--lgdf-stone-600); font-size: .86rem; margin: 0; line-height: 1.5; }

/* ============== TABLE D'ENDPOINTS ============== */
.ep-card {
  background: var(--lgdf-paper-0);
  border: 1px solid var(--lgdf-stone-200);
  border-radius: 18px; overflow: hidden;
  box-shadow: 0 24px 60px -34px rgba(11,42,107,.3);
}
.ep-head {
  padding: 14px 20px;
  border-bottom: 1px solid var(--lgdf-stone-100);
  background: linear-gradient(180deg, var(--lgdf-paper-50), var(--lgdf-paper-0));
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.ep-head .stamp {
  font-family: var(--lgdf-font-mono); font-size: .68rem;
  letter-spacing: .12em; text-transform: uppercase; color: var(--lgdf-stone-500);
}
.ep-head .auth {
  font-family: var(--lgdf-font-mono); font-size: .68rem;
  color: var(--lgdf-ink-700); background: var(--lgdf-ink-50);
  border-radius: 6px; padding: 3px 8px;
}
.ep-row {
  display: grid; grid-template-columns: 52px 1fr; gap: 12px;
  padding: 13px 20px;
  border-bottom: 1px dashed var(--lgdf-stone-200);
  align-items: start;
}
@media (min-width: 720px) {
  .ep-row { grid-template-columns: 52px minmax(200px, 1fr) 1.3fr; align-items: center; }
}
.ep-row:last-child { border-bottom: 0; }
.ep-row .m {
  font-family: var(--lgdf-font-mono); font-size: .62rem; font-weight: 600;
  letter-spacing: .06em; padding: 3px 7px; border-radius: 5px; text-align: center;
}
.ep-row .m.get  { background: rgba(11,42,107,.08); color: var(--lgdf-ink-700); }
.ep-row .m.post { background: #E6F6EE; color: #056647; }
.ep-row .p {
  font-family: var(--lgdf-font-mono); font-size: .82rem;
  color: var(--lgdf-ink-900); word-break: break-all;
}
.ep-row .d { font-size: .86rem; color: var(--lgdf-stone-600); line-height: 1.45; }

.form-chip {
  display: inline-flex; align-items: center;
  font-family: var(--lgdf-font-mono); font-size: .7rem; letter-spacing: .04em;
  color: var(--lgdf-ink-800); background: var(--lgdf-paper-0);
  border: 1px solid var(--lgdf-stone-200); border-radius: 999px; padding: 5px 12px;
}

/* ============== MISE EN ROUTE ============== */
.launch { position: relative; padding-left: 26px; }
.launch::before {
  content: ""; position: absolute; left: 7px; top: 10px; bottom: 14px;
  width: 2px; background: var(--lgdf-stone-200);
}
.launch .lp { position: relative; padding: 12px 0 16px; }
.launch .lp::before {
  content: ""; position: absolute; left: -26px; top: 18px;
  width: 12px; height: 12px; border-radius: 999px;
  background: var(--lgdf-paper-100); border: 2px solid var(--lgdf-ink-700);
}
.launch .lp .st {
  font-family: var(--lgdf-font-mono); font-size: .66rem;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--lgdf-stone-500); margin-bottom: 5px;
}
.launch .lp h3 { font-weight: 700; color: var(--lgdf-ink-900); margin: 0 0 6px; font-size: 1.02rem; }
.launch .lp p { color: var(--lgdf-stone-600); font-size: .88rem; margin: 0; line-height: 1.55; max-width: 52ch; }

.sec-list { list-style: none; margin: 0; padding: 0; }
.sec-list li {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 0; border-bottom: 1px solid var(--lgdf-stone-100);
  font-size: .88rem; color: var(--lgdf-stone-600); line-height: 1.5;
}
.sec-list li:last-child { border-bottom: 0; }
.sec-list li .ic {
  width: 26px; height: 26px; border-radius: 7px; flex: none;
  background: var(--lgdf-ink-50); color: var(--lgdf-ink-700);
  display: flex; align-items: center; justify-content: center;
}
.sec-list li .ic svg { width: 14px; height: 14px; }
.sec-list li b { color: var(--lgdf-ink-900); font-weight: 600; display: block; margin-bottom: 2px; }

/* ============== BANDE CONTACT ============== */
.contact-band {
  background: var(--lgdf-ink-900); color: #fff;
  padding: 84px 0 0; position: relative; overflow: hidden;
}
.contact-band .display-mega { color: #fff; }
.contact-band .display-mega em .slash { opacity: .9; }
.contact-band .lead { color: rgba(255,255,255,.8); }
.reassure { list-style: none; margin: 28px 0 0; padding: 0; }
.reassure li {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 11px 0; border-top: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.78); font-size: .9rem; line-height: 1.5;
}
.reassure li .ic {
  width: 26px; height: 26px; border-radius: 7px; flex: none;
  background: rgba(255,255,255,.08); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.reassure li .ic svg { width: 14px; height: 14px; }
.reassure li b { color: #fff; font-weight: 600; }

/* ============== FORMULAIRE ============== */
.form-panel {
  background: var(--lgdf-paper-0); border-radius: 20px;
  padding: 30px 28px 28px;
  box-shadow: 0 40px 90px -30px rgba(0,0,0,.55);
  color: var(--lgdf-ink-900);
}
.form-panel .fp-head { margin-bottom: 22px; }
.form-panel .fp-head h2 {
  font-weight: 700; letter-spacing: -.02em;
  margin: 0 0 6px; font-size: 1.35rem; color: var(--lgdf-ink-900);
}
.form-panel .fp-head p { margin: 0; font-size: .88rem; color: var(--lgdf-stone-600); }
.form-panel .form-label {
  font-family: var(--lgdf-font-mono); font-size: .66rem;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--lgdf-stone-500); font-weight: 500; margin-bottom: 7px;
}
.form-panel .form-label .req { color: var(--lgdf-red-500); }
.form-panel .form-control,
.form-panel .form-select { font-size: .92rem; }
.form-panel textarea.form-control { resize: vertical; min-height: 84px; }
.fieldset-lgdf { border: 0; padding: 0; margin: 0; }
.fieldset-lgdf legend { float: none; width: auto; }

/* pot de miel : invisible pour l'humain, rempli par les robots */
.hp-field {
  position: absolute; left: -9999px; width: 1px; height: 1px;
  overflow: hidden; opacity: 0;
}

/* choix en pastilles (cases + radios) */
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pill-choice { position: relative; margin: 0; }
.pill-choice input { position: absolute; opacity: 0; width: 0; height: 0; }
.pill-choice span {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  border: 1px solid var(--lgdf-stone-300); background: var(--lgdf-paper-0);
  border-radius: 999px; padding: 8px 14px;
  font-size: .85rem; font-weight: 500; color: var(--lgdf-stone-600);
  transition: all .16s ease; user-select: none;
}
.pill-choice span::before {
  content: ""; width: 14px; height: 14px; border-radius: 4px; flex: none;
  border: 1.5px solid var(--lgdf-stone-300); transition: all .16s ease;
}
.pill-choice.radio span::before { border-radius: 999px; }
.pill-choice span:hover { border-color: var(--lgdf-ink-500); color: var(--lgdf-ink-800); }
.pill-choice input:checked + span {
  background: var(--lgdf-ink-900); border-color: var(--lgdf-ink-900); color: #fff;
}
.pill-choice input:checked + span::before { background: #fff; border-color: #fff; }
.pill-choice input:focus-visible + span { outline: 2px solid var(--lgdf-ink-500); outline-offset: 2px; }

.form-foot { font-size: .78rem; color: var(--lgdf-stone-500); line-height: 1.5; }
.form-error { display: none; font-size: .82rem; color: var(--lgdf-red-600); margin-top: 12px; }
.form-error.is-shown { display: block; }

/* état de succès */
.form-success { display: none; text-align: center; padding: 26px 8px 18px; }
.form-success.is-shown { display: block; }
.form-success .tick {
  width: 56px; height: 56px; border-radius: 999px;
  background: #E6F6EE; color: #056647;
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
}
.form-success .tick svg { width: 26px; height: 26px; stroke-width: 2; }
.form-success h2 { font-weight: 700; color: var(--lgdf-ink-900); margin: 0 0 8px; font-size: 1.18rem; }
.form-success p {
  color: var(--lgdf-stone-600); font-size: .9rem;
  margin: 0 auto; max-width: 38ch; line-height: 1.55;
}

@media (prefers-reduced-motion: reduce) {
  .persona-card, .feat-card { transition: none; }
  .persona-card:hover, .feat-card:hover { transform: none; }
}
