/**
 * HotelPro - Styles responsives
 * Optimisé pour tous les appareils
 */

/* Extra small devices (phones, less than 576px) */
@media (max-width: 575.98px) {
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem;
    }
    
    .card {
        margin-bottom: 15px;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .stats-card .card-body {
        padding: 1rem;
    }
    
    .stats-card h2 {
        font-size: 1.5rem;
    }
    
    .table {
        font-size: 0.85rem;
    }
    
    .table thead th,
    .table tbody td {
        padding: 0.5rem;
    }
    
    .btn {
        padding: 0.4rem 1rem;
        font-size: 0.9rem;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .action-buttons .btn {
        width: 100%;
        margin-bottom: 5px;
    }
    
    .login-card {
        padding: 20px;
    }
    
    .modal-dialog {
        margin: 0.5rem;
    }
    
    /* Hide icons on small screens to save space */
    .nav-link i {
        margin-right: 0;
    }
    
    .nav-link i + span {
        display: none;
    }
    
    /* Stack form columns */
    .row.g-3 > [class*="col-"] {
        margin-bottom: 1rem;
    }
    
    /* Reduce heading sizes */
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    h4 {
        font-size: 1.1rem;
    }
    
    /* Make tables scrollable horizontally */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Adjust calendar for mobile */
    .calendar-day {
        min-height: 60px;
        padding: 5px;
        font-size: 0.85rem;
    }
}

/* Small devices (tablets, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .container-fluid {
        padding: 0 20px;
    }
    
    .stats-card h2 {
        font-size: 1.75rem;
    }
    
    .card-body {
        padding: 1.25rem;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .navbar-expand-lg .navbar-nav {
        flex-direction: column;
    }
    
    .dropdown-menu {
        position: static !important;
        transform: none !important;
        width: 100%;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
    .main-content {
        padding-top: 20px;
    }
    
    .container-fluid {
        padding: 0 30px;
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container-fluid {
        max-width: 1400px;
        margin: 0 auto;
    }
}

/* Landscape orientation for mobile devices */
@media (max-width: 767.98px) and (orientation: landscape) {
    .navbar {
        padding: 0.25rem 1rem;
    }
    
    .navbar-brand {
        font-size: 1rem;
    }
    
    .main-content {
        padding-top: 10px;
    }
}

/* Print media query */
@media print {
    body {
        background: white;
    }
    
    .navbar,
    .footer,
    .btn,
    .action-buttons,
    .no-print {
        display: none !important;
    }
    
    .main-content {
        margin: 0;
        padding: 0;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }
    
    .table {
        border: 1px solid #ddd;
    }
    
    .table thead {
        background-color: #f0f0f0 !important;
        color: black !important;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .form-control,
    .form-select {
        min-height: 44px;
    }
    
    .table tbody tr {
        cursor: pointer;
    }
    
    /* Remove hover effects on touch devices */
    .card:hover,
    .btn:hover,
    .table tbody tr:hover {
        transform: none;
    }
    
    /* Larger checkboxes and radio buttons */
    .form-check-input {
        width: 1.5rem;
        height: 1.5rem;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .profile-img,
    .profile-img-lg {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* Dark mode support (if user prefers dark mode) */
@media (prefers-color-scheme: dark) {
    /* Optionally add dark mode styles here in future updates */
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Utilities for hiding/showing on different screens */
.mobile-only {
    display: none;
}

@media (max-width: 767.98px) {
    .mobile-only {
        display: block;
    }
    
    .desktop-only {
        display: none;
    }
}

.tablet-only {
    display: none;
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .tablet-only {
        display: block;
    }
}

/* Responsive font sizes */
@media (max-width: 575.98px) {
    html {
        font-size: 14px;
    }
}

@media (min-width: 576px) and (max-width: 767.98px) {
    html {
        font-size: 15px;
    }
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

/* Responsive spacing */
@media (max-width: 575.98px) {
    .mt-4, .my-4 {
        margin-top: 1rem !important;
    }
    
    .mb-4, .my-4 {
        margin-bottom: 1rem !important;
    }
    
    .pt-4, .py-4 {
        padding-top: 1rem !important;
    }
    
    .pb-4, .py-4 {
        padding-bottom: 1rem !important;
    }
}



