/**
 * RCustoms - Responsive Design
 * Styles pour assurer la compatibilité mobile et tablette
 */

/* ========================================
   BREAKPOINTS
   ======================================== */
/* Mobile: < 576px */
/* Tablet: 576px - 991px */
/* Desktop: >= 992px */

/* ========================================
   MOBILE FIRST - BASES
   ======================================== */
html, body {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

/* ========================================
   NAVIGATION RESPONSIVE
   ======================================== */
@media (max-width: 991px) {
    .navbar-nav {
        padding: 1rem 0;
    }

    .navbar-nav .nav-item {
        margin: 0.5rem 0;
    }

    .navbar-collapse {
        background: var(--background-primary);
        padding: 1rem;
        border-radius: 1rem;
        margin-top: 1rem;
    }

    .navbar-toggler {
       /*  border: 2px solid var(--primary-color); */
        padding: 0.5rem 0.75rem;
    }

    .navbar-toggler span {
        display: block;
        width: 25px;
        height: 3px;
        background: var(--primary-color);
        margin: 5px 0;
        transition: all 0.3s ease;
    }
}

/* ========================================
   HERO SECTION RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    .service-hero {
        min-height: 60vh;
        padding: 2rem 0;
    }

    .service-hero h1,
    .hero h1 {
        font-size: 2rem !important;
    }

    .service-hero .lead,
    .hero .lead {
        font-size: 1rem;
    }

    .price-tag {
        font-size: 1rem;
        padding: 0.75rem 1.5rem;
    }

    .price-tag .fs-1 {
        font-size: 2rem !important;
    }
}

/* ========================================
   CARDS & PACKAGES RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    .package-card,
    .feature-card,
    .service-card {
        margin-bottom: 1.5rem;
    }

    .package-image {
        height: 150px;
    }

    .gallery-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }

    .gallery-item img {
        height: 200px;
    }

    .quick-stats {
        flex-direction: column;
    }

    .quick-stat {
        min-width: 100%;
    }
}

/* ========================================
   FORMS RESPONSIVE
   ======================================== */
@media (max-width: 576px) {
    .form-section {
        padding: 1rem;
    }

    .booking-section {
        padding: 1.5rem;
        border-radius: 1rem;
    }

    .contact-form-container {
        padding: 1rem;
    }

    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }

    .modal-dialog {
        margin: 0.5rem;
    }

    .modal-body {
        padding: 1rem;
    }
}

/* ========================================
   TABLES RESPONSIVE
   ======================================== */
@media (max-width: 991px) {
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .table {
        min-width: 600px;
    }

    .admin-container {
        display: block;
    }

    .sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        height: 100vh;
        transition: left 0.3s ease;
        z-index: 1000;
    }

    .sidebar.active {
        left: 0;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
    }

    .mobile-menu-toggle {
        display: block;
        position: fixed;
        top: 1rem;
        left: 1rem;
        z-index: 999;
        background: var(--primary-color);
        color: white;
        border: none;
        padding: 0.75rem 1rem;
        border-radius: 0.5rem;
        cursor: pointer;
    }
}

/* ========================================
   TYPOGRAPHY RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    h1, .h1 {
        font-size: 2rem;
    }

    h2, .h2 {
        font-size: 1.75rem;
    }

    h3, .h3 {
        font-size: 1.5rem;
    }

    h4, .h4 {
        font-size: 1.25rem;
    }

    h5, .h5 {
        font-size: 1.1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .section-description {
        font-size: 1rem;
    }
}

/* ========================================
   SPACING RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    .py-5 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }

    .mb-5 {
        margin-bottom: 2rem !important;
    }

    .mt-5 {
        margin-top: 2rem !important;
    }

    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* ========================================
   PROCESS TIMELINE RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    .process-timeline::before {
        left: 15px;
    }

    .process-step {
        padding-left: 50px;
        margin-bottom: 2rem;
    }

    .process-number {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* ========================================
   INSTALLATION INFO RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    .installation-info-card {
        padding: 1.5rem 1rem;
    }

    .installation-duration {
        font-size: 2rem;
    }

    .installation-feature {
        padding: 1rem;
    }
}

/* ========================================
   BUTTONS RESPONSIVE
   ======================================== */
@media (max-width: 576px) {
    .d-flex.gap-3 {
        flex-direction: column !important;
        gap: 0.75rem !important;
    }

    .d-flex.gap-2 {
        flex-direction: column !important;
        gap: 0.5rem !important;
    }

    .btn {
        width: 100%;
    }

    .btn-group {
        flex-direction: column;
    }

    .btn-group .btn {
        border-radius: 0.375rem !important;
        margin: 0.25rem 0;
    }
}

/* ========================================
   MODAL RESPONSIVE
   ======================================== */
@media (max-width: 576px) {
    .modal-dialog {
        max-width: 100%;
        margin: 0;
    }

    .modal-content {
        border-radius: 0;
        min-height: 100vh;
    }

    .modal-body {
        max-height: calc(100vh - 150px);
        overflow-y: auto;
    }
}

/* ========================================
   TESTIMONIALS RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    .testimonial-card {
        margin-bottom: 1.5rem;
    }

    .testimonial-avatar {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }

    .testimonial-stars {
        font-size: 1.25rem;
    }
}

/* ========================================
   BREADCRUMB RESPONSIVE
   ======================================== */
@media (max-width: 576px) {
    .breadcrumb {
        font-size: 0.85rem;
    }

    .breadcrumb-item + .breadcrumb-item::before {
        padding: 0 0.25rem;
    }
}

/* ========================================
   FOOTER RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    .footer .row {
        text-align: center;
    }

    .footer .col-md-6 {
        margin-bottom: 1rem;
    }
}

/* ========================================
   ADMIN DASHBOARD RESPONSIVE
   ======================================== */
@media (max-width: 991px) {
    .page-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .page-header > div {
        width: 100%;
    }

    .stats-grid {
        grid-template-columns: 1fr !important;
    }

    .card-body {
        padding: 1rem;
    }

    .content-wrapper {
        padding: 1rem;
    }
}

/* ========================================
   CUSTOMER STATS RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    .customer-stats {
        flex-direction: column;
        gap: 0.5rem !important;
    }

    .customer-result-item {
        padding: 0.75rem;
    }
}

/* ========================================
   UTILITIES RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    .text-md-end {
        text-align: left !important;
    }

    .d-md-none {
        display: block !important;
    }

    .d-md-block {
        display: none !important;
    }
}

/* ========================================
   TOUCH IMPROVEMENTS
   ======================================== */
@media (hover: none) and (pointer: coarse) {
    /* Améliorer la zone de touch pour les boutons */
    .btn,
    .nav-link,
    .form-check-input,
    .form-control,
    .form-select {
        min-height: 44px;
        min-width: 44px;
    }

    /* Supprimer les effets hover sur mobile */
    .package-card:hover,
    .feature-card:hover,
    .gallery-item:hover {
        transform: none;
    }

    .package-card:hover .package-image,
    .gallery-item:hover img {
        transform: none;
    }
}

/* ========================================
   LANDSCAPE MODE (MOBILE)
   ======================================== */
@media (max-height: 500px) and (orientation: landscape) {
    .service-hero,
    .hero {
        min-height: 100vh;
    }

    .modal-body {
        max-height: 80vh;
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
    .navbar,
    .footer,
    .btn,
    .sidebar,
    .mobile-menu-toggle {
        display: none !important;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
    }

    body {
        background: white;
        color: black;
    }
}
