/* =====================================================
   RESPONSIVE GLOBAL – SMARTID RLM
   Mobile • Tablette • Desktop • Large Screen
   ===================================================== */

/* ----------- RÈGLES GLOBALES ----------- */
img {
  max-width: 100%;
  height: auto;
}

body {
  overflow-x: hidden;
}

/* ----------- SIDEBAR ----------- */
@media (max-width: 992px) {
  .sidebar {
    position: relative;
    width: 100%;
    height: auto;
    padding: 15px;
    box-shadow: none;
  }

  .sidebar nav a {
    display: inline-block;
    margin-right: 12px;
    font-size: 14px;
  }
}

/* ----------- MAIN WRAP ----------- */
@media (max-width: 992px) {
  .main-wrap {
    margin-left: 0 !important;
    max-width: 100%;
    padding: 15px;
  }
}

/* ----------- HEADER (TITRE + BOUTONS) ----------- */
@media (max-width: 768px) {
  .main-wrap > .d-flex {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 12px;
  }

  .main-wrap h2 {
    font-size: 20px;
  }
}

/* ----------- FILTRES ----------- */
@media (max-width: 768px) {
  .card .d-flex {
    flex-direction: column;
    gap: 10px;
  }

  .card select,
  .card button {
    width: 100% !important;
  }
}

/* ----------- GALERIE ----------- */
@media (max-width: 576px) {
  .gallery-root {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
  }

  .gallery-item img {
    height: 160px;
  }
}

/* ----------- TABLETTE ----------- */
@media (min-width: 577px) and (max-width: 991px) {
  .gallery-root {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }
}

/* ----------- LIGHTBOX ----------- */
@media (max-width: 768px) {
  #lbContainer {
    width: 95%;
  }

  #lbPrev {
    left: 10px;
  }

  #lbNext {
    right: 10px;
  }

  .lbBtnNav {
    font-size: 22px;
    padding: 8px 12px;
  }

  .lbBtnClose {
    top: 10px;
    right: 10px;
  }
}

/* ----------- MODALS ----------- */
@media (max-width: 576px) {
  .modal-dialog {
    margin: 10px;
  }

  .modal-content {
    border-radius: 10px;
  }
}

/* ----------- FOOTER ----------- */
@media (max-width: 576px) {
  footer {
    font-size: 13px;
    padding-bottom: 30px;
  }
}

/* ----------- ÉCRANS TRÈS LARGES ----------- */
@media (min-width: 1400px) {
  .main-wrap {
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
  }
}
