/* =====================================================
   Modal Contact — contact-modal.css  v1.0
   Design Quantic Lift : fond dark, Rajdhani, palette sage
   Palette : --dark #2A3836 / --mid #3C534D
             --sage #4A6B61 / --light #CAD5D3
   Mobile-first, breakpoint 768px
===================================================== */

/* ─── Overlay ────────────────────────────────────── */
.qlm {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.qlm[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
}

.qlm-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* ─── Container ──────────────────────────────────── */
.qlm-container {
  position: relative;
  z-index: 1;
  background: var(--dark, #2A3836);
  border: 1px solid rgba(202, 213, 211, 0.1);
  border-radius: 6px;
  width: 92vw;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2.8rem 2.2rem 2rem;
  box-sizing: border-box;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.qlm[aria-hidden="false"] .qlm-container {
  transform: translateY(0) scale(1);
}

/* Scrollbar custom (webkit) */
.qlm-container::-webkit-scrollbar {
  width: 4px;
}
.qlm-container::-webkit-scrollbar-track {
  background: transparent;
}
.qlm-container::-webkit-scrollbar-thumb {
  background: rgba(202, 213, 211, 0.2);
  border-radius: 2px;
}

/* ─── Bouton fermer ──────────────────────────────── */
.qlm-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  background: none;
  border: 1px solid rgba(202, 213, 211, 0.15);
  border-radius: 50%;
  color: var(--light, #CAD5D3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.qlm-close svg {
  width: 16px;
  height: 16px;
}

.qlm-close:hover {
  background: rgba(202, 213, 211, 0.08);
  border-color: rgba(202, 213, 211, 0.3);
}

/* ─── Header ─────────────────────────────────────── */
.qlm-header {
  text-align: center;
  margin-bottom: 2rem;
}

.qlm-eyebrow {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 500;
  font-size: 0.62rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--sage, #4A6B61);
  margin: 0 0 0.8rem;
}

.qlm-title {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: clamp(1.4rem, 4vw, 1.8rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: #FFFFFF;
  margin: 0 0 0.8rem;
}

.qlm-subtitle {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 400;
  font-size: 0.85rem;
  line-height: 1.55;
  color: rgba(202, 213, 211, 0.55);
  margin: 0;
  max-width: 380px;
  margin-left: auto;
  margin-right: auto;
}

/* ─── CF7 Form overrides ─────────────────────────── */

/* Reset CF7 defaults */
.qlm-form-wrap .wpcf7 {
  margin: 0;
  padding: 0;
}

.qlm-form-wrap .wpcf7-form {
  margin: 0;
}

/* Row layout (2 colonnes) */
.qlm-form-wrap .qlf-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.qlm-form-wrap .qlf-row {
  display: flex;
  gap: 1rem;
}

.qlm-form-wrap .qlf-field {
  margin-bottom: 1.2rem;
  width: 100%;
}

.qlm-form-wrap .qlf-field--half {
  flex: 1;
  min-width: 0;
}

/* Labels */
.qlm-form-wrap label {
  display: block;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(202, 213, 211, 0.7);
  margin-bottom: 0.45rem;
}

.qlm-form-wrap .qlf-req {
  color: var(--sage, #4A6B61);
  font-weight: 600;
}

.qlm-form-wrap .qlf-opt {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0.02em;
  color: rgba(202, 213, 211, 0.35);
  font-size: 0.68rem;
}

/* Inputs & textarea */
.qlm-form-wrap input[type="text"],
.qlm-form-wrap input[type="email"],
.qlm-form-wrap input[type="tel"],
.qlm-form-wrap input[type="date"],
.qlm-form-wrap textarea {
  display: block;
  width: 100%;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 400;
  font-size: 0.92rem;
  line-height: 1.5;
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(202, 213, 211, 0.15);
  border-radius: 4px;
  padding: 0.75rem 1rem;
  box-sizing: border-box;
  transition: border-color 0.2s ease, background 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}

.qlm-form-wrap input[type="text"]:focus,
.qlm-form-wrap input[type="email"]:focus,
.qlm-form-wrap input[type="tel"]:focus,
.qlm-form-wrap input[type="date"]:focus,
.qlm-form-wrap textarea:focus {
  outline: none;
  border-color: var(--sage, #4A6B61);
  background: rgba(255, 255, 255, 0.07);
}

.qlm-form-wrap input::placeholder,
.qlm-form-wrap textarea::placeholder {
  color: rgba(202, 213, 211, 0.3);
  font-style: normal;
}

/* Date input — custom arrow color (webkit) */
.qlm-form-wrap input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0.75) sepia(0.2) hue-rotate(120deg);
  cursor: pointer;
}

/* Textarea */
.qlm-form-wrap textarea {
  min-height: 90px;
  resize: vertical;
}

/* ─── Checkbox consentement ──────────────────────── */
.qlm-form-wrap .qlf-field--consent {
  margin-bottom: 1.6rem;
}

.qlm-form-wrap .qlf-field--consent .wpcf7-acceptance {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.qlm-form-wrap .qlf-field--consent input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  min-width: 16px;
  border: 1px solid rgba(202, 213, 211, 0.25);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  margin-top: 2px;
  transition: background 0.2s ease, border-color 0.2s ease;
  position: relative;
}

.qlm-form-wrap .qlf-field--consent input[type="checkbox"]:checked {
  background: var(--sage, #4A6B61);
  border-color: var(--sage, #4A6B61);
}

.qlm-form-wrap .qlf-field--consent input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 5px;
  width: 4px;
  height: 8px;
  border: solid #FFFFFF;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}

.qlm-form-wrap .qlf-field--consent .wpcf7-list-item-label {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 400;
  font-size: 0.72rem;
  line-height: 1.55;
  color: rgba(202, 213, 211, 0.45);
}

.qlm-form-wrap .qlf-field--consent a {
  color: var(--sage, #4A6B61);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.qlm-form-wrap .qlf-field--consent a:hover {
  color: var(--light, #CAD5D3);
}

/* ─── Bouton submit ──────────────────────────────── */
.qlm-form-wrap .qlf-field--submit {
  margin-bottom: 0;
  text-align: center;
}

.qlm-form-wrap .ctaf-btn,
.qlm-form-wrap input[type="submit"].ctaf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dark, #2A3836);
  background: var(--light, #CAD5D3);
  border: none;
  border-radius: 3px;
  padding: 1rem 2.4rem;
  width: 100%;
  cursor: pointer;
  text-decoration: none;
  transition:
    background 0.25s ease,
    color 0.25s ease,
    transform 0.2s ease,
    box-shadow 0.25s ease;
}

.qlm-form-wrap .ctaf-btn:hover,
.qlm-form-wrap input[type="submit"].ctaf-btn:hover {
  background: #FFFFFF;
  color: var(--dark, #2A3836);
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.22);
}

.qlm-form-wrap .ctaf-btn:active,
.qlm-form-wrap input[type="submit"].ctaf-btn:active {
  transform: translateY(0);
  box-shadow: none;
}

/* ─── CF7 Messages (succès / erreur) ─────────────── */
.qlm-form-wrap .wpcf7-response-output {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-align: center;
  padding: 0.8rem 1rem;
  margin: 1rem 0 0;
  border-radius: 4px;
  border: 1px solid;
}

/* Succès */
.qlm-form-wrap .wpcf7-form.sent .wpcf7-response-output {
  color: var(--sage, #4A6B61);
  border-color: rgba(74, 107, 97, 0.3);
  background: rgba(74, 107, 97, 0.08);
}

/* Erreur de validation */
.qlm-form-wrap .wpcf7-form.invalid .wpcf7-response-output,
.qlm-form-wrap .wpcf7-form.unaccepted .wpcf7-response-output {
  color: #D4A574;
  border-color: rgba(212, 165, 116, 0.3);
  background: rgba(212, 165, 116, 0.06);
}

/* Erreur serveur */
.qlm-form-wrap .wpcf7-form.failed .wpcf7-response-output,
.qlm-form-wrap .wpcf7-form.aborted .wpcf7-response-output {
  color: #C97070;
  border-color: rgba(201, 112, 112, 0.3);
  background: rgba(201, 112, 112, 0.06);
}

/* Erreurs inline sous les champs */
.qlm-form-wrap .wpcf7-not-valid-tip {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.7rem;
  font-weight: 500;
  color: #D4A574;
  margin-top: 0.3rem;
  display: block;
}

/* Spinner CF7 */
.qlm-form-wrap .wpcf7-spinner {
  margin: 0.8rem auto 0;
  display: block;
}

/* ─── Note basse ─────────────────────────────────── */
.qlm-note {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 400;
  font-size: 0.68rem;
  line-height: 1.5;
  color: rgba(202, 213, 211, 0.3);
  text-align: center;
  margin: 1.4rem 0 0;
  letter-spacing: 0.02em;
}

/* ═══════════════════════════════════════════════════
   MOBILE ≤768px
═══════════════════════════════════════════════════ */
@media (max-width: 768px) {

  .qlm-container {
    width: 96vw;
    max-height: 92vh;
    padding: 2.2rem 1.4rem 1.6rem;
    border-radius: 8px 8px 0 0;
    align-self: flex-end;
    margin-bottom: 0;
  }

  .qlm {
    align-items: flex-end;
  }

  /* Réduire espacement label ↔ input */
  .qlm-form-wrap label {
    margin-bottom: 0.25rem;
    font-size: 0.68rem;
  }

  .qlm-form-wrap .qlf-field {
    margin-bottom: 0.85rem;
  }

  .qlm-form-wrap input[type="text"],
  .qlm-form-wrap input[type="email"],
  .qlm-form-wrap input[type="tel"],
  .qlm-form-wrap input[type="date"],
  .qlm-form-wrap textarea {
    padding: 0.6rem 0.85rem;
    font-size: 0.88rem;
  }

  .qlm-form-wrap textarea {
    min-height: 72px;
  }

  .qlm-header {
    margin-bottom: 1.4rem;
  }

  /* Stack les rangées sur mobile */
  .qlm-form-wrap .qlf-row {
    flex-direction: column;
    gap: 0;
  }

  .qlm-form-wrap .ctaf-btn,
  .qlm-form-wrap input[type="submit"].ctaf-btn {
    padding: 0.9rem 1.8rem;
    font-size: 0.78rem;
  }
}

/* ═══════════════════════════════════════════════════
   BODY LOCK quand modale ouverte
═══════════════════════════════════════════════════ */
body.qlm-open {
  overflow: hidden;
}
