/* Form-specific styles: real <input>/<select>/<textarea> hooking into existing c-classes. */

/* The HTML [hidden] attribute must always win over our explicit display rules below. */
[hidden] { display: none !important; }

/* Form container fills the c73 wrapper */
.cf-form { display: contents; }

/* Allow form box and field wrappers to grow when error messages appear.
   The Webflow export hard-codes pixel heights everywhere — we relax them to min-height. */
.wf-form.c73 {
  height: auto;
}
.cf-form .wf-field {
  height: auto;
  min-height: 72.5px;
}
.cf-form .wf-field--row {
  height: auto;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto;
  align-items: start;
}
.cf-form .wf-rgpd {
  height: auto;
  min-height: 21px;
}

/* --- Mobile & tablette : garde des inputs a taille tactile confortable, resserre l'espacement ---
   Sous 1180px, la regle globale .wf-page * { height:auto } ecrase la hauteur figee (46px)
   des inputs et selects ; on la restaure via min-height. Cote rythme vertical, on unifie
   l'espacement a 20px entre chaque bloc du formulaire (fields, rows, sections). */
@media (max-width:1180px){
  .cf-form .wf-input,
  .cf-form .wf-input--select,
  .cf-form .cf-file-label{ min-height:52px !important; padding-top:8px !important; padding-bottom:8px !important; font-size:15px !important; }
  .cf-form .wf-input--area{ min-height:140px !important; font-size:15px !important; }
  .cf-form .wf-field,
  .cf-form .wf-field--row{ margin-bottom:20px !important; }
  .cf-form .wf-field--row{ row-gap:20px !important; }
  .cf-form .wf-field--row > .wf-field{ margin-bottom:0 !important; }
}

/* Reset native styles, force the existing c-classes to drive the look */
.cf-input {
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  margin: 0;
  font: inherit;
  color: rgb(35, 32, 32);
  width: 100%;
}
.cf-input::placeholder { color: rgb(144, 138, 131); opacity: 1; }

.cf-input:focus {
  border-color: rgb(228, 129, 48) !important;
  background-color: #fff !important;
}

/* Validation states */
.cf-input.is-invalid {
  border-color: #c0392b !important;
  background-color: #fdf3f2 !important;
}

/* Inline field error message */
.cf-field-error {
  color: #c0392b;
  font-size: 12px;
  line-height: 16px;
  margin: 6px 0 0;
  font-family: Archivo, "Helvetica Neue", Arial, sans-serif;
  font-weight: 500;
  letter-spacing: 0;
}

/* Select: hide native arrow, draw a custom one */
.cf-select {
  cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23231f1f' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  padding-right: 40px;
}
.cf-select:invalid { color: rgb(144, 138, 131); }

/* Textarea overrides */
.cf-textarea {
  resize: vertical;
  min-height: 110px;
  padding-top: 13px;
  padding-bottom: 13px;
  font-family: "Space Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  line-height: 19.5px;
}

/* File field: the visible label-as-dropzone wraps a hidden input */
.cf-file-label { cursor: pointer; }
.cf-file-input { display: none; }
.cf-file-label.has-file { color: rgb(35, 32, 32); }

/* Custom checkbox: hide the real input, use the c104 box as visual */
.cf-rgpd { cursor: pointer; }
.cf-checkbox {
  position: absolute;
  width: 1px; height: 1px;
  opacity: 0;
  pointer-events: none;
}
.cf-checkbox-visual { position: relative; }
.cf-checkbox:focus-visible + .cf-checkbox-visual {
  outline: 2px solid rgb(228, 129, 48);
  outline-offset: 2px;
}
.cf-checkbox:checked + .cf-checkbox-visual {
  background-color: rgb(228, 129, 48);
  border-color: rgb(228, 129, 48);
}
.cf-checkbox:checked + .cf-checkbox-visual::after {
  content: "";
  position: absolute;
  left: 5px; top: 1px;
  width: 5px; height: 11px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Submit <button> in place of <a>: keep c107 styling, just nuke UA chrome */
button.cf-submit {
  border: none;
  cursor: pointer;
  font: inherit;
}
button.cf-submit.is-loading { opacity: 0.6; pointer-events: none; }

/* Top-of-form error banner */
.cf-error {
  color: #c0392b;
  background: #fdf3f2;
  border: 1px solid #c0392b;
  border-radius: 6px;
  padding: 10px 14px;
  margin: 12px 0 0;
  font-size: 13px;
  font-family: Archivo, "Helvetica Neue", Arial, sans-serif;
}

/* Success panel that replaces the form after submission */
.cf-success-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 16px;
  padding: 24px 0;
}
.cf-success-icon {
  width: 72px;
  height: 72px;
  color: rgb(228, 129, 48);
}
