/* ============================================
   CONTACT.CSS — Contact Page
   ============================================ */

/* ── HERO ── */
.contact-hero {
  position: relative;
  min-height: 50vh;
  display: flex;
  align-items: center;
  background: var(--n900);
  overflow: hidden;
  padding-top: var(--header-h);
}

.contact-hero__video-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.contact-hero__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.3;
}
.contact-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    160deg,
    rgba(2, 12, 27, 0.75) 0%,
    rgba(2, 12, 27, 0.4) 50%,
    rgba(2, 12, 27, 0.8) 100%
  );
}
.contact-hero__grid-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image:
    linear-gradient(rgba(26, 111, 240, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26, 111, 240, 0.1) 1px, transparent 1px);
  background-size: 50px 50px;
}

.contact-hero__inner {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 3.5rem var(--pad);
  position: relative;
  z-index: 2;
}

.contact-hero__title {
  font-family: var(--fs);
  font-size: clamp(1.8rem, 3.5vw, 3rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 1.05;
  color: var(--white);
  margin-bottom: 1.5rem;
}

.contact-hero__subtitle {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.75;
  max-width: 560px;
}

/* ── CONTACT MAIN ── */
.contact-main {
  background: var(--n800);
}

.contact-main__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 3.5rem var(--pad) 4.5rem;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  align-items: start;
}

/* ── MULTI-STEP FORM ── */
.contact-form-wrapper {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--r-md);
  padding: 3rem;
}

/* CF7 technical hidden fields should never be visible in custom UI */
.contact-form-wrapper fieldset.hidden-fields-container {
  display: none !important;
}

.hps-contact-choice {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.hps-contact-choice__btn {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.04);
  color: var(--white);
  font-family: var(--fs);
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 1.05rem 1.2rem;
  cursor: pointer;
  transition: all var(--t-base);
}

.hps-contact-choice__btn:hover {
  border-color: rgba(26, 111, 240, 0.55);
  background: rgba(26, 111, 240, 0.11);
}

.hps-contact-form-panel {
  margin-top: 0;
}

/* Progress bar */
.form-progress {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 3rem;
}

.form-progress__step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  position: relative;
}

.form-progress__step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 16px;
  left: 50%;
  right: -50%;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  z-index: 0;
  transition: background 0.4s var(--ease);
}

.form-progress__step.completed::after {
  background: var(--blue2);
}

.form-progress__dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--fs);
  font-size: 0.65rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.3);
  position: relative;
  z-index: 1;
  transition: all 0.4s var(--ease);
}

.form-progress__step.active .form-progress__dot {
  background: var(--blue2);
  border-color: var(--blue2);
  color: var(--white);
}

.form-progress__step.completed .form-progress__dot {
  background: var(--green);
  border-color: var(--green);
  color: var(--white);
}

.form-progress__label {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.25);
  text-align: center;
  white-space: nowrap;
  transition: color 0.3s var(--ease);
}

.form-progress__step.active .form-progress__label {
  color: rgba(255, 255, 255, 0.7);
}

/* Form steps */
.form-step {
  display: none;
}

.form-step.active {
  display: block;
}

.form-step__title {
  font-family: var(--fs);
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  color: var(--white);
  margin-bottom: 0.5rem;
}

.form-step__subtitle {
  font-size: 0.87rem;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 2rem;
}

/* Option grid */
.form-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.form-option {
  position: relative;
}

.form-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.form-option__label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--r-xs);
  cursor: pointer;
  transition: all var(--t-base);
  user-select: none;
}

.form-option input:checked + .form-option__label {
  background: rgba(26, 111, 240, 0.12);
  border-color: var(--blue3);
}

.form-option__label:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
}

.form-option__check {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
  transition: all var(--t-base);
  position: relative;
}

.form-option input:checked + .form-option__label .form-option__check {
  background: var(--blue2);
  border-color: var(--blue2);
}

.form-option input:checked + .form-option__label .form-option__check::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: white;
}

.form-option__text {
  font-size: 0.87rem;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.3;
  transition: color var(--t-base);
}

.form-option input:checked + .form-option__label .form-option__text {
  color: var(--white);
}

.form-option__label.is-invalid {
  border-color: var(--error, #f87171);
  background: rgba(248, 113, 113, 0.08);
}

/* Volume options (single row) */
.form-options--row {
  grid-template-columns: repeat(4, 1fr);
}

/* Form fields */
.form-fields {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-label {
  font-family: var(--fi);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
}

.form-input {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--r-xs);
  padding: 0.9rem 1.1rem;
  color: var(--white);
  font-size: 0.9rem;
  transition: all var(--t-base);
  width: 100%;
}

.form-input:focus {
  outline: none;
  border-color: var(--blue3);
  background: rgba(26, 111, 240, 0.06);
}

.form-group.is-invalid .form-input,
.form-input.is-invalid {
  border-color: var(--error, #f87171) !important;
  background: rgba(248, 113, 113, 0.08);
}

.form-input::placeholder {
  color: rgba(255, 255, 255, 0.2);
}

select.form-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.3)' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 16px;
  cursor: pointer;
}

.hps-service-select-desktop {
  display: none;
}

@media (min-width: 1025px) {
  .hps-service-select-native {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  .hps-service-select-desktop {
    display: block;
    position: relative;
  }

  .hps-service-select-desktop__trigger {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--r-xs);
    background: rgba(255, 255, 255, 0.04);
    color: var(--white);
    padding: 0.9rem 1.1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-size: 0.9rem;
  }

  .hps-service-select-desktop__menu {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 0.35rem);
    z-index: 20;
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--r-xs);
    overflow: hidden;
  }

  .hps-service-select-desktop.is-open .hps-service-select-desktop__menu {
    display: block;
  }

  .hps-service-select-desktop__option {
    width: 100%;
    text-align: left;
    padding: 0.75rem 1rem;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    font-size: 0.88rem;
  }

  .hps-service-select-desktop__option:hover,
  .hps-service-select-desktop__option.is-selected {
    background: rgba(26, 111, 240, 0.16);
    color: var(--white);
  }
}

/* Form nav buttons */
.form-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.form-nav .btn--back {
  background: transparent;
  color: rgba(255, 255, 255, 0.4);
  border: none;
  font-family: var(--fi);
  font-size: 0.85rem;
  cursor: pointer;
  transition: color var(--t-fast);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0;
}

.form-nav .btn--back:hover {
  color: rgba(255, 255, 255, 0.8);
}

/* Success state */
.form-success {
  display: none;
  text-align: center;
  padding: 4rem 2rem;
}

.form-success.active {
  display: block;
}

.form-success__icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 2rem;
}

.form-success__icon svg {
  width: 32px;
  height: 32px;
  stroke: var(--green);
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
}

.form-success__title {
  font-family: var(--fs);
  font-size: 1.5rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 0.75rem;
}

.form-success__text {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.7;
  max-width: 380px;
  margin: 0 auto;
}

/* ── CONTACT SIDEBAR ── */
.contact-sidebar {
  position: sticky;
  top: 100px;
}

.contact-sidebar__card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--r-md);
  padding: 2rem;
}

.contact-sidebar__title {
  font-family: var(--fs);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.35);
  margin-bottom: 1.25rem;
}

.contact-sidebar__item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.contact-sidebar__item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.contact-sidebar__item-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--r-xs);
  background: rgba(26, 111, 240, 0.1);
  border: 1px solid rgba(26, 111, 240, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-sidebar__item-icon svg {
  width: 14px;
  height: 14px;
  stroke: var(--blue3);
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
}

.contact-sidebar__item-label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.3);
  margin-bottom: 0.2rem;
}

.contact-sidebar__item-value {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.4;
}

.contact-sidebar__item-value a {
  color: var(--accent);
  transition: color var(--t-fast);
}

.contact-sidebar__item-value a:hover {
  color: var(--white);
}

.contact-sidebar__response {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.15);
  border-radius: var(--r-xs);
  margin-top: 1.25rem;
}

.contact-sidebar__response-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: dot-pulse 2s ease-in-out infinite;
  flex-shrink: 0;
}

.contact-sidebar__response-text {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.55);
}

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .contact-main__inner {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .contact-sidebar {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }

  .contact-sidebar__card:last-child {
    grid-column: span 2;
  }
}

@media (max-width: 768px) {
  .form-options--row {
    grid-template-columns: repeat(2, 1fr);
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .contact-sidebar {
    grid-template-columns: 1fr;
  }

  .contact-sidebar__card:last-child {
    grid-column: span 1;
  }

  .form-options {
    grid-template-columns: 1fr;
  }

  .contact-form-wrapper {
    padding: 1.5rem 1rem;
  }

  .form-progress {
    margin-bottom: 2rem;
  }

  .form-progress__label {
    display: none;
  }

  .form-progress__dot {
    width: 28px;
    height: 28px;
    font-size: 0.6rem;
  }

  .form-nav {
    flex-direction: column-reverse;
    gap: 0.75rem;
  }

  .form-nav .btn {
    width: 100%;
    justify-content: center;
  }

  .form-nav .btn--back {
    text-align: center;
    width: 100%;
    padding: 0.5rem 0;
  }

  .form-step__title {
    font-size: 1rem;
  }

  .contact-main__inner {
    padding: 2rem var(--pad) 3rem;
  }
}

@media (max-width: 480px) {
  .form-options--row {
    grid-template-columns: 1fr 1fr;
  }

  .contact-form-wrapper {
    padding: 1.25rem 0.875rem;
  }

  .form-progress__step:not(:last-child)::after {
    right: -30%;
  }
}

/* ── MULTI-STEP CF7 (widget dynamique) ── */

.hps-cf7__placeholder {
  margin: 0;
  padding: 1rem 0;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.45);
}

/* Masquer les éléments CF7 non-visibles dans le multi-étapes */
.hps-contact-multistep .hidden-fields-container {
  display: none;
}

.hps-contact-multistep .wpcf7-response-output {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hps-contact-multistep .screen-reader-response {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.hps-contact-multistep .wpcf7-spinner {
  display: inline-block;
  margin-left: 0.5rem;
}

/* Options style radio/checkbox en empilé (1 col) */
.form-options--stack {
  grid-template-columns: 1fr;
}

/* Messages d'erreur CF7 remontés dans le form visible */
.hps-contact-form__cf7-messages:not([hidden]) {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--r-xs);
  font-size: 0.85rem;
  border: 1px solid rgba(248, 113, 113, 0.35);
  background: rgba(248, 113, 113, 0.08);
  color: rgba(255, 255, 255, 0.85);
}

/* Validation CF7 : tips sous les champs */
.hps-contact-multistep .wpcf7-not-valid-tip {
  font-size: 0.75rem;
  color: var(--error, #f87171);
  margin-top: 0.35rem;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
}

.hps-contact-multistep .wpcf7-not-valid {
  border-color: var(--error, #f87171) !important;
}
