/* ========================================
   RESPONSIVE ENHANCED - Amélioration complète
   ======================================== */

/* ==================== 
   NAVIGATION RESPONSIVE 
   ==================== */
@media (max-width: 991px) {
  .navbar-nav {
    margin: 0;
  }
  .navbar-nav > li {
    display: block;
    width: 100%;
  }
  .navbar-nav > li > a {
    padding: 12px 15px !important;
    border-bottom: 1px solid #eee;
  }
  .navbar-collapse {
    border: none;
    box-shadow: none;
  }
}

/* ==================== 
   IMAGES RESPONSIVE 
   ==================== */
img {
  max-width: 100%;
  height: auto;
}

.product-featured-image img,
.product-image img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* ==================== 
   TABLEAUX RESPONSIVE 
   ==================== */
@media (max-width: 767px) {
  .table-responsive {
    border: none;
  }
  
  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }
  
  .cart-table td,
  .order-table td {
    min-width: 100px;
  }
  
  .cart-table img {
    max-width: 60px;
    height: auto;
  }
}

/* ==================== 
   FORMULAIRES RESPONSIVE 
   ==================== */
@media (max-width: 767px) {
  .form-group {
    margin-bottom: 15px;
  }
  
  .form-control {
    font-size: 16px; /* Évite le zoom automatique sur iOS */
  }
  
  .input-group {
    display: block;
  }
  
  .input-group-btn,
  .input-group-addon {
    display: block;
    width: 100%;
  }
  
  .input-group .form-control {
    width: 100%;
  }
}

/* ==================== 
   BOUTONS RESPONSIVE 
   ==================== */
@media (max-width: 767px) {
  .btn-block-mobile {
    display: block;
    width: 100%;
    margin-bottom: 10px;
  }
  
  .btn-group {
    display: block;
  }
  
  .btn-group > .btn {
    display: block;
    width: 100%;
    margin-bottom: 5px;
  }
}

/* ==================== 
   CARTES PRODUITS 
   ==================== */
@media (max-width: 767px) {
  .product-item {
    margin-bottom: 20px;
  }
  
  .product .photo {
    margin-bottom: 15px;
  }
  
  .product .text {
    padding: 15px;
  }
  
  .product-single .photo-main {
    margin-bottom: 20px;
  }
}

/* ==================== 
   CHECKOUT & PANIER 
   ==================== */
@media (max-width: 767px) {
  .checkout-left,
  .checkout-right {
    width: 100%;
    float: none;
    margin-bottom: 20px;
  }
  
  .cart-buttons a,
  .cart-buttons button {
    display: block;
    width: 100%;
    margin: 5px 0;
  }
  
  .payment-method {
    margin-bottom: 15px;
  }
}

/* ==================== 
   SLIDER RESPONSIVE 
   ==================== */
@media (max-width: 767px) {
  .slider-area {
    height: auto !important;
  }
  
  .slider-content h1 {
    font-size: 24px !important;
  }
  
  .slider-content h2 {
    font-size: 18px !important;
  }
  
  .slider-content p {
    font-size: 14px !important;
  }
  
  .slider-content .btn {
    padding: 8px 15px;
    font-size: 13px;
  }
}

/* ==================== 
   SIDEBAR RESPONSIVE 
   ==================== */
@media (max-width: 991px) {
  .sidebar {
    margin-top: 30px;
  }
  
  .sidebar .widget {
    margin-bottom: 20px;
  }
}

@media (max-width: 767px) {
  .sidebar {
    margin-top: 20px;
  }
}

/* ==================== 
   MODAL RESPONSIVE 
   ==================== */
@media (max-width: 767px) {
  .modal-dialog {
    margin: 10px;
  }
  
  .modal-content {
    border-radius: 5px;
  }
  
  .modal-header,
  .modal-body,
  .modal-footer {
    padding: 15px;
  }
}

/* ==================== 
   BREADCRUMB RESPONSIVE 
   ==================== */
@media (max-width: 767px) {
  .breadcrumb {
    font-size: 12px;
    padding: 8px 10px;
  }
  
  .breadcrumb > li + li:before {
    padding: 0 3px;
  }
}

/* ==================== 
   PAGINATION RESPONSIVE 
   ==================== */
@media (max-width: 767px) {
  .pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .pagination > li > a,
  .pagination > li > span {
    padding: 6px 10px;
    font-size: 12px;
  }
}

/* ==================== 
   CUSTOMER DASHBOARD 
   ==================== */
@media (max-width: 991px) {
  .customer-sidebar {
    margin-bottom: 30px;
  }
  
  .customer-sidebar ul li a {
    padding: 12px 15px;
  }
}

@media (max-width: 767px) {
  .dashboard-content {
    padding: 15px;
  }
  
  .customer-order .table-responsive {
    font-size: 12px;
  }
}

/* ==================== 
   CONTACT PAGE 
   ==================== */
@media (max-width: 767px) {
  .contact-info {
    margin-bottom: 20px;
  }
  
  .contact-form {
    padding: 20px 15px;
  }
  
  .contact-map {
    height: 250px !important;
  }
}

/* ==================== 
   ABOUT PAGE 
   ==================== */
@media (max-width: 767px) {
  .about-content {
    padding: 20px 15px;
  }
  
  .about-content h2 {
    font-size: 22px;
  }
  
  .about-content p {
    font-size: 14px;
  }
}

/* ==================== 
   SEARCH RESULTS 
   ==================== */
@media (max-width: 767px) {
  .search-result-item {
    margin-bottom: 15px;
  }
  
  .search-result-item .photo {
    width: 100px;
  }
  
  .search-result-item .text h3 {
    font-size: 16px;
  }
}

/* ==================== 
   SPACING UTILITIES 
   ==================== */
@media (max-width: 767px) {
  .pt_70, .pb_70 {
    padding-top: 40px !important;
    padding-bottom: 40px !important;
  }
  
  .pt_50, .pb_50 {
    padding-top: 30px !important;
    padding-bottom: 30px !important;
  }
  
  .mt_70, .mb_70 {
    margin-top: 40px !important;
    margin-bottom: 40px !important;
  }
  
  .mt_50, .mb_50 {
    margin-top: 30px !important;
    margin-bottom: 30px !important;
  }
}

/* ==================== 
   TOUCH FRIENDLY 
   ==================== */
@media (max-width: 767px) {
  a, button, input, select, textarea {
    -webkit-tap-highlight-color: rgba(0,0,0,0.1);
  }
  
  /* Augmenter la zone de clic pour les liens et boutons */
  .btn, .nav a, .pagination a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

/* ==================== 
   PERFORMANCE 
   ==================== */
/* Accélération matérielle pour les animations */
.slider, .product, .service .slider {
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

/* ==================== 
   PRINT STYLES 
   ==================== */
@media print {
  .top, .header, .nav, .footer, .sidebar,
  .breadcrumb, .btn, .social-media {
    display: none !important;
  }
  
  .container {
    width: 100%;
    max-width: 100%;
  }
  
  .product-single .photo-main img {
    max-width: 300px;
  }
}
