/* ─── Section Contact : titre centré + carte blanche unique, angles de 6 px ─── */

.kx { padding: clamp(88px, 10vw, 128px) 0 clamp(96px, 11vw, 136px); background: var(--pearl, #FAFAFA); }
.kx .wrap { max-width: 860px; }

.kx-eyebrow { display: flex; justify-content: center; align-items: center; gap: 8px; font: 500 12px/1 Inter, sans-serif; letter-spacing: .16em; text-transform: uppercase; color: #4A4F63; }
.kx-eyebrow::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--ink, #07070A); }
.kx-title { max-width: 860px; margin: 20px auto 16px; text-align: center; font-family: "Polysans", Inter, sans-serif; font-weight: 400; font-size: clamp(36px, 5vw, 64px); line-height: 1.04; letter-spacing: -.04em; color: var(--ink, #07070A); text-wrap: balance; }
.kx-lead { max-width: 520px; margin: 0 auto; text-align: center; font-size: 16px; line-height: 1.55; color: var(--muted, #6E6878); }

/* ── Carte ── */
.kx-card {
  position: relative; max-width: 760px; margin: 56px auto 0; scroll-margin-top: 96px;
  padding: 40px 44px 36px; background: var(--paper, #fff); border: 1px solid rgba(7,7,10,.08); border-radius: 14px;
  box-shadow: 0 1px 2px rgba(7,7,10,.03), 0 24px 48px -36px rgba(7,7,10,.25);
}
.kx-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.kx-field { position: relative; min-width: 0; margin: 0 0 20px; padding: 0; border: 0; }
.kx-field > label,
.kx-field > legend { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; width: 100%; margin-bottom: 8px; padding: 0; font-size: 14px; font-weight: 500; color: #4A4F63; }
.kx-field small { font-size: 12.5px; font-weight: 400; color: var(--muted-2, #928C9B); }

.kx-card input[type="text"],
.kx-card input[type="email"],
.kx-card input[type="tel"],
.kx-card textarea {
  width: 100%; height: 48px; padding: 0 13px;
  font: 400 16px/1.4 "Polysans", Inter, system-ui, sans-serif; /* police du site ; 16 px évite le zoom iOS */
  color: var(--ink, #07070A); background: #F7F6F3; border: 1px solid rgba(7,7,10,.09); border-radius: 6px; outline: none;
  transition: border-color .15s ease, background-color .15s ease;
}
.kx-card textarea { height: auto; min-height: 120px; padding: 12px 13px; line-height: 1.55; resize: none; }
.kx-card input::placeholder,
.kx-card textarea::placeholder { color: #A29DAA; }
.kx-card input:focus,
.kx-card textarea:focus { background: #fff; border-color: var(--ink, #07070A); }
.kx-field.is-invalid input { border-color: #C8321F; }
.kx-err { margin: 6px 0 0; font-size: 13px; color: #C8321F; }
.kx-err:empty { display: none; }

/* indicatif : sélecteur pays existant, ramené à 6 px */
.kx-tel { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 8px; }
.kx-tel .custom-select-container { width: 100%; }
.kx-tel .custom-select-trigger { height: 48px; padding: 0 12px; border-radius: 6px; font: 400 15px/1 "Polysans", Inter, sans-serif; background: #F7F6F3; border-color: rgba(7,7,10,.09); }
.kx-tel .custom-select-trigger:focus-visible { outline: none; border-color: var(--ink, #07070A); background: #fff; }
.kx-tel .custom-select-trigger svg { transition: transform .2s var(--ease); }
.kx-tel .custom-select-trigger[aria-expanded="true"] svg { transform: rotate(180deg); }
.kx-tel .custom-select-dropdown { border-radius: 6px; }
.kx-tel #custom-indicatif-search { height: 40px; font-size: 16px; border-radius: 6px; }

/* options rectangulaires : vraies cases à cocher / boutons radio, masqués */
.kx-opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.kx-opts.is-budget { grid-template-columns: repeat(5, 1fr); }
.kx-opt { position: relative; display: block; }
.kx-opt input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; margin: 0; cursor: pointer; }
.kx-opt span {
  display: flex; align-items: center; height: 100%; min-height: 46px; padding: 11px 13px;
  font-size: 14.5px; line-height: 1.25; color: #3A3842; background: #F7F6F3;
  border: 1px solid rgba(7,7,10,.09); border-radius: 6px; user-select: none;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.kx-opts.is-budget .kx-opt span { justify-content: center; text-align: center; padding: 11px 6px; font-size: 14px; }
.kx-opt input:checked + span { background: var(--ink, #07070A); border-color: var(--ink, #07070A); color: #fff; }
.kx-opt input:focus-visible + span { outline: 2px solid var(--blue, #2563EB); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) {
  .kx-opt input:not(:checked):hover + span { border-color: rgba(7,7,10,.22); }
}

/* bouton d'envoi : composant du site (vague blanche au survol), angles 6 px */
.btn-pro-submit {
  width: 100%; margin-top: 8px; padding: 17px; background: #07070A; color: #FFFFFF; border: 1px solid transparent; border-radius: 6px;
  font-size: 16px; font-weight: 500; cursor: pointer; display: flex; justify-content: center; align-items: center; gap: 10px; font-family: 'Polysans', Inter, sans-serif;
  position: relative; overflow: hidden; box-shadow: 0 16px 36px -20px rgba(7, 7, 10, .72);
  transition: transform .3s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
}
.btn-pro-submit span { position: relative; z-index: 2; color: #FFFFFF; transition: color .55s var(--ease); }
.btn-pro-submit::after {
  content: ""; position: absolute; left: -24%; bottom: -78%; width: 148%; height: 190%;
  border-radius: 50% 50% 0 0 / 32px 32px 0 0; transform: translateY(104%);
  transition: transform .86s var(--ease); z-index: 1; background: #FFFFFF; pointer-events: none;
}
@media (hover: hover) and (pointer: fine) {
  .btn-pro-submit:not(:disabled):hover { border-color: rgba(7, 7, 10, .14); box-shadow: 0 20px 42px -16px rgba(7, 7, 10, .28); }
  .btn-pro-submit:not(:disabled):hover::after { transform: translateY(-18%); }
  .btn-pro-submit:not(:disabled):hover span { color: var(--ink); }
}
.btn-pro-submit:active { transform: scale(.985); }
.btn-pro-submit:focus-visible { outline: 2px solid var(--blue, #2563EB); outline-offset: 3px; }
.btn-pro-submit:disabled { cursor: progress; }
.btn-pro-submit.is-loading span::before { content: ""; display: inline-block; width: 15px; height: 15px; margin-right: 10px; vertical-align: -2px; border: 2px solid rgba(255,255,255,.3); border-top-color: #fff; border-radius: 50%; animation: kx-spin .6s linear infinite; }
@keyframes kx-spin { to { transform: rotate(360deg); } }

.kx-note { margin: 14px 0 0; font-size: 13px; text-align: center; color: var(--muted, #6E6878); }
.kx-form-msg { margin: 14px 0 0; padding: 12px 14px; border-radius: 6px; background: #FEF3F2; color: #B42318; font-size: 14px; text-align: center; }

/* ── Confirmation : la carte ne montre plus que le message ── */
#leadForm.is-done > :not(.kx-done) { display: none; }
.kx-done { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 360px; text-align: center; outline: none; opacity: 0; transition: opacity .35s ease; }
.kx-done[hidden] { display: none; }
.kx-done.is-on { opacity: 1; }
.kx-done h3 { margin: 0; font-family: "Polysans", Inter, sans-serif; font-weight: 400; font-size: clamp(30px, 3.4vw, 38px); letter-spacing: -.04em; }
.kx-done p { max-width: 380px; margin: 12px 0 0; font-size: 15.5px; line-height: 1.55; color: var(--muted, #6E6878); }
.kx-done a { margin-top: 26px; padding-bottom: 2px; border-bottom: 1px solid var(--ink, #07070A); font-size: 15px; font-weight: 500; color: var(--ink, #07070A); }

/* ── Contact direct ── */
.kx-direct { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px 28px; max-width: 760px; margin: 26px auto 0; font-size: 15px; color: var(--muted, #6E6878); }
.kx-direct a { padding-bottom: 2px; border-bottom: 1px solid rgba(7,7,10,.14); color: var(--ink, #07070A); transition: border-color .2s ease; }
@media (hover: hover) and (pointer: fine) { .kx-direct a:hover { border-color: var(--ink, #07070A); } }

@media (max-width: 760px) {
  .kx .wrap { padding: 0 16px; }
  .kx-card { margin-top: 40px; padding: 26px 20px 24px; }
  .kx-row { grid-template-columns: 1fr; }
  .kx-opts, .kx-opts.is-budget { grid-template-columns: 1fr 1fr; }
  .kx-opts.is-budget .kx-opt:last-child { grid-column: 1 / -1; }
  .kx-direct { flex-direction: column; align-items: center; }
}

@media (prefers-reduced-motion: reduce) {
  .kx-done { transition: none; }
}
