@media(max-width:950px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 65px;
    padding: 65px 6%;
  }

  .hero-content { text-align: center; }
  .hero-content > p { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }

  .dashboard-preview {
    max-width: 560px;
    width: 100%;
    margin: auto;
    transform: none;
  }

  .feature-grid { grid-template-columns: repeat(2,1fr); }
}

@media(max-width:550px) {
  .topbar { height: 68px; padding: 0 5%; }
  .brand { font-size: 15px; }
  .brand-icon { width: 39px; height: 39px; }

  .hero { padding: 55px 5%; gap: 55px; }
  .hero h1 { font-size: 38px; letter-spacing: -1.5px; }
  .hero-content > p { font-size: 14px; }

  .hero-actions { flex-direction: column; }
  .hero-actions .btn { text-align: center; }

  .dashboard-preview { padding: 17px; }
  .preview-card { padding: 19px; }
  .preview-card h2 { font-size: 21px; }
  .preview-grid { gap: 9px; }
  .preview-grid div { padding: 12px; }
  .preview-grid strong { font-size: 13px; }

  .features { padding: 65px 5%; }
  .section-heading h2,
  .cta h2 { font-size: 27px; }

  .feature-grid { grid-template-columns: 1fr; }
  .cta { padding: 65px 20px; }
}

@media(hover:none) {
  .dashboard-preview:hover,
  .feature-card:hover { transform: none; }
}

@media(max-width:850px) {
  .sidebar { display: none; }
  .app-body { display: block; }
  .app-header { padding: 0 18px; height: 72px; }
  .dashboard-content { padding: 23px 17px 100px; }
  .stats-grid { grid-template-columns: repeat(2,1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70px;
    padding: 5px 8px;
    padding-bottom: max(5px,env(safe-area-inset-bottom));
    background: rgba(255,255,255,.96);
    backdrop-filter: blur(20px);
    border-top: 1px solid #DED5E5;
    display: flex;
    justify-content: space-around;
    z-index: 100;
  }
  .bottom-link {
    border: 0;
    background: transparent;
    color: #555;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex: 1;
    font-size: 10px;
    cursor: pointer;
  }
  .bottom-link b { font-size: 22px; }
  .bottom-link.active { color: #6B4F3B; }
  .bottom-link.active b { color: #A66BE0; }
  .module-grid { grid-template-columns: repeat(2,1fr); }
}

@media(max-width:480px) {
  .app-header h1 { font-size: 18px; }
  .app-header small { font-size: 8px; }
  .welcome-row { align-items: flex-start; flex-direction: column; }
  .welcome-row h2 { font-size: 20px; }
  .stats-grid { gap: 10px; }
  .stat-card { padding: 14px; }
  .stat-card div { font-size: 15px; }
  .stat-card span { font-size: 11px; }
  .panel { padding: 16px; }
  .module-grid { grid-template-columns: 1fr; }
  .module-intro { padding: 22px; }
}

/* ===== VRAIE BARRE FLOTTANTE MON DJASSA ===== */
@media (max-width: 850px) {
  .bottom-nav {
    position: fixed !important;
    left: 14px !important;
    right: 14px !important;
    bottom: 16px !important;
    width: auto !important;
    max-width: 560px;
    height: 76px !important;
    margin: 0 auto !important;
    padding: 9px 10px !important;
    box-sizing: border-box !important;

    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-around !important;
    gap: 8px !important;

    background: linear-gradient(145deg, #80634F, #49372B) !important;
    border: 1px solid rgba(255,255,255,.55) !important;
    border-radius: 26px !important;

    box-shadow:
      0 14px 30px rgba(35,20,12,.35),
      0 5px 12px rgba(35,20,12,.2),
      inset 2px 2px 5px rgba(255,255,255,.3),
      inset -2px -2px 5px rgba(0,0,0,.2) !important;

    z-index: 9999 !important;
  }

  .bottom-nav .bottom-link {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    width: 0 !important;
    height: 56px !important;
    padding: 5px 2px !important;
    margin: 0 !important;
    box-sizing: border-box !important;

    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 3px !important;

    border: 1px solid rgba(255,255,255,.2) !important;
    border-radius: 17px !important;
    background: linear-gradient(145deg, #92745F, #594333) !important;
    color: #FFFFFF !important;

    font-size: 10px !important;
    white-space: nowrap !important;
    overflow: hidden !important;

    box-shadow:
      4px 5px 9px rgba(0,0,0,.25),
      inset 1px 1px 3px rgba(255,255,255,.3) !important;
  }

  .bottom-nav .bottom-link b {
    color: inherit !important;
    font-size: 21px !important;
    line-height: 1 !important;
  }

  .bottom-nav .bottom-link.active {
    background: linear-gradient(145deg, #EAD8FF, #C69BEF) !important;
    color: #21152C !important;
    transform: translateY(-4px) !important;
    box-shadow:
      0 8px 14px rgba(0,0,0,.25),
      inset 2px 2px 4px rgba(255,255,255,.9) !important;
  }

  .app-main,
  .dashboard-content {
    padding-bottom: 115px !important;
  }
}

/* CORRECTION DEFINITIVE : BARRE FIXEE A L'ECRAN */
@media (max-width: 850px) {
  .app-body {
    perspective: none !important;
    transform: none !important;
    overflow: visible !important;
  }

  .app-main {
    transform: none !important;
    overflow: visible !important;
  }

  .bottom-nav {
    position: fixed !important;
    inset: auto 14px max(16px, env(safe-area-inset-bottom)) 14px !important;
    width: auto !important;
    max-width: 560px !important;
    margin-inline: auto !important;
    z-index: 2147483647 !important;
  }
}

/* BARRE DOCK 3D : INDEPENDANTE DU CONTENU */
@media (max-width: 850px) {
  html, body {
    overflow-x: clip !important;
  }

  body.app-body {
    perspective: none !important;
    transform: none !important;
  }

  body > .bottom-nav {
    position: fixed !important;
    display: flex !important;
    left: 14px !important;
    right: 14px !important;
    bottom: max(16px, env(safe-area-inset-bottom)) !important;
    width: auto !important;
    max-width: 560px !important;
    height: 76px !important;
    margin: 0 auto !important;
    padding: 9px 10px !important;
    box-sizing: border-box !important;
    z-index: 2147483647 !important;

    align-items: center !important;
    justify-content: space-around !important;
    gap: 8px !important;

    border: 1px solid rgba(255,255,255,.6) !important;
    border-radius: 28px !important;
    background: linear-gradient(145deg, #80634F, #49372B) !important;
    box-shadow: 0 14px 30px rgba(35,20,12,.38),
                inset 2px 2px 5px rgba(255,255,255,.3) !important;
  }

  body > .bottom-nav > .bottom-link {
    flex: 1 1 0 !important;
    width: 0 !important;
    min-width: 0 !important;
    height: 56px !important;
    margin: 0 !important;
    padding: 4px 1px !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 3px !important;
    border-radius: 17px !important;
    white-space: nowrap !important;
    background: linear-gradient(145deg, #92745F, #594333) !important;
    color: white !important;
    font-size: 10px !important;
    box-shadow: 4px 5px 9px rgba(0,0,0,.25),
                inset 1px 1px 3px rgba(255,255,255,.3) !important;
  }

  body > .bottom-nav > .bottom-link b {
    color: inherit !important;
    font-size: 21px !important;
  }

  body > .bottom-nav > .bottom-link.active {
    background: linear-gradient(145deg, #EAD8FF, #C69BEF) !important;
    color: #21152C !important;
  }

  .app-main {
    padding-bottom: 120px !important;
  }
}
