/* template-modal.css — Modal intermédiaire landing → customizer */

.egtm-overlay {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, .75);
  z-index: 99999;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; visibility: hidden;
  transition: opacity .2s ease, visibility .2s ease;
  overscroll-behavior: contain;
}
.egtm-overlay.is-open { opacity: 1; visibility: visible; }

.egtm-modal {
  background: #fff;
  border-radius: 16px;
  max-width: 1100px;
  width: 100%;
  max-height: calc(100vh - 40px);
  overflow: auto;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
  position: relative;
  transform: scale(.96) translateY(10px);
  transition: transform .2s ease;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: #1f2937;
}
.egtm-overlay.is-open .egtm-modal { transform: scale(1) translateY(0); }

.egtm-close {
  position: absolute; top: 12px; right: 14px;
  background: transparent; border: 0;
  font-size: 30px; line-height: 1;
  color: #9ca3af; cursor: pointer;
  width: 40px; height: 40px; border-radius: 50%;
  transition: background .15s, color .15s;
}
.egtm-close:hover { background: #f3f4f6; color: #111; }

.egtm-header {
  padding: 24px 28px 16px;
  border-bottom: 1px solid #f3f4f6;
}
.egtm-eyebrow {
  font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
  color: #79a500; font-weight: 700; margin-bottom: 6px;
}
.egtm-header h2 {
  margin: 0 0 8px; font-size: 22px; font-weight: 800; color: #111;
}
.egtm-lead {
  margin: 0; font-size: 13.5px; color: #6b7280; line-height: 1.5;
}

.egtm-body {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 0;
}
.egtm-preview-col {
  padding: 24px 20px 24px 28px;
  background: linear-gradient(135deg, #f9fafb 0%, #eff6ff 100%);
  display: flex; align-items: center; justify-content: center;
  min-height: 340px;
}
.egtm-preview {
  width: 100%; max-width: 560px;
  box-shadow: 0 8px 30px rgba(0, 15, 143, .12);
  border-radius: 8px;
}
.egtm-form-col {
  padding: 24px 28px 24px 20px;
  display: flex; flex-direction: column;
}
.egtm-form {
  flex: 1;
  display: flex; flex-direction: column; gap: 14px;
  overflow-y: auto;
  max-height: 400px;
  padding-right: 4px;
}
.egtm-field label {
  display: block; font-size: 11px; text-transform: uppercase;
  letter-spacing: .05em; color: #000F8F; font-weight: 700; margin-bottom: 4px;
}
.egtm-field input {
  width: 100%; padding: 11px 13px;
  border: 2px solid #e5e7eb; border-radius: 8px;
  font-size: 14px; font-weight: 600; color: #111;
  transition: border-color .15s;
  box-sizing: border-box;
}
.egtm-field input:focus { outline: 0; border-color: #79a500; }

.egtm-actions {
  display: flex; gap: 10px; margin-top: 20px;
  padding-top: 16px; border-top: 1px solid #f3f4f6;
}
.egtm-cancel {
  flex: 0 0 auto;
  background: transparent; border: 2px solid #e5e7eb; color: #6b7280;
  padding: 12px 18px; border-radius: 8px; font-size: 13px; font-weight: 700;
  cursor: pointer; transition: all .15s;
}
.egtm-cancel:hover { border-color: #9ca3af; color: #111; }
.egtm-go {
  flex: 1;
  background: linear-gradient(135deg, #79a500, #000F8F);
  color: #fff; border: 0;
  padding: 13px 20px; border-radius: 8px;
  font-size: 14px; font-weight: 800; cursor: pointer;
  transition: filter .15s, transform .15s;
  letter-spacing: .01em;
}
.egtm-go:hover { filter: brightness(1.08); transform: translateY(-1px); }

.egtm-hint {
  margin: 10px 0 0; font-size: 11.5px; color: #9ca3af; text-align: center;
}

.egtm-loader {
  background: #fff; padding: 24px 32px; border-radius: 12px;
  font-size: 14px; color: #111; font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .3);
  font-family: -apple-system, Arial, sans-serif;
}

/* Responsive : mobile → colonnes empilées */
@media (max-width: 780px) {
  .egtm-overlay { padding: 10px; align-items: flex-start; padding-top: 20px; }
  .egtm-modal { border-radius: 12px; max-height: calc(100vh - 20px); }
  .egtm-header { padding: 18px 20px 14px; }
  .egtm-header h2 { font-size: 18px; }
  .egtm-lead { font-size: 12.5px; }
  .egtm-body { grid-template-columns: 1fr; }
  .egtm-preview-col { padding: 16px 16px 8px; min-height: auto; }
  .egtm-form-col { padding: 16px 20px 20px; }
  .egtm-form { max-height: none; }
  .egtm-close { top: 8px; right: 10px; width: 36px; height: 36px; font-size: 26px; }
}
