/* ==========================================================================
   Contact page (template-contact.php).
   Loaded only for that page template (see functions.php), after main.css.
   Static content â no dynamisation.
   ========================================================================== */

/* ---- Hero --------------------------------------------------------------- */
.ct-hero {
  padding: clamp(32px, 4vw, 56px) clamp(20px, 4vw, 30px);
  background: #78c6da;
}

.ct-hero .ct-hero-eyebrow {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 500;
  color: #1d2122;
  text-transform: uppercase;
}

.ct-hero .ct-hero-title {
  margin: 0 0 clamp(20px, 2.5vw, 28px);
  font-family: 'Syne', sans-serif;
  font-weight: 500;
  font-size: clamp(28px, 6vw, 60px);
  line-height: normal;
  letter-spacing: -1.2px;
  text-transform: uppercase;
  overflow-wrap: anywhere;
  color: #111;
}

.ct-hero .ct-hero-rule {
  height: 8px;
  background: #111;
  margin-bottom: clamp(18px, 2vw, 24px);
}

.ct-hero .ct-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 60px;
  align-items: flex-start;
  justify-content: space-between;
}

.ct-hero .ct-hero-lead {
  margin: 0;
  flex: 1 1 320px;
  font-size: 18px;
  font-weight: 500;
  line-height: 150%;
  color: #1d2122;
}

.ct-hero .ct-hero-loc {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  text-align: right;
  margin-left: auto;
  gap: 8px 12px;
  align-items: center;
  font-size: 16px;
  font-weight: 500;
  color: #1d2122;
  text-transform: uppercase;
}

/* ---- Form --------------------------------------------------------------- */
.ct-form-section {
  padding: clamp(48px, 6vw, 90px) clamp(20px, 4vw, 30px);
  background: #111;
}

.ct-card {
  display: flex;
  flex-direction: column;
  gap: clamp(24px, 2.6vw, 36px);
  border: 1px solid #c3ff74;
  padding: clamp(24px, 3vw, 48px);
}

.ct-card .ct-title {
  margin: 0;
  font-family: 'Syne', sans-serif;
  font-weight: 500;
  font-size: clamp(26px, 3.4vw, 44px);
  line-height: 1.05;
  letter-spacing: -1px;
  text-transform: uppercase;
  color: #fff;
}

.ct-form {
  display: flex;
  flex-direction: column;
  gap: clamp(24px, 2.6vw, 36px);
}

.ct-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(20px, 2.4vw, 28px);
}

.ct-two {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(20px, 2.2vw, 28px);
}

.ct-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ct-field .ct-label {
  font-size: 16px;
  font-weight: 500;
  color: #575757;
  text-transform: uppercase;
}

.ct-field .ct-req {
  color: #efff8b;
}

.ct-field .ct-opt {
  color: #575757;
}

/* text-ish inputs */
.ct-in {
  width: 100%;
  background: #232323;
  border: 1px solid rgba(239, 255, 139, 0.4);
  color: #fff;
  font-family: inherit;
  font-size: 18px;
  font-weight: 500;
  padding: 16px 18px;
  outline: none;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.ct-in::placeholder {
  color: #575757;
}

.ct-in:hover {
  border-color: #efff8b;
}

.ct-in:focus {
  border-color: #efff8b;
  background: #2c2c2c;
}

textarea.ct-in {
  min-height: 150px;
  resize: vertical;
}

/* phone input wrapper (renamed from the demo's .ct-phone to avoid clashing
   with the phone-link section below) */
.ct-tel {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
}

.ct-tel:focus-within {
  border-color: #efff8b;
  background: #2c2c2c;
}

.ct-bare {
  background: transparent;
  border: 0;
  outline: none;
  color: #fff;
  font-family: inherit;
  font-size: 18px;
  font-weight: 500;
  line-height: 22px;
  height: 54px;
  padding: 0;
}

.ct-bare::placeholder {
  color: #575757;
}

.ct-tel-num {
  flex: 1;
  min-width: 0;
}

select.ct-bare {
  flex: none;
  width: auto;
  cursor: pointer;
}

select.ct-bare option {
  background: #232323;
  color: #fff;
}

.ct-tel-sep {
  flex: none;
  width: 1px;
  height: 22px;
  background: rgba(239, 255, 139, 0.4);
}

/* custom-styled <select> */
select.ct-select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  padding-right: 44px;
  background-image:
    linear-gradient(45deg, transparent 50%, #efff8b 50%),
    linear-gradient(135deg, #efff8b 50%, transparent 50%);
  background-position:
    calc(100% - 22px) calc(50% + 2px),
    calc(100% - 16px) calc(50% + 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

select.ct-select option {
  background: #232323;
  color: #fff;
}

select.ct-select:invalid,
select.ct-select option[value=""] {
  color: #575757;
}

/* "Autre" subject field â hidden until JS reveals it */
.ct-autre {
  display: none;
}

/* submit button */
.ct-send {
  align-self: flex-start;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #c3ff74;
  color: #000;
  font-family: inherit;
  font-size: 18px;
  font-weight: 500;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  padding: 16px 28px;
  transition: background 0.3s ease, color 0.3s ease;
}

.ct-send:hover {
  background: #0082fe;
  color: #fff;
}

.ct-send svg {
  flex: none;
  width: 14px;
  height: 14px;
}

.ct-send:disabled {
  opacity: 0.6;
  cursor: progress;
}

/* ---- Contact Form 7 -----------------------------------------------------
   The form is a CF7 form (inc/contact-form.php): CF7 wraps every control in
   a span.wpcf7-form-control-wrap and adds its own tips, response box and
   spinner. Selectors start with .wpcf7 / .ct-form to beat CF7's styles.css
   whatever the load order. */
.ct-form .wpcf7-form-control-wrap {
  display: block;
}

.ct-tel {
  position: relative;
}

.ct-tel .wpcf7-form-control-wrap {
  position: static; /* the tip is placed against the whole phone box */
  flex: none;
}

.ct-tel .wpcf7-form-control-wrap[data-name="telephone"] {
  flex: 1;
  min-width: 0;
}

.ct-tel .ct-tel-num {
  width: 100%;
}

.ct-form .wpcf7-not-valid-tip {
  margin-top: 6px;
  font-size: 14px;
  font-weight: 500;
  color: #ff8a8a;
}

.ct-tel .wpcf7-not-valid-tip {
  position: absolute;
  top: 100%;
  left: 0;
}

.ct-field:has(.ct-tel .wpcf7-not-valid-tip) {
  padding-bottom: 26px;
}

.ct-form .ct-in.wpcf7-not-valid,
.ct-tel:has(.wpcf7-not-valid) {
  border-color: #ff8a8a;
}

/* CF7 sets no `required` attribute, so :invalid never matches */
select.ct-select:has(option[value=""]:checked) {
  color: #575757;
}

.ct-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.ct-actions .wpcf7-spinner {
  margin: 0;
  background-color: #c3ff74;
}

.ct-actions .wpcf7-spinner::before {
  background-color: #111;
}

.wpcf7 .ct-form .wpcf7-response-output {
  margin: 0;
  padding: 14px 18px;
  border: 1px solid #efff8b;
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  line-height: 150%;
}

.wpcf7 .ct-form.sent .wpcf7-response-output {
  border-color: #c3ff74;
  color: #c3ff74;
}

.wpcf7 .ct-form.failed .wpcf7-response-output,
.wpcf7 .ct-form.aborted .wpcf7-response-output,
.wpcf7 .ct-form.spam .wpcf7-response-output {
  border-color: #ff8a8a;
  color: #ff8a8a;
}

/* visually hidden label (phone country code) */
.ct-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* shown to admins only, when the CF7 form is missing */
.ct-form-missing {
  margin: 0;
  color: #efff8b;
}

/* ---- Phone card --------------------------------------------------------- */
.ct-phone-section {
  padding: 0 clamp(20px, 4vw, 30px) clamp(24px, 3vw, 40px);
  background: #111;
}

.ct-phone {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px 32px;
  min-height: 128px;
  background: #161616;
  border: 1px solid #575757;
  border-left: 8px solid #c3ff74;
  padding: clamp(20px, 2.4vw, 28px) clamp(22px, 2.8vw, 38px);
  text-decoration: none;
  transition: border-color 0.3s ease;
}

.ct-phone:hover {
  border-color: #c3ff74;
}

.ct-phone-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.ct-phone-label {
  font-size: 16px;
  font-weight: 500;
  text-transform: uppercase;
  color: #c3ff74;
}

.ct-phone-num {
  font-family: 'Syne', sans-serif;
  font-weight: 500;
  font-size: 32px;
  line-height: 1;
  letter-spacing: -1.6px;
  color: #fff;
  overflow-wrap: anywhere;
}

.ct-phone-cta {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #c3ff74;
  color: #c3ff74;
  font-size: 16px;
  font-weight: 500;
  text-transform: uppercase;
  padding: 14px 22px;
  transition: background 0.3s ease, color 0.3s ease;
}

.ct-phone:hover .ct-phone-cta {
  background: #c3ff74;
  color: #111;
}

.ct-phone-cta svg {
  flex: none;
  width: 14px;
  height: 14px;
}

/* ---- Map ---------------------------------------------------------------- */
.ct-map-section {
  padding: 0 clamp(20px, 4vw, 30px);
  background: #111;
}

.ct-map {
  position: relative;
  border: 1px solid #575757;
  background: #161616;
  overflow: hidden;
}

.ct-map iframe {
  display: block;
  width: 100%;
  height: clamp(280px, 32vw, 420px);
  border: 0;
  filter: grayscale(1) invert(0.92) contrast(0.9);
}

/* ---- Closing CTA -------------------------------------------------------- */
.ct-cta-section {
  padding: clamp(48px, 6vw, 90px) clamp(20px, 4vw, 30px) clamp(72px, 9vw, 140px);
  background: #111;
}

.ct-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px 40px;
  background: #c3ff74;
  padding: clamp(28px, 3.5vw, 44px) clamp(24px, 3vw, 40px);
}

.ct-cta-text {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ct-cta-title {
  font-family: 'Syne', sans-serif;
  font-weight: 500;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.1;
  letter-spacing: -0.6px;
  text-transform: uppercase;
  color: #111;
}

.ct-cta-sub {
  font-size: 18px;
  font-weight: 500;
  color: #1d2122;
}

.ct-cta-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #111;
  color: #c3ff74;
  font-size: 18px;
  font-weight: 500;
  text-transform: uppercase;
  text-decoration: none;
  padding: 16px 28px;
  transition: background 0.25s ease, color 0.25s ease;
}

.ct-cta-btn:hover {
  background: #0082fe;
  color: #fff;
}

.ct-cta-btn svg {
  flex: none;
  width: 14px;
  height: 14px;
}

/* ---- Scroll reveal (js/contact.js arms + reveals) ----------------------- */
.ct-reveal {
  opacity: 1;
  transform: none;
  transition:
    opacity 0.7s cubic-bezier(0.22, 0.7, 0.2, 1),
    transform 0.7s cubic-bezier(0.22, 0.7, 0.2, 1);
}

.ct-reveal.js-armed {
  opacity: 0;
  transform: translateY(28px);
}

.ct-reveal.is-in {
  opacity: 1;
  transform: none;
}

/* ---- Responsive --------------------------------------------------------- */
@media (max-width: 900px) {
  .ct-two {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .ct-row {
    grid-template-columns: minmax(0, 1fr);
  }

  select.ct-bare {
    max-width: 60px;
  }

  .ct-tel {
    padding: 0 10px;
  }
}

@media (max-width: 620px) {
  .ct-phone {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ct-reveal {
    opacity: 1;
    transform: none;
  }
}
