/* ============================================================
   aideTAL.ai — Styles
   ============================================================ */
:root {
  --primary: #1e3a8a;          /* bleu marine TAL/justice */
  --primary-dark: #1e2960;
  --primary-soft: #dbeafe;
  --accent: #f59e0b;           /* ambre — pour CTA */
  --accent-dark: #d97706;
  --success: #16a34a;
  --danger: #dc2626;
  --text: #0f172a;
  --text-mid: #475569;
  --text-mute: #94a3b8;
  --line: #e2e8f0;
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --bg-dark: #1e293b;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,.08);
  --shadow-lg: 0 12px 32px rgba(0,0,0,.1);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; overflow-x: hidden; max-width: 100%; }
img, video, iframe, table, pre { max-width: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  font-size: 16px;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ─── TOPBAR ─── */
.topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;  /* logo (gauche) | nav (centré pile au milieu) | right (droite) */
  align-items: center;
  gap: 18px;
  padding: 14px 32px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 100;
}
.topbar > .logo-link    { justify-self: start;  grid-column: 1; }
.topbar > .nav-public   { justify-self: center; grid-column: 2; }
.topbar > .topbar-right { justify-self: end;    grid-column: 3; }
.logo-link { text-decoration: none; }
.logo-text { font-size: 22px; color: var(--primary); font-weight: 600; letter-spacing: -.5px; }
.logo-text strong { font-weight: 800; }
.logo-dot { color: var(--accent); font-weight: 700; }

.nav-public { display: flex; gap: 6px; }
.nav-public a {
  padding: 8px 14px; color: var(--text-mid); font-weight: 500;
  border-radius: 6px; transition: all .15s;
}
.nav-public a:hover { color: var(--primary); background: var(--bg-soft); text-decoration: none; }

.topbar-right { display: flex; gap: 12px; align-items: center; }
.lang-switch { display: flex; gap: 2px; font-size: 13px; }
.lang-switch a {
  padding: 5px 9px; color: var(--text-mute); border-radius: 4px;
}
.lang-switch a.active { background: var(--primary-soft); color: var(--primary-dark); font-weight: 600; }

/* ─── BUTTONS ─── */
.btn-primary, .btn-ghost {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 11px 22px; border-radius: 8px; font-weight: 600; font-size: 15px;
  text-decoration: none; cursor: pointer; border: 2px solid transparent;
  transition: all .15s;
}
.btn-primary {
  background: var(--accent); color: #fff; box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  background: var(--accent-dark); transform: translateY(-1px); text-decoration: none;
  box-shadow: var(--shadow-md);
}
.btn-ghost {
  background: #fff; color: var(--primary); border-color: var(--primary);
}
.btn-ghost:hover { background: var(--primary); color: #fff; text-decoration: none; }
.btn-lg { padding: 14px 28px; font-size: 16px; }

/* ─── HERO ─── */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #eff6ff 0%, #ffffff 50%, #fef3c7 100%);
  padding: 80px 24px 100px; text-align: center;
}
.hero-inner { max-width: 880px; margin: 0 auto; position: relative; z-index: 2; }
.hero-pre {
  display: inline-block; padding: 5px 14px;
  background: var(--primary); color: #fff;
  border-radius: 999px; font-size: 13px; font-weight: 600;
  letter-spacing: .5px; text-transform: uppercase;
  margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(32px, 5.5vw, 56px); font-weight: 800; line-height: 1.1;
  color: var(--text); margin: 0 0 18px; letter-spacing: -1px;
}
.hero .subtitle {
  font-size: clamp(16px, 2vw, 19px); color: var(--text-mid);
  max-width: 720px; margin: 0 auto 32px; line-height: 1.6;
}
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 28px; }
.hero-trust { font-size: 13px; color: var(--text-mute); margin: 0; }
.hero-decor {
  position: absolute; top: -100px; right: -200px;
  width: 500px; height: 500px; border-radius: 50%;
  background: radial-gradient(circle, rgba(30,58,138,.08), transparent 70%);
  z-index: 1;
}

/* ─── SECTIONS ─── */
.section { padding: 80px 24px; }
.section-soft { background: var(--bg-soft); }
.section-dark { background: var(--primary); color: #fff; }
.section-dark .section-title { color: #fff; }
.section-title {
  text-align: center; font-size: clamp(26px, 3.5vw, 38px);
  font-weight: 800; color: var(--text); margin: 0 0 50px;
  letter-spacing: -.5px;
}

/* ─── GRID 3 (pain points) ─── */
.grid-3 {
  display: grid; gap: 24px; max-width: 1100px; margin: 0 auto;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.pain-card {
  background: #fff; padding: 28px 24px; border-radius: 12px;
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.pain-card h3 { margin: 0 0 12px; font-size: 19px; color: var(--text); }
.pain-card p { color: var(--text-mid); margin: 0; }

/* ─── STEPS (comment ça marche) ─── */
.steps {
  display: grid; gap: 32px; max-width: 1100px; margin: 0 auto;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.step { text-align: center; padding: 0 16px; }
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--primary); color: #fff;
  font-size: 24px; font-weight: 800;
  margin-bottom: 18px;
}
.step h3 { font-size: 19px; margin: 0 0 10px; color: var(--text); }
.step p { color: var(--text-mid); margin: 0; }

/* ─── CASES GRID ─── */
.cases-grid {
  display: grid; gap: 20px; max-width: 1200px; margin: 0 auto;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
@media (min-width: 900px) {
  .cases-grid { grid-template-columns: repeat(4, 1fr); }
  .cases-grid.cases-grid-3 { grid-template-columns: repeat(3, 1fr); max-width: 980px; }
}
.case-card {
  background: #fff; padding: 28px 24px; border-radius: 12px;
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  transition: all .2s; display: flex; flex-direction: column;
}
.case-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--accent); }
.case-icon { font-size: 38px; margin-bottom: 12px; }
.case-card h3 { margin: 0 0 10px; font-size: 17px; color: var(--text); }
.case-card p { color: var(--text-mid); margin: 0 0 20px; font-size: 14.5px; flex: 1; }
.case-cta { color: var(--accent-dark); font-weight: 600; font-size: 14px; }
.cases-note {
  text-align: center; color: var(--text-mute); font-size: 14px;
  margin: 40px 0 0; max-width: 700px; margin-left: auto; margin-right: auto;
}

/* ─── PRICING ─── */
.pricing-grid {
  display: grid; gap: 24px; max-width: 1100px; margin: 0 auto;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.pricing-card {
  background: #fff; padding: 36px 28px; border-radius: 14px;
  border: 2px solid var(--line); text-align: center;
  position: relative;
}
.pricing-card.pricing-featured {
  border-color: var(--accent); transform: scale(1.03);
  box-shadow: var(--shadow-lg);
}
.pricing-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #fff; padding: 4px 14px;
  border-radius: 999px; font-size: 12px; font-weight: 700;
  letter-spacing: .5px; text-transform: uppercase;
}
.pricing-card h3 { margin: 0 0 14px; font-size: 18px; color: var(--text); }
.pricing-price {
  font-size: 38px; font-weight: 800; color: var(--primary);
  margin: 0 0 16px; letter-spacing: -1px;
}
.pricing-card p { color: var(--text-mid); margin: 0 0 24px; min-height: 60px; }

/* ─── TESTIMONIALS ─── */
.section-subtitle {
  text-align: center; color: var(--text-mid);
  margin: -30px 0 40px; font-size: 15px;
}
.testi-grid {
  display: grid; gap: 20px; max-width: 1200px; margin: 0 auto;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
.testi-card {
  background: #fff; padding: 28px 26px; border-radius: 12px;
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
}
.testi-stars {
  color: var(--accent); font-size: 18px; letter-spacing: 2px;
  margin-bottom: 14px;
}
.testi-stars .star-empty { color: #d1d5db; }
.testi-text {
  color: var(--text); font-size: 14.5px; line-height: 1.6;
  margin: 0 0 18px; flex: 1; font-style: italic;
}
.testi-author {
  color: var(--text-mid); font-size: 13.5px; font-weight: 600;
}
.testi-author span { color: var(--text-mute); font-weight: 400; }

/* ─── CTA FINAL ─── */
.cta-final { text-align: center; max-width: 720px; margin: 0 auto; }
.cta-final h2 {
  font-size: clamp(28px, 4vw, 40px); color: #fff;
  margin: 0 0 18px; font-weight: 800;
}
.cta-final p { color: rgba(255,255,255,.85); font-size: 17px; margin: 0 0 32px; }

/* ─── DISCLAIMER ─── */
.disclaimer-section { padding: 30px 24px; }
.disclaimer-box {
  max-width: 900px; margin: 0 auto;
  background: #fef9c3; border-left: 4px solid var(--accent);
  padding: 18px 22px; border-radius: 6px;
  font-size: 14px; color: #713f12; line-height: 1.6;
}

/* ─── FOOTER ─── */
.site-footer {
  background: var(--bg-dark); color: #cbd5e1;
  padding: 50px 24px 24px;
}
.footer-inner {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 32px;
  max-width: 1100px; margin: 0 auto 30px;
}
.footer-inner .logo-text { color: #fff; }
.footer-tag { color: #94a3b8; font-size: 14px; margin: 4px 0 0; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-links a { color: #cbd5e1; font-size: 14px; }
.trust-badges {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 10px 18px;
  max-width: 1100px; margin: 0 auto 24px; padding: 18px 0;
  border-top: 1px solid #334155; border-bottom: 1px solid #334155;
}
.trust-badge {
  display: inline-flex; align-items: center; gap: 6px;
  color: #cbd5e1; font-size: 13px; font-weight: 500;
  background: rgba(255,255,255,.04); padding: 6px 12px; border-radius: 999px;
}
.trust-badge .tb-icon { font-size: 14px; }
.footer-copy {
  text-align: center; color: #64748b; font-size: 13px;
  padding-top: 16px; margin: 0;
}

/* ─── AUTH PAGES ─── */
.auth-page { background: linear-gradient(135deg, #eff6ff 0%, #fef3c7 100%); min-height: 100vh; }
.auth-card {
  max-width: 440px; margin: 60px auto;
  background: #fff; padding: 36px 32px; border-radius: 14px;
  box-shadow: var(--shadow-lg);
}
.auth-card h1 { margin: 0 0 6px; font-size: 24px; color: var(--text); text-align: center; }
.auth-card .sub { text-align: center; color: var(--text-mid); margin: 0 0 24px; font-size: 14px; }
.auth-card label {
  display: block; font-size: 13px; font-weight: 600; color: var(--text);
  margin: 14px 0 6px;
}
.auth-card input[type="text"],
.auth-card input[type="email"],
.auth-card input[type="password"],
.auth-card textarea {
  width: 100%; padding: 12px 14px; font-size: 15px;
  border: 1.5px solid var(--line); border-radius: 8px;
  font-family: inherit; background: #fff;
  box-sizing: border-box;
}
.auth-card textarea { min-height: 140px; resize: vertical; line-height: 1.5; }
.auth-card input:focus,
.auth-card textarea:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30,58,138,.15);
}
.auth-card .consent {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 13px; color: var(--text-mid);
  margin: 16px 0 20px; line-height: 1.4; cursor: pointer;
}
.auth-card .consent input { margin-top: 3px; flex-shrink: 0; width: 18px; height: 18px; }
.auth-card .btn-primary { width: 100%; justify-content: center; }
.auth-card .alt-link { text-align: center; margin-top: 18px; font-size: 14px; color: var(--text-mid); }

.msg { padding: 12px 16px; border-radius: 8px; margin: 12px 0; font-size: 14px; }
.msg.err { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.msg.ok { background: #dcfce7; color: #166534; border: 1px solid #86efac; }

/* ─── DASHBOARD ─── */
.dash-wrap { max-width: 1100px; margin: 32px auto; padding: 0 24px; }
.dash-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 28px; flex-wrap: wrap; gap: 16px;
}
.dash-head h1 { margin: 0; font-size: 26px; }
.dossier-list { display: grid; gap: 14px; }
.dossier-card {
  background: #fff; padding: 18px 22px; border-radius: 10px;
  border: 1px solid var(--line); display: flex; justify-content: space-between;
  align-items: center; gap: 16px; transition: all .15s;
}
.dossier-card:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); }
.dossier-info { flex: 1; min-width: 0; }
.dossier-info h3 { margin: 0 0 4px; font-size: 16px; color: var(--text); }
.dossier-info .meta { font-size: 13px; color: var(--text-mute); }
.dossier-statut {
  padding: 4px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 600;
}
.statut-brouillon { background: #fef3c7; color: #92400e; }
.statut-complete { background: #dbeafe; color: var(--primary-dark); }
.statut-genere { background: #dcfce7; color: #166534; }
.empty-state {
  text-align: center; padding: 60px 20px;
  background: var(--bg-soft); border-radius: 14px;
}
.empty-state h2 { color: var(--text); margin: 0 0 8px; }
.empty-state p { color: var(--text-mid); margin: 0 0 24px; }

/* ─── QUESTIONNAIRE ─── */
.q-wrap { max-width: 720px; margin: 32px auto; padding: 0 24px; }
.q-progress {
  background: var(--bg-soft); border-radius: 999px; height: 8px; overflow: hidden;
  margin-bottom: 24px;
}
.q-progress-fill { background: var(--accent); height: 100%; transition: width .3s; }
.q-card {
  background: #fff; padding: 32px 28px; border-radius: 14px;
  border: 1px solid var(--line); box-shadow: var(--shadow-md);
}
.q-question { font-size: 19px; font-weight: 600; color: var(--text); margin: 0 0 18px; }
.q-card textarea, .q-card input[type="text"], .q-card input[type="number"], .q-card input[type="date"] {
  width: 100%; padding: 12px 14px; font-size: 15px;
  border: 1.5px solid var(--line); border-radius: 8px;
  font-family: inherit;
}
.q-card textarea { min-height: 140px; resize: vertical; }

/* ─── Bloc d'aide municipale (insalubrité) ─── */
.inspection-box {
  margin-top: 18px;
  background: linear-gradient(135deg, #fef3c7 0%, #fffbeb 100%);
  border: 1px solid #fde68a;
  border-radius: 10px;
  padding: 18px 20px;
}
.inspection-head {
  font-size: 15px; color: #78350f; margin-bottom: 10px;
}
.inspection-body p { margin: 8px 0; color: #1f2937; font-size: 14.5px; }
.inspection-cta-row {
  display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 8px;
}
.inspection-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 16px; font-size: 14px; text-decoration: none;
}
.inspection-astuce {
  font-size: 13.5px; color: #4b5563; font-style: italic;
  background: rgba(255,255,255,.6); padding: 8px 12px; border-radius: 6px;
  border-left: 3px solid #f59e0b;
}
.q-choices { display: flex; flex-direction: column; gap: 8px; }
.q-choice {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; border: 1.5px solid var(--line); border-radius: 8px;
  cursor: pointer; transition: all .15s;
}
.q-choice:hover { border-color: var(--primary); background: var(--primary-soft); }
.q-choice input { width: 18px; height: 18px; }
.q-actions {
  display: flex; justify-content: space-between; margin-top: 28px;
}

/* ─── DOCUMENT VIEWER ─── */
.doc-wrap { max-width: 880px; margin: 32px auto; padding: 0 24px; }
.doc-content {
  background: #fff; padding: 48px 56px; border-radius: 8px;
  box-shadow: var(--shadow-md); line-height: 1.6;
  color: #1a1a1a; font-size: 15px;
  font-family: 'Times New Roman', Georgia, serif;
}
.doc-content h1 { font-size: 19px; font-weight: 700; color: #1a1a1a; margin: 22px 0 14px; text-align: center; text-transform: uppercase; letter-spacing: .5px; }
.doc-content h2 { font-size: 16px; font-weight: 700; color: #1a1a1a; margin: 22px 0 10px; }
.doc-content h3 { font-size: 14.5px; font-weight: 700; color: #1a1a1a; margin: 16px 0 8px; }
.doc-content p  { margin: 0 0 12px; color: #1a1a1a; }
.doc-content ul, .doc-content ol { margin: 0 0 14px 22px; color: #1a1a1a; }
.doc-content li { margin-bottom: 6px; }
.doc-content strong { color: #1a1a1a; }
.doc-content .doc-expediteur { text-align: right; margin-bottom: 28px; font-size: 14.5px; line-height: 1.5; }
.doc-content .doc-destinataire { text-align: left; margin: 0 0 36px; font-size: 14.5px; line-height: 1.55; font-weight: 700; }
.doc-content .doc-objet { font-weight: 700; margin: 20px 0; text-transform: uppercase; }

/* Format mise en demeure officiel (Éducaloi / OPC) */
.doc-content .doc-date { margin: 0 0 24px; font-weight: 700; font-size: 15px; }
.doc-content .doc-reserve { margin: 0 0 28px; letter-spacing: .3px; font-size: 14.5px; }
.doc-content .doc-faits { margin: 14px 0 22px 26px; padding: 0; }
.doc-content .doc-faits li { margin-bottom: 10px; font-weight: 700; padding-left: 6px; }
.doc-content .doc-signature { margin: 38px 0 6px; font-family: inherit; }
.doc-content .doc-expediteur-bas { margin: 0 0 12px; font-size: 14.5px; line-height: 1.55; font-weight: 700; }

/* Format liste de preuves */
.doc-content .doc-preuves { margin: 12px 0 18px 22px; padding: 0; list-style: decimal; }
.doc-content .doc-preuves > li {
  margin-bottom: 16px; padding: 12px 14px 12px 8px;
  background: #fafafa; border-left: 3px solid var(--accent, #f59e0b);
  border-radius: 0 6px 6px 0; list-style-position: outside;
}
.doc-content .doc-preuves > li strong { display: block; margin-bottom: 4px; font-size: 15.5px; }
.doc-content .doc-preuves > li em { color: #333; font-style: italic; }
.doc-content .doc-demarches { margin: 8px 0 18px 22px; padding: 0; }
.doc-content .doc-demarches > li { margin-bottom: 10px; padding-left: 4px; }
.doc-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; justify-content: center; }

/* =====================================================================
   RESPONSIVE — 3 paliers
   ─ Tablette portrait (700-1024px)
   ─ Mobile standard (≤ 700px)
   ─ Petit téléphone (≤ 420px — iPhone SE, Android compacts)
   ===================================================================== */

/* ─── TABLETTE PORTRAIT (700-1024px) ─── */
@media (min-width: 701px) and (max-width: 1024px) {
  .section { padding: 64px 28px; }
  .hero { padding: 64px 28px 80px; }
  .pricing-grid { grid-template-columns: repeat(2, 1fr); }
  .pricing-card.pricing-featured { transform: none; }
  .cases-grid { grid-template-columns: repeat(2, 1fr); }
  .cases-grid.cases-grid-3 { grid-template-columns: repeat(2, 1fr); }
}

/* ─── BURGER déclenché plus tôt (≤ 1024px) — la nav desktop devient trop serrée ─── */
@media (max-width: 1024px) {
  .topbar > .nav-public   { display: none !important; }
  .topbar > .topbar-right { display: none !important; }
  .topbar .mobile-toggle  { display: inline-flex; }
}

/* ─── HAMBURGER (mobile) ─── */
.mobile-toggle {
  display: none;
  width: 44px; height: 44px;
  background: none; border: none; cursor: pointer;
  padding: 10px; margin-left: auto;
  color: var(--text); border-radius: 8px;
  align-items: center; justify-content: center;
}
.mobile-toggle:hover { background: var(--bg-soft); }
.mobile-toggle svg { display: block; width: 24px; height: 24px; }
.mobile-toggle .icon-close { display: none; }
.mobile-toggle[aria-expanded="true"] .icon-open  { display: none; }
.mobile-toggle[aria-expanded="true"] .icon-close { display: block; }

.mobile-drawer {
  display: block;
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(320px, 85vw);
  background: #fff;
  box-shadow: -8px 0 32px rgba(0,0,0,.12);
  padding: 76px 22px 28px;
  z-index: 999;
  overflow-y: auto;
  transform: translateX(105%);
  transition: transform .25s ease;
  visibility: hidden;
}
.mobile-drawer.open { transform: translateX(0); visibility: visible; }
.mobile-drawer a, .mobile-drawer .drawer-link {
  display: block;
  padding: 14px 12px;
  font-size: 16px;
  color: var(--text);
  text-decoration: none;
  border-radius: 8px;
  font-weight: 500;
}
.mobile-drawer a:hover, .mobile-drawer .drawer-link:hover {
  background: var(--bg-soft); color: var(--primary); text-decoration: none;
}
.mobile-drawer hr {
  border: none; border-top: 1px solid var(--line); margin: 14px 0;
}
.mobile-drawer .drawer-cta {
  display: block; text-align: center;
  background: var(--accent); color: #fff;
  padding: 13px 20px; border-radius: 8px; margin-top: 10px;
  font-weight: 700; font-size: 16px;
}
.mobile-drawer .drawer-cta:hover { background: var(--accent-dark); color: #fff; }
.mobile-drawer .drawer-lang {
  display: flex; gap: 8px; padding: 10px 12px; font-size: 14px;
}
.mobile-drawer .drawer-lang a {
  display: inline-block; padding: 6px 14px;
  border: 1.5px solid var(--line); border-radius: 6px;
  color: var(--text-mute); font-weight: 600;
}
.mobile-drawer .drawer-lang a.active {
  background: var(--primary-soft); color: var(--primary-dark); border-color: var(--primary-soft);
}
.mobile-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 998;
  opacity: 0; transition: opacity .25s ease;
  visibility: hidden;
  pointer-events: none;
}
.mobile-backdrop.open { opacity: 1; visibility: visible; pointer-events: auto; }

/* ─── TABLETTE + MOBILE (≤ 1024px) — bascule en burger ─── */
@media (max-width: 1024px) {
  /* Topbar — version épurée */
  .topbar {
    display: flex; padding: 12px 16px; gap: 10px;
    align-items: center; justify-content: space-between;
    grid-template-columns: none;
  }
  .topbar > .logo-link    { grid-column: auto; justify-self: auto; }
  .topbar > .nav-public   { display: none !important; }
  .topbar > .topbar-right { display: none !important; }
  .mobile-toggle { display: inline-flex; }

  /* Sections principales */
  .hero { padding: 50px 16px 70px; }
  .section { padding: 50px 16px; }
  .section h2 { font-size: clamp(22px, 5.5vw, 30px); }

  /* Grilles */
  .pricing-grid { grid-template-columns: 1fr; gap: 18px; }
  .pricing-card.pricing-featured { transform: none; }
  .cases-grid,
  .cases-grid.cases-grid-3 { grid-template-columns: 1fr; gap: 14px; }
  .pain-grid, .steps-grid { gap: 18px; }

  /* Cartes */
  .auth-card { margin: 20px 14px; padding: 24px 22px; }
  .dash-wrap { padding: 0 14px; margin: 20px auto; }
  .doc-content { padding: 24px 20px; }
  .case-card { padding: 20px 18px; }

  /* Boutons full-width sur les actions principales */
  .auth-card .btn-primary,
  .auth-card .btn-ghost { width: 100%; }

  /* Inputs : éviter le zoom auto iOS (font-size >= 16px) */
  input[type="text"], input[type="email"], input[type="password"],
  input[type="number"], input[type="date"], input[type="tel"],
  textarea, select { font-size: 16px !important; }

  /* Tableaux : scroll horizontal au lieu de casser la page */
  table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* ─── PETIT TÉLÉPHONE (≤ 420px) ─── */
@media (max-width: 420px) {
  /* Logo plus compact */
  .logo-text { font-size: 18px; }

  /* Topbar serrée */
  .topbar { padding: 8px 10px; gap: 6px; }
  .nav-public a { font-size: 12px; padding: 5px 8px; }
  .topbar-right .btn-ghost { padding: 6px 10px; font-size: 12px; }
  .lang-switch { font-size: 12px; }

  /* Hero compact */
  .hero { padding: 36px 14px 50px; }
  .hero h1 { font-size: clamp(26px, 8vw, 36px); }
  .hero-pill { font-size: 12px; padding: 5px 12px; }

  /* Section plus serrée */
  .section { padding: 40px 14px; }
  .section h2 { font-size: clamp(20px, 6vw, 26px); }

  /* Cartes ultra-compactes */
  .auth-card { margin: 14px 10px; padding: 20px 16px; }
  .auth-card h1 { font-size: 22px; }
  .pricing-card { padding: 22px 18px; }
  .pricing-price { font-size: 28px !important; }
  .case-card { padding: 18px 14px; }
  .doc-content { padding: 18px 14px; }
  .dash-wrap { padding: 0 10px; }

  /* Boutons : confortables au pouce */
  .btn-primary, .btn-ghost { padding: 12px 18px; font-size: 14px; }
  .btn-lg { padding: 12px 22px; font-size: 15px; }

  /* Formulaires : labels au-dessus, inputs full-width */
  label { font-size: 13px; }
}

/* ─── ACCESSIBILITÉ MOBILE ─── */
@media (hover: none) and (pointer: coarse) {
  /* Cibles de touch ≥ 44x44 px (recommandation Apple/Google) */
  .btn-primary, .btn-ghost, .btn-delete-dossier,
  .nav-public a, .topbar-right a { min-height: 44px; }
  /* Désactive les effets hover qui peuvent rester collés sur touch */
  .case-card:hover, .pricing-card:hover { transform: none; }
}

/* ─── PRINT (cas particulier mais utile) ─── */
@media print {
  .topbar, .crisp-client, .doc-actions, .no-print { display: none !important; }
  body { background: #fff !important; }
}
