/* Admin-mediated "Demander ce logement" flow - modal + standalone status page.
   Emerald brand, matching the rest of the site's newer pages. */

.hrq-modal-overlay {
    position: fixed; inset: 0; background: rgba(15, 23, 42, 0.55);
    display: flex; align-items: center; justify-content: center;
    z-index: 10000; padding: 20px;
}
/* Modal chrome matches the old direct-contact "Contacter maintenant"
   modal's dimensions/radius exactly (see e.g. Roche Noir-room.html's
   #enquireModal) - 860px max width, 16px radius, two-column flex row on
   desktop, single column on mobile. */
.hrq-modal {
    background: #fff; border-radius: 16px; max-width: 860px; width: 100%;
    max-height: 92vh; overflow-y: auto; position: relative;
    box-shadow: 0 24px 60px rgba(0,0,0,0.25);
}
.hrq-close-btn {
    position: absolute; top: 16px; right: 16px; z-index: 2;
    width: 36px; height: 36px; border-radius: 50%; border: none;
    background: #f3f4f6; color: #6b7280; cursor: pointer;
    display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.hrq-close-btn:hover { background: #e5e7eb; }
.hrq-close-btn:focus-visible, .hrq-pref-btn:focus-visible, .hrq-submit-btn:focus-visible,
.hrq-input:focus-visible, .hrq-textarea:focus-visible, .hrq-secondary-btn:focus-visible {
    outline: 3px solid #059669; outline-offset: 2px;
}
.hrq-modal-body { padding: 32px 36px; }

/* Two-column desktop layout: grey sidebar (photo card + trust rows) on the
   right, form on the left - matches the old modal's flex-row layout. */
@media (min-width: 700px) {
    .hrq-modal-body { display: flex; flex-direction: row; align-items: stretch; gap: 0; padding: 0; }
    .hrq-modal-left { flex: 1; min-width: 0; padding: 32px 36px; }
    .hrq-sidebar { width: 280px; flex-shrink: 0; }
}
.hrq-modal-left { padding: 32px 36px 8px; }

.hrq-timeline { display: flex; align-items: center; gap: 8px; margin-bottom: 28px; font-size: 13px; color: #9ca3af; }
.hrq-tl-step { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.hrq-tl-dot { width: 26px; height: 26px; border-radius: 50%; background: #e5e7eb; color: #6b7280; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; flex-shrink: 0; }
.hrq-tl-step--active .hrq-tl-dot { background: #10b981; color: #fff; }
.hrq-tl-step--active { color: #111827; }
.hrq-tl-line { flex: 1; height: 2px; background: #e5e7eb; max-width: 60px; }

/* Right sidebar panel - grey background, matches the old modal's
   right-column exactly (photo card on top, trust rows below). Radius only
   on the outer corners since it's a flush panel, not a floating card. */
.hrq-sidebar { background: #f9fafb; border-left: 1px solid #e5e7eb; padding: 32px 24px; display: flex; flex-direction: column; gap: 20px; border-radius: 0 16px 16px 0; }
.hrq-property-card { border-radius: 12px; overflow: hidden; border: 1px solid #e5e7eb; background: #fff; }
.hrq-sidebar-photo { display: block; width: 100%; height: 160px; object-fit: cover; }
.hrq-sidebar-photo--placeholder { display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #10b981, #059669); color: rgba(255,255,255,0.6); font-size: 48px; }
.hrq-property-info { padding: 14px 16px; }
.hrq-property-info h3 { margin: 0 0 4px; font-size: 15.5px; font-weight: 700; color: #111827; }
.hrq-property-loc { margin: 0 0 10px; font-size: 13px; color: #10b981; }
.hrq-property-rentlabel { margin: 0 0 2px; font-size: 12.5px; color: #6b7280; font-weight: 500; }
.hrq-property-price { margin: 0; font-size: 16px; font-weight: 700; color: #111827; }
.hrq-property-price span { font-weight: 400; color: #9ca3af; font-size: 12px; }

.hrq-trust-list { display: flex; flex-direction: column; gap: 13px; }
.hrq-trust-row { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: #374151; }
.hrq-trust-row i { color: #10b981; width: 18px; text-align: center; flex-shrink: 0; }
.hrq-trust-row.hrq-trust-accent { font-weight: 600; color: #10b981; }
.hrq-trust-row.hrq-trust-accent i { color: #10b981; }

.hrq-badge { display: inline-flex; align-items: center; gap: 5px; margin-top: 8px; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.hrq-badge--warn { background: #fef3c7; color: #92400e; }
.hrq-badge--ok { background: #d1fae5; color: #065f46; }
.hrq-badge--muted { background: #f3f4f6; color: #6b7280; }

.hrq-h1 { font-size: 1.5rem; font-weight: 700; color: #111827; margin: 0 0 24px; font-family: 'Poppins', sans-serif; }
.hrq-lead { font-size: 15px; color: #6b7280; line-height: 1.6; margin: 0 0 24px; }
.hrq-ref { font-size: 12px; color: #9ca3af; font-weight: 600; letter-spacing: 0.02em; margin: 0 0 8px; }

/* Floating labels - overlap the input border, matching the old modal's
   inputs exactly (absolute label + white background patch). */
.hrq-field { margin-bottom: 18px; position: relative; }
.hrq-field label, .hrq-label-static {
    position: absolute; top: -9px; left: 12px; background: #fff; padding: 0 4px;
    font-size: 0.75rem; font-weight: 600; color: #6b7280; z-index: 1;
}
.hrq-label-static { position: static; display: block; background: none; padding: 0; margin-bottom: 10px; font-size: 0.85rem; }
.hrq-input, .hrq-select {
    width: 100%; min-height: 48px; padding: 14px; border: 1px solid #d1d5db; border-radius: 8px;
    font-size: 1rem; font-family: 'Inter', sans-serif; box-sizing: border-box; outline: none;
    background: #fff; transition: border-color 0.15s, box-shadow 0.15s;
}
.hrq-select { padding: 14px 10px; }
.hrq-input:focus, .hrq-select:focus { border-color: #10b981; box-shadow: 0 0 0 3px rgba(16,185,129,0.1); }
.hrq-row2 { display: flex; gap: 10px; margin-bottom: 18px; }
.hrq-row2 .hrq-field { margin-bottom: 0; }
.hrq-field--cc { width: 110px; flex-shrink: 0; }
.hrq-field--phone { flex: 1; min-width: 0; }
.hrq-textarea {
    width: 100%; min-height: 90px; padding: 14px; border: 1px solid #d1d5db; border-radius: 8px;
    font-size: 1rem; font-family: 'Inter', sans-serif; resize: none; box-sizing: border-box; outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.hrq-textarea:focus { border-color: #10b981; box-shadow: 0 0 0 3px rgba(16,185,129,0.1); }
.hrq-charcount { display: block; text-align: right; font-size: 0.75rem; color: #9ca3af; margin-top: 4px; }

/* Reach-method picker styled to look like the old modal's checkbox row -
   a small square checkbox indicator drawn via ::before, single-select
   enforced in JS (the backend only accepts one preferredContactMethod). */
.hrq-pref-group { display: flex; gap: 10px; flex-wrap: wrap; }
.hrq-pref-btn {
    flex: 1; min-width: 100px; min-height: 44px; display: flex; align-items: center; justify-content: center;
    gap: 8px; padding: 10px 14px; border: 1px solid #d1d5db; border-radius: 8px; background: #fff;
    color: #374151; font-size: 0.9rem; cursor: pointer; font-family: 'Inter', sans-serif;
}
.hrq-pref-btn::before {
    content: ''; width: 15px; height: 15px; border: 1.5px solid #9ca3af; border-radius: 3px;
    flex-shrink: 0; box-sizing: border-box; background: #fff;
}
.hrq-pref-btn--active { border-color: #10b981; }
.hrq-pref-btn--active::before { background: #10b981; border-color: #10b981; box-shadow: inset 0 0 0 2px #fff; }
.hrq-pref-btn i { display: none; } /* icons dropped to match the old plain-text checkbox look */

.hrq-consent-row { display: flex; align-items: flex-start; gap: 8px; font-size: 0.8rem; color: #6b7280; margin: 0 0 18px; cursor: pointer; line-height: 1.5; }
.hrq-consent-row input { width: 16px; height: 16px; margin-top: 2px; accent-color: #10b981; flex-shrink: 0; }
.hrq-consent-row a { color: #10b981; text-decoration: underline; }
.hrq-consent-row--highlight { background: #ecfdf5; border: 1px solid #a7f3d0; border-radius: 12px; padding: 14px 16px; }

.hrq-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; border-radius: 10px; padding: 12px 14px; font-size: 13px; margin-bottom: 16px; }

.hrq-submit-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 48px; padding: 15px; background: #10b981; color: #fff; border: none; border-radius: 10px; font-size: 1.05rem; font-weight: 700; cursor: pointer; font-family: 'Poppins', sans-serif; transition: background 0.15s; }
.hrq-submit-btn:hover:not(:disabled) { background: #059669; }
.hrq-submit-btn:disabled { opacity: 0.7; cursor: not-allowed; }
.hrq-submit-btn--link { text-decoration: none; margin-bottom: 10px; }
.hrq-secondary-btn { display: block; text-align: center; margin-top: 12px; color: #059669; font-weight: 600; font-size: 14px; text-decoration: none; }
.hrq-secondary-btn:hover { text-decoration: underline; }
.hrq-secure-note { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12px; color: #9ca3af; margin-top: 14px; }

.hrq-progress { display: flex; flex-direction: column; gap: 16px; margin: 24px 0; padding-left: 4px; }
.hrq-progress--compact { margin: 20px 0; }
.hrq-progress-step { display: flex; align-items: flex-start; gap: 14px; position: relative; }
.hrq-progress-step:not(:last-child)::after { content: ''; position: absolute; left: 15px; top: 34px; width: 2px; height: calc(100% + 2px); background: #e5e7eb; }
.hrq-progress-step--done:not(:last-child)::after { background: #10b981; }
.hrq-progress-icon { width: 32px; height: 32px; border-radius: 50%; background: #f3f4f6; color: #9ca3af; display: flex; align-items: center; justify-content: center; font-size: 13px; flex-shrink: 0; z-index: 1; }
.hrq-progress-step--done .hrq-progress-icon { background: #10b981; color: #fff; }
.hrq-progress-step--active .hrq-progress-icon { background: #d1fae5; color: #059669; border: 2px solid #10b981; }
.hrq-progress-step b { display: block; font-size: 14px; color: #111827; }
.hrq-progress-step p { margin: 2px 0 0; font-size: 12px; color: #9ca3af; }

.hrq-info-box { display: flex; align-items: flex-start; gap: 10px; background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 12px; padding: 14px 16px; font-size: 13px; color: #166534; line-height: 1.6; margin: 20px 0; }
.hrq-info-box i { color: #10b981; margin-top: 2px; }
.hrq-info-box--ok { background: #ecfdf5; border-color: #a7f3d0; }

.hrq-result-icon { width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 28px; margin: 0 auto 20px; }
.hrq-result-icon--ok { background: #d1fae5; color: #059669; }
.hrq-result-icon--muted { background: #f3f4f6; color: #9ca3af; }
.hrq-modal-body:has(.hrq-result-icon) .hrq-h1,
.hrq-modal-body:has(.hrq-result-icon) .hrq-lead,
.hrq-modal-body:has(.hrq-result-icon) .hrq-ref { text-align: center; }

.hrq-loading { text-align: center; padding: 60px 20px; color: #9ca3af; font-size: 15px; }

/* ---- Mobile: genuine full-screen app-like interface, not a shrunk modal ---- */
@media (max-width: 699px) {
    .hrq-modal-overlay { padding: 0; }
    .hrq-modal { border-radius: 0; max-height: 100vh; height: 100vh; width: 100vw; max-width: 100vw; display: flex; flex-direction: column; }
    .hrq-modal-body { padding: 20px 18px calc(24px + env(safe-area-inset-bottom, 0px)); flex: 1; overflow-y: auto; }
    .hrq-modal-left { padding: 0; }
    .hrq-close-btn { top: max(14px, env(safe-area-inset-top, 0px)); }
    .hrq-h1 { font-size: 21px; }
    .hrq-sidebar { margin-top: 18px; border-radius: 12px; border-left: 1px solid #e5e7eb; }
    .hrq-input, .hrq-textarea, .hrq-pref-btn, .hrq-submit-btn { min-height: 48px; }
}

/* Standalone status page shell */
.hrq-page-wrap { max-width: 640px; margin: 0 auto; padding: 40px 20px 80px; }
.hrq-page-header { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid #e5e7eb; }
.hrq-page-header .logo { font-family: 'Poppins', sans-serif; font-weight: 800; font-size: 1.2rem; background: linear-gradient(135deg, #10b981, #059669); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; text-decoration: none; }
