/* ═══════════════════════════════════════════
   RECHERCHE AVOCAT — Mobile Responsiveness
   Section E : Client-side improvements
   ═══════════════════════════════════════════ */

/* ─── Touch targets (WCAG 2.5.5 : min 44×44px) ── */
@media (max-width: 768px) {

  /* Tous les boutons */
  .btn {
    min-height: 48px;
    min-width: 48px;
    font-size: 1rem; /* Évite le zoom iOS sur tap */
    padding: 0.75rem 1.25rem;
  }

  .btn--sm {
    min-height: 44px;
    padding: 0.625rem 1rem;
  }

  /* Domain buttons — grille 2 colonnes */
  .domain-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3);
  }

  .domain-btn {
    min-height: 64px;
    padding: var(--space-3) var(--space-2);
    flex-direction: column;
    gap: var(--space-1);
  }

  .domain-btn__icon { font-size: 1.5rem; }
  .domain-btn__label { font-size: var(--text-xs); }

  /* Urgence grid — colonne unique */
  .urgence-grid {
    grid-template-columns: 1fr;
    gap: var(--space-2);
  }

  .urgence-btn {
    min-height: 48px;
    justify-content: flex-start;
    padding: var(--space-3) var(--space-4);
  }

  /* Chips — plus grandes */
  .chip {
    min-height: 40px;
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
  }

  /* ─── Form fields ─────────────────────── */

  .field-input,
  .field-select,
  .field-textarea {
    min-height: 48px;
    font-size: 1rem; /* CRITIQUE : évite zoom iOS */
    padding: 0.75rem 1rem;
  }

  .field-textarea {
    min-height: 140px;
  }

  .fields-row {
    flex-direction: column;
    gap: var(--space-3);
  }

  /* OTP field */
  .otp-field__row {
    flex-direction: column;
    gap: var(--space-3);
  }

  .otp-field__row .btn {
    width: 100%;
    justify-content: center;
  }

  .otp-code-row {
    flex-direction: column;
    gap: var(--space-3);
  }

  .otp-code-row .btn {
    width: 100%;
    justify-content: center;
  }

  /* ─── Wizard card ─────────────────────── */

  .wizard-card {
    border-radius: var(--radius-lg);
    padding: var(--space-5) var(--space-4);
    margin: 0 -4px; /* Edge-to-edge sur très petits écrans */
  }

  .wizard__title {
    font-size: var(--text-xl);
  }

  .wizard__nav {
    flex-direction: column-reverse;
    gap: var(--space-3);
  }

  .wizard__nav .btn {
    width: 100%;
    justify-content: center;
  }

  .wizard__nav--submit {
    flex-direction: column-reverse;
  }

  /* ─── Progress bar meta ───────────────── */

  .wizard__progress-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-1);
  }

  /* ─── Step label ──────────────────────── */

  .wizard__step-label {
    font-size: var(--text-xs);
  }

  /* ─── Header ──────────────────────────── */

  .header__inner {
    padding: 0 var(--space-4);
  }

  .nav {
    display: none; /* Masqué jusqu'à ouverture burger */
  }

  .nav--open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0; right: 0;
    background: var(--white);
    padding: var(--space-4) var(--space-6) var(--space-6);
    box-shadow: var(--shadow-md);
    border-top: 1px solid var(--neutral-100);
    z-index: 99;
    gap: var(--space-4);
  }

  .nav--open .nav__link {
    font-size: var(--text-base);
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  .header__actions .btn--ghost {
    display: none; /* Se connecter caché sur mobile */
  }

  /* ─── Hero ────────────────────────────── */

  .hero {
    padding: var(--space-12) 0 var(--space-6);
  }

  .hero__inner {
    gap: var(--space-8);
  }

  .hero__title {
    font-size: var(--text-3xl);
  }

  .hero__trust {
    gap: var(--space-2);
  }

  .trust-badge {
    font-size: var(--text-xs);
    padding: var(--space-1) var(--space-3);
  }

  /* ─── RGPD notice ─────────────────────── */

  .rgpd-notice {
    font-size: var(--text-xs);
  }

  /* ─── Submit button ───────────────────── */

  #submitBtn {
    font-size: var(--text-base);
    padding: var(--space-4) var(--space-6);
  }

  /* ─── Toast ───────────────────────────── */

  .toast {
    left: var(--space-4);
    right: var(--space-4);
    transform: translateY(80px);
    white-space: normal;
    text-align: center;
  }

  .toast--visible {
    transform: translateY(0);
  }
}

/* ─── Très petits écrans (< 380px) ─────── */
@media (max-width: 380px) {

  .wizard-card {
    padding: var(--space-4) var(--space-3);
  }

  .domain-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2);
  }

  .domain-btn__label {
    font-size: 0.65rem;
  }

  .hero__title {
    font-size: var(--text-2xl);
  }
}

/* ─── Tablette (768px – 1024px) ─────────── */
@media (min-width: 769px) and (max-width: 1024px) {

  .domain-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .hero__inner {
    grid-template-columns: 1fr;
  }

  .wizard-card {
    max-width: 600px;
    margin: 0 auto;
  }
}

/* ─── Mobile landscape ───────────────────── */
@media (max-height: 600px) and (orientation: landscape) {

  .hero {
    padding: var(--space-6) 0;
  }

  .wizard-card {
    padding: var(--space-4);
  }

  .wizard__title {
    font-size: var(--text-lg);
    margin-bottom: var(--space-3);
  }
}
