/* ============================================================
   SMAP — Formulaire Prospect
   Style principal
   Design : Luxury Real Estate · Tablette-first
   ============================================================ */

/* ──────────────────────────────────────────────────────────────
   1. VARIABLES & RESET
────────────────────────────────────────────────────────────── */
:root {
  /* Palette */
  --accent:          #CC9C44;       /* or  */
  --accent-dark:     #CC9C44;
  --accent-light:    #F5EDD9;
  --accent-subtle:   #FFF8EC;

  --text-primary:    #1A1A1A;
  --text-secondary:  #5C5C6E;
  --text-muted:      #9B9BAD;
  --text-inverse:    #FFFFFF;

  --bg-app:          #F4F3F0;
  --bg-card:         #FFFFFF;
  --bg-header:       #1A1A1A;

  --border:          #E8E6E1;
  --border-focus:    #C9A96E;
  --border-error:    #D95C5C;

  --error-text:      #C04545;
  --error-bg:        #FDF3F3;

  --success:         #3DAA6A;

  --shadow-sm:       0 2px 8px rgba(0,0,0,0.05);
  --shadow-md:       0 4px 24px rgba(0,0,0,0.08);
  --shadow-lg:       0 16px 56px rgba(0,0,0,0.14);

  /* Typography */
  --font-display:    'DM Serif Display', Georgia, serif;
  --font-body:       'DM Sans', system-ui, sans-serif;

  /* Spacing */
  --r-card:          16px;
  --r-input:         10px;
  --r-btn:           10px;

  /* Transitions */
  --ease:            cubic-bezier(.4,0,.2,1);
  --duration:        220ms;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--bg-white);
  min-height: 100dvh;
}

/* ──────────────────────────────────────────────────────────────
   2. HEADER
────────────────────────────────────────────────────────────── */
.app-header {
  background: var(--bg-header);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 0 rgba(255,255,255,0.06);
}

.header-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* Brand */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 0.06em;
  color: var(--text-inverse);
  line-height: 1;
}

.brand-tagline {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  line-height: 1;
}

/* Header meta */
.header-meta {
  display: flex;
  align-items: center;
  gap: 16px;
}

.session-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  font-weight: 400;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 2px rgba(61,170,106,0.25);
  animation: pulse 2.5s ease infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}

.header-date {
  font-size: 13px;
  color: rgba(255,255,255,0.45);
  font-weight: 300;
  letter-spacing: 0.01em;
}

/* ──────────────────────────────────────────────────────────────
   3. MAIN LAYOUT
────────────────────────────────────────────────────────────── */
.app-main {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 32px 80px;
}

/* Page title */
.page-title {
  animation: fadeSlideUp 0.5s var(--ease) both;
}

.page-title h1 {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 400;
  color: var(--text-primary);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

.page-title p {
  font-size: 15px;
  color: var(--text-secondary);
  font-weight: 300;
}

/* ──────────────────────────────────────────────────────────────
   4. FORM CARDS
────────────────────────────────────────────────────────────── */
.form-card {
  background: var(--bg-card);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  margin-bottom: 20px;
  overflow: hidden;
  animation: fadeSlideUp 0.5s var(--ease) both;
}

/* Stagger animation per card */
.form-card[data-section="1"] { animation-delay: 0.08s; }
.form-card[data-section="2"] { animation-delay: 0.15s; }
.form-card[data-section="3"] { animation-delay: 0.22s; }
.form-card[data-section="4"] { animation-delay: 0.29s; }

/* Card header */
.card-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px 32px;
  border-bottom: 1px solid var(--border);
  background: var(--accent-subtle);
}

.section-number {
  font-family: var(--font-display);
  font-size: 32px;
  color: var(--accent);
  line-height: 1;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.section-info h2 {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.section-info p {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
  font-weight: 300;
}

/* Card body */
.card-body {
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ──────────────────────────────────────────────────────────────
   5. FIELD LAYOUT
────────────────────────────────────────────────────────────── */
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

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

.field-group.full-width {
  grid-column: 1 / -1;
}

/* ──────────────────────────────────────────────────────────────
   6. LABELS
────────────────────────────────────────────────────────────── */
.field-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
  user-select: none;
}

.label-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--text-muted);
}

.required-star {
  color: var(--accent);
  font-size: 14px;
  line-height: 1;
}

.optional-tag {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-muted);
  background: var(--bg-app);
  padding: 1px 6px;
  border-radius: 4px;
  letter-spacing: 0.02em;
  margin-left: 2px;
}

/* ──────────────────────────────────────────────────────────────
   7. INPUTS
────────────────────────────────────────────────────────────── */
.field-input {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  background: var(--bg-white) !important;
  border: 1.5px solid var(--border);
  border-radius: var(--r-input);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--duration) var(--ease),
              background var(--duration) var(--ease),
              box-shadow var(--duration) var(--ease);
  -webkit-appearance: none;
  appearance: none;
}

.field-input::placeholder {
  color: var(--text-muted);
  font-weight: 300;
}

.field-input:hover {
  border-color: #CCC9C0;
  background: #FAFAF8;
}

.field-input:focus {
  border-color: var(--border-focus);
  background: var(--bg-card);
  box-shadow: 0 0 0 3px rgba(201,169,110,0.15);
}

/* Error state */
.field-group.has-error .field-input,
.field-group.has-error .input-with-prefix,
.field-group.has-error .input-with-suffix {
  border-color: var(--border-error) !important;
  background: var(--error-bg) !important;
  box-shadow: 0 0 0 3px rgba(217,92,92,0.12) !important;
}

/* Valid state */
.field-group.is-valid .field-input {
  border-color: #6BC87A;
}

/* ──────────────────────────────────────────────────────────────
   8. DATE INPUT
────────────────────────────────────────────────────────────── */
input[type="date"] {
  cursor: pointer;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  opacity: 0.4;
  cursor: pointer;
  filter: sepia(0.5) hue-rotate(320deg);
}

/* ──────────────────────────────────────────────────────────────
   9. SELECT
────────────────────────────────────────────────────────────── */
.select-wrapper {
  position: relative;
}

.field-select {
  padding-right: 44px;
  cursor: pointer;
}

.select-arrow {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  color: var(--text-muted);
  pointer-events: none;
  transition: transform var(--duration) var(--ease);
}

.select-wrapper:focus-within .select-arrow {
  transform: translateY(-50%) rotate(180deg);
  color: var(--accent);
}

/* ──────────────────────────────────────────────────────────────
   10. INPUT WITH PREFIX / SUFFIX
────────────────────────────────────────────────────────────── */
.input-with-prefix,
.input-with-suffix {
  display: flex;
  align-items: stretch;
  border: 1.5px solid var(--border);
  border-radius: var(--r-input);
  overflow: hidden;
  background: var(--bg-white);
  transition: border-color var(--duration) var(--ease),
              box-shadow var(--duration) var(--ease),
              background var(--duration) var(--ease);
}

.input-with-prefix:hover,
.input-with-suffix:hover {
  border-color: #CCC9C0;
  background: #FAFAF8;
}

.input-with-prefix:focus-within,
.input-with-suffix:focus-within {
  border-color: var(--border-focus);
  background: var(--bg-card);
  box-shadow: 0 0 0 3px rgba(201,169,110,0.15);
}

.input-prefix,
.input-suffix {
 width: 100%;
    height: 52px;
    padding: 0 12px;
    background: var(--bg-app);
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 400;
    color: var(--text-primary);
    outline: none;
    transition: border-color var(--duration) var(--ease), background var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
    -webkit-appearance: none;
    appearance: none;
    border: none;
    width: 25%;
}

.input-prefix {
  border-right: 1.5px solid var(--border);
}

.input-suffix {
  border-left: 1.5px solid var(--border);
      display: flex;
    align-items: center;
}

.field-input.has-prefix,
.field-input.has-suffix {
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none !important;
}

/* Fix for nested error state */
.field-group.has-error .input-with-prefix .field-input,
.field-group.has-error .input-with-suffix .field-input {
  border-color: transparent !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* ──────────────────────────────────────────────────────────────
   11. CARD SELECT (Type de bien)
────────────────────────────────────────────────────────────── */
.card-select-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

/* Hidden radio */
.card-radio {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.card-option {
  position: relative;
  cursor: pointer;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: var(--bg-app);
  transition: border-color var(--duration) var(--ease),
              background var(--duration) var(--ease),
              box-shadow var(--duration) var(--ease),
              transform var(--duration) var(--ease);
  overflow: hidden;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.card-option:hover {
  border-color: var(--accent);
  background: var(--accent-subtle);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.card-option:active {
  transform: scale(0.98);
}

.card-option-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px 16px;
  text-align: center;
}

.card-icon {
  width: 40px;
  height: 40px;
  color: var(--text-secondary);
  transition: color var(--duration) var(--ease);
  flex-shrink: 0;
}

.card-icon svg {
  width: 100%;
  height: 100%;
}

.card-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.3;
  transition: color var(--duration) var(--ease);
}

/* Check indicator (hidden by default) */
.card-check {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 20px;
  height: 20px;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity var(--duration) var(--ease),
              transform var(--duration) var(--ease);
}

/* Selected state */
.card-radio:checked + .card-option-inner + .card-check,
.card-option:has(.card-radio:checked) .card-check {
  opacity: 1;
  transform: scale(1);
}

.card-option:has(.card-radio:checked) {
  border-color: var(--accent);
  background: var(--accent-light);
  box-shadow: 0 0 0 3px rgba(201,169,110,0.2);
}

.card-option:has(.card-radio:checked) .card-icon {
  color: var(--accent-dark);
}

.card-option:has(.card-radio:checked) .card-label {
  color: var(--accent-dark);
  font-weight: 600;
}

/* ──────────────────────────────────────────────────────────────
   12. ERROR MESSAGES
────────────────────────────────────────────────────────────── */
.field-error {
  font-size: 12px;
  color: var(--error-text);
  font-weight: 400;
  min-height: 16px;
  display: flex;
  align-items: center;
  gap: 4px;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity var(--duration) var(--ease),
              transform var(--duration) var(--ease);
}

.field-error:not(:empty) {
  opacity: 1;
  transform: translateY(0);
}

.field-error::before {
  content: "⚠";
  font-size: 11px;
}

/* ──────────────────────────────────────────────────────────────
   13. CONSENT
────────────────────────────────────────────────────────────── */
.consent-card {
  border-color: var(--accent-light);
  background: var(--accent-subtle);
}

.consent-card .card-body {
  padding: 24px 32px;
}

.consent-label {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* Hidden checkbox */
.consent-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

/* Custom checkbox */
.consent-checkbox-wrapper {
  flex-shrink: 0;
  margin-top: 2px;
}

.consent-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: 2px solid var(--border);
  border-radius: 6px;
  background: var(--bg-card);
  transition: border-color var(--duration) var(--ease),
              background var(--duration) var(--ease);
}

.consent-input:checked ~ .consent-label .consent-box,
.consent-label:has(.consent-input:checked) .consent-box {
  background: var(--accent);
  border-color: var(--accent);
}

.consent-check-icon {
  width: 14px;
  height: 14px;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity var(--duration) var(--ease),
              transform var(--duration) var(--ease);
}

.consent-input:checked ~ .consent-label .consent-check-icon,
.consent-label:has(.consent-input:checked) .consent-check-icon {
  opacity: 1;
  transform: scale(1);
}

.consent-text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  font-weight: 300;
}

.consent-link {
  color: var(--accent-dark);
  text-decoration: underline;
  text-decoration-color: rgba(168,136,78,0.35);
  text-underline-offset: 3px;
  font-weight: 500;
  margin-left: 4px;
  transition: color var(--duration) var(--ease);
}

.consent-link:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

/* ──────────────────────────────────────────────────────────────
   14. FORM ACTIONS
────────────────────────────────────────────────────────────── */
.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 8px;
  padding: 8px 0;
  animation: fadeSlideUp 0.5s var(--ease) 0.36s both;
}

/* ──────────────────────────────────────────────────────────────
   15. BUTTONS
────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 52px;
  padding: 0 28px;
  border: none;
  border-radius: var(--r-btn);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
  cursor: pointer;
  outline: none;
  transition: background var(--duration) var(--ease),
              color var(--duration) var(--ease),
              box-shadow var(--duration) var(--ease),
              transform var(--duration) var(--ease);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  position: relative;
  overflow: hidden;
}

.btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.btn:active {
  transform: scale(0.97);
}

/* Primary */
.btn-primary {
  background: var(--accent);
  color: var(--text-inverse);
  box-shadow: 0 2px 8px rgba(26,26,26,0.2);
}

.btn-primary:hover {
  background: #2D2D2D;
  box-shadow: 0 4px 16px rgba(26,26,26,0.25);
}

.btn-primary:focus-visible {
  box-shadow: 0 0 0 3px rgba(26,26,26,0.2);
}

/* Secondary */
.btn-secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
}

.btn-secondary:hover {
  background: var(--bg-app);
  border-color: #CCC9C0;
  color: var(--text-primary);
}

/* Loading state */
.btn-loader {
  display: none;
}

.btn-loader svg {
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.btn.is-loading .btn-text { display: none; }
.btn.is-loading .btn-loader { display: flex; }
.btn.is-loading {
  pointer-events: none;
  opacity: 0.75;
}

/* ──────────────────────────────────────────────────────────────
   16. SUCCESS OVERLAY
────────────────────────────────────────────────────────────── */
.success-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20,20,20,0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease);
}

.success-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.success-card {
  background: var(--bg-card);
  border-radius: 20px;
  padding: 48px 40px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-lg);
  transform: translateY(24px) scale(0.96);
  transition: transform 0.35s var(--ease);
}

.success-overlay.is-visible .success-card {
  transform: translateY(0) scale(1);
}

.success-icon-wrap {
  width: 72px;
  height: 72px;
  margin: 0 auto 24px;
}

.success-icon-wrap svg {
  width: 100%;
  height: 100%;
}

.success-check {
  stroke-dasharray: 32;
  stroke-dashoffset: 32;
  transition: stroke-dashoffset 0.5s ease 0.3s;
}

.success-overlay.is-visible .success-check {
  stroke-dashoffset: 0;
}

.success-card h3 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 400;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.success-card p {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 300;
  margin-bottom: 20px;
}

.success-ref {
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg-app);
  border-radius: 8px;
  padding: 8px 14px;
  font-family: monospace;
  letter-spacing: 0.06em;
  margin-bottom: 28px;
  min-height: 34px;
}

/* ──────────────────────────────────────────────────────────────
   17. MODAL (Conditions)
────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20,20,20,0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 400;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s var(--ease);
}

.modal-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: var(--bg-card);
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-width: 680px;
  max-height: 80dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.35s var(--ease);
  box-shadow: var(--shadow-lg);
}

.modal-overlay.is-visible .modal-card {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.modal-header h3 {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 400;
}

.modal-close {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: background var(--duration) var(--ease);
}

.modal-close:hover {
  background: var(--bg-app);
}

.modal-close svg {
  width: 18px;
  height: 18px;
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
  font-size: 14px;
  line-height: 1.75;
  color: var(--text-secondary);
  font-weight: 300;
}

.modal-body p + p { margin-top: 12px; }
.modal-body strong { color: var(--text-primary); font-weight: 500; }

.modal-body ul {
  padding-left: 20px;
  margin: 8px 0 12px;
}

.modal-body li {
  margin-bottom: 4px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  flex-shrink: 0;
}

/* ──────────────────────────────────────────────────────────────
   18. ANIMATIONS
────────────────────────────────────────────────────────────── */
@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ──────────────────────────────────────────────────────────────
   19. SCROLLBAR
────────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ──────────────────────────────────────────────────────────────
   20. RESPONSIVE — Tablette portrait / petits écrans
────────────────────────────────────────────────────────────── */
@media (max-width: 760px) {
  .header-inner { padding: 14px 20px; }

  .app-main { padding: 28px 20px 64px; }

  .page-title h1 { font-size: 27px; }

  .card-header { padding: 20px 24px; }
  .card-body    { padding: 20px 24px; }

  .field-row { grid-template-columns: 1fr; }

  .card-select-grid {
    grid-template-columns: 1fr;
  }

  .consent-card .card-body { padding: 20px 24px; }

  .form-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .btn { width: 100%; }
}

@media (max-width: 480px) {
  .header-date,
  .session-badge { display: none; }

  .brand-tagline { display: none; }

  .section-number { font-size: 24px; }
}

/* ============================================================
   AJOUTS v2 — Type de bien dynamique · Type commercial · Commentaire
   ============================================================ */

/* ──────────────────────────────────────────────────────────────
   TYPE BIEN — placeholder état vide
────────────────────────────────────────────────────────────── */
.type-bien-placeholder {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 20px;
  background: var(--bg-app);
  border: 1.5px dashed var(--border);
  border-radius: 12px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 300;
  font-style: italic;
  transition: opacity 0.25s var(--ease);
}

.type-bien-placeholder svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  opacity: 0.5;
}

/* ──────────────────────────────────────────────────────────────
   TYPE BIEN — grille adaptative (1→4 cartes)
────────────────────────────────────────────────────────────── */
.card-select-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

/* Transition d'apparition de la grille */
.card-select-grid.is-entering {
  animation: fadeSlideUp 0.3s var(--ease) both;
}

/* ──────────────────────────────────────────────────────────────
   TYPE COMMERCIAL — apparition animée
────────────────────────────────────────────────────────────── */
#fg-type_commercial {
  transition: opacity 0.25s var(--ease);
}

#fg-type_commercial.is-entering {
  animation: fadeSlideUp 0.3s var(--ease) both;
}

/* ──────────────────────────────────────────────────────────────
   TEXTAREA — Commentaire
────────────────────────────────────────────────────────────── */
.textarea-wrapper {
  display: flex;
  flex-direction: column;
  border: 1.5px solid var(--border);
  border-radius: var(--r-input);
  background: var(--bg-app);
  overflow: hidden;
  transition: border-color var(--duration) var(--ease),
              box-shadow var(--duration) var(--ease),
              background var(--duration) var(--ease);
}

.textarea-wrapper:hover {
  border-color: #CCC9C0;
  background: #FAFAF8;
}

.textarea-wrapper:focus-within {
  border-color: var(--border-focus);
  background: var(--bg-card);
  box-shadow: 0 0 0 3px rgba(201,169,110,0.15);
}

.field-textarea {
  width: 100%;
  min-height: 130px;
  padding: 16px;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  color: var(--text-primary);
  line-height: 1.6;
  resize: vertical;
  -webkit-appearance: none;
  appearance: none;
}

.field-textarea::placeholder {
  color: var(--text-muted);
  font-weight: 300;
  font-style: italic;
}

.textarea-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 6px 14px 10px;
  border-top: 1px solid var(--border);
  background: var(--bg-app);
}

.char-counter {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  transition: color var(--duration) var(--ease);
}

.char-counter.is-near-limit  { color: #E08A2A; }
.char-counter.is-at-limit    { color: var(--error-text); font-weight: 600; }

/* ──────────────────────────────────────────────────────────────
   SECTION 5 — décalage d'animation consentement
────────────────────────────────────────────────────────────── */
.form-card[data-section="4"] { animation-delay: 0.29s; }
.form-card[data-section="5"] { animation-delay: 0.36s; }

/* ──────────────────────────────────────────────────────────────
   RESPONSIVE — textarea
────────────────────────────────────────────────────────────── */
@media (max-width: 760px) {
  .field-textarea { min-height: 110px; }
  .card-select-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .card-select-grid { grid-template-columns: 1fr 1fr; }
}
