/* ============================================================
   UAMDD — Responsive CSS Global
   ============================================================ */

/* ── NAVBAR ── */
@media (max-width: 991px) {
  .u-nav .navbar-collapse,
  .navbar-collapse {
    background: white;
    border-radius: 12px;
    margin-top: .5rem;
    padding: 1rem;
    box-shadow: 0 8px 30px rgba(0,0,0,.1);
    border: 1px solid #e9ecef;
  }
  .u-nav .navbar-nav,
  .navbar-nav {
    gap: .2rem;
  }
  .u-nav #nav-user-area {
    padding-top: .75rem;
    border-top: 1px solid #e9ecef;
    margin-top: .5rem;
    flex-wrap: wrap;
  }
  .u-nav .dropdown-menu {
    position: static !important;
    float: none;
    box-shadow: none;
    border: none;
    background: #f8f9fa;
    border-radius: 8px;
    margin: .25rem 0;
    padding: .25rem;
  }
}

/* ── HERO ACCUEIL ── */
@media (max-width: 991px) {
  .hero { min-height: auto; padding-bottom: 2rem; }
  .hero-overlay {
    background: linear-gradient(to bottom,
      rgba(255,255,255,.97) 0%,
      rgba(255,255,255,.92) 70%,
      rgba(255,255,255,.7) 100%
    ) !important;
  }
}
@media (max-width: 767px) {
  .hero { padding: 2rem 0 1.5rem; }
  .hero-title { font-size: 1.8rem !important; }
  .hero-btns { flex-direction: column; gap: .6rem !important; }
  .btn-primary-hero,
  .btn-outline-hero { justify-content: center; width: 100%; }
  .hero-stats { justify-content: space-between; flex-wrap: wrap; gap: .75rem !important; }
  .hero-stat-divider { display: none !important; }
  .hero-stat-num { font-size: 1.5rem !important; }
}

/* ── SECTIONS ── */
@media (max-width: 767px) {
  .section, .u-section { padding: 3.5rem 0 !important; }
  .section-title { font-size: 1.5rem !important; }
  .section-desc { font-size: .9rem !important; }
  .page-hero { padding: 5rem 0 2rem !important; }
}

/* ── STATS BAR ── */
@media (max-width: 576px) {
  .stats-bar .row > div { padding: .85rem .5rem !important; }
  .stats-bar-num { font-size: 1.4rem !important; }
  .stats-bar-label { font-size: .7rem !important; }
  .stats-bar-divider { display: none !important; }
}

/* ── FORMATION CARDS ── */
@media (max-width: 576px) {
  .f-img, .formation-card-img { height: 150px !important; }
  .f-body, .formation-card-body { padding: .9rem !important; }
  .f-title, .formation-card-title { font-size: .87rem !important; }
}

/* ── PAYMENT GRID ── */
@media (max-width: 576px) {
  .payment-methods-grid .col-sm-6 { flex: 0 0 100%; max-width: 100%; }
  .payment-card-inner { min-height: auto; }
}

/* ── ADMIN SIDEBAR ── */
@media (max-width: 991px) {
  .main-content { margin-left: 0 !important; }
  .sidebar {
    transform: translateX(-100%);
    transition: transform .3s ease;
    z-index: 200;
    position: fixed !important;
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 190; }
  .sidebar-backdrop.show { display: block; }
  .page-body { padding: 1rem !important; }
  .topbar { padding: .7rem 1rem !important; }
  .card-box-header { flex-wrap: wrap; gap: .5rem; }
}
@media (max-width: 767px) {
  .stat-card { padding: 1rem !important; }
  .stat-number, .stat-value { font-size: 1.5rem !important; }
  .stat-icon { width: 42px !important; height: 42px !important; font-size: 1rem !important; }
  .table th, .table td { padding: .55rem .7rem !important; font-size: .78rem !important; }
}

/* ── AUTH PAGES ── */
@media (max-width: 576px) {
  .auth-wrap { padding: 1rem; }
  .auth-body { padding: 1.5rem !important; }
  .auth-top { padding: 1.5rem !important; }
}

/* ── INSCRIPTION ── */
@media (max-width: 576px) {
  .inscription-container { padding-left: 1rem; padding-right: 1rem; }
  .step-header h2 { font-size: 1.2rem !important; }
  .payment-card-inner { gap: .6rem; padding: .85rem !important; }
  .pay-logo-circle { width: 42px !important; height: 42px !important; }
}

/* ── LMS ── */
@media (max-width: 991px) {
  .lms-sidebar {
    position: fixed !important;
    left: -280px !important;
    top: 0; bottom: 0; z-index: 300;
    transition: left .3s;
    width: 280px !important;
  }
  .lms-sidebar.open { left: 0 !important; }
  .lms-main { margin-left: 0 !important; }
}
@media (max-width: 576px) {
  .lms-topbar { padding: .5rem .75rem !important; }
  .module-main-title { font-size: 1.05rem !important; }
  .pdf-iframe { height: 55vh !important; min-height: 300px !important; }
  .quiz-option { padding: .7rem !important; font-size: .85rem !important; }
}

/* ── CERTIFICAT ── */
@media (max-width: 576px) {
  .cert-topbar { flex-wrap: wrap; gap: .5rem; padding: .75rem 1rem !important; }
  .cert-actions { flex-wrap: wrap; gap: .35rem !important; }
  .btn-cert { padding: .4rem .85rem !important; font-size: .78rem !important; }
  .cert-css { padding: 1.25rem !important; }
  .cert-title-main { font-size: 1.4rem !important; }
  .cert-name { font-size: 1.8rem !important; }
}

/* ── DASHBOARD APPRENANT ── */
@media (max-width: 991px) {
  .sidebar { position: fixed; }
  .main-content { margin-left: 0 !important; }
}
@media (max-width: 767px) {
  .page-body { padding: 1rem !important; }
  .topbar { padding: 0 1rem !important; }
  .section-card { padding: 1rem !important; }
}

/* ── BLOG ── */
@media (max-width: 767px) {
  .blog-header { padding: 5rem 0 2rem !important; }
  .blog-featured-img { height: 220px !important; }
  .blog-featured-body { padding: 1.25rem !important; }
}

/* ── GENERAL ── */
*, *::before, *::after { box-sizing: border-box; }
body { overflow-x: hidden; }
img { max-width: 100%; height: auto; }

@media (max-width: 576px) {
  .container { padding-left: 1rem; padding-right: 1rem; }
  .modal-dialog { margin: .5rem; }
  .modal-xl, .modal-lg { max-width: calc(100% - 1rem); }
}
@media (hover: none) and (pointer: coarse) {
  .btn, button { min-height: 44px; }
}
