/**
 * Responsive styles
 *
 * @package ChaletMontagne
 */

/*--------------------------------------------------------------
>>> TABLE OF CONTENTS:
----------------------------------------------------------------
1.0 - Tablet (max-width: 1024px)
2.0 - Mobile (max-width: 768px)
3.0 - Small Mobile (max-width: 480px)
--------------------------------------------------------------*/

/*--------------------------------------------------------------
1.0 - Tablet (max-width: 1024px)
--------------------------------------------------------------*/
@media screen and (max-width: 1024px) {
    .site-container {
        padding: 0 15px;
    }

    .cm2-location-gallery {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    .cm2-locations-listing {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }
}

/*--------------------------------------------------------------
2.0 - Mobile (max-width: 768px)
--------------------------------------------------------------*/
@media screen and (max-width: 768px) {
    /* Typography */
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }

    /* Header */
    .site-branding {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    /* Navigation */
    .main-navigation {
        margin-top: 1rem;
    }

    .main-navigation ul {
        flex-direction: column;
        gap: 0;
        width: 100%;
    }

    .main-navigation li {
        width: 100%;
        text-align: center;
    }

    .main-navigation a {
        display: block;
        padding: 12px 0;
        border-bottom: 1px solid var(--color-border);
    }

    /* Mobile menu toggle */
    .menu-toggle {
        display: block;
        width: 100%;
        padding: 12px;
        background-color: var(--color-primary);
        color: #fff;
        border: none;
        border-radius: 4px;
        cursor: pointer;
        margin-top: 1rem;
    }

    .main-navigation ul {
        display: none;
    }

    .main-navigation.toggled ul {
        display: flex;
    }

    /* Content */
    .site-content {
        padding: 20px 0;
    }

    /* Sidebar */
    #secondary {
        margin-top: 2rem;
    }

    /* Footer */
    .footer-widget {
        margin-bottom: 2rem;
    }

    .footer-widget:last-child {
        margin-bottom: 0;
    }

    /* Plugin overrides */
    .cm2-planning-container,
    .cm2-contact-form {
        padding: 1rem;
    }

    .cm2-location-header {
        margin: -1rem -1rem 1rem;
        height: 250px;
    }

    .cm2-location-tabs {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .cm2-tab-btn {
        flex: 1;
        min-width: 120px;
        padding: 10px 15px;
        font-size: 0.9rem;
    }

    .cm2-tab-content {
        padding: 1.5rem 0;
    }

    .cm2-location-details {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .cm2-location-equipements ul {
        grid-template-columns: 1fr;
    }

    .cm2-locations-listing {
        grid-template-columns: 1fr;
    }

    .cm2-location-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    /* Table responsive */
    .cm2-tarifs-table {
        font-size: 0.9rem;
    }

    .cm2-tarifs-table th,
    .cm2-tarifs-table td {
        padding: 0.75rem 0.5rem;
    }

    /* Breadcrumbs */
    .breadcrumbs {
        font-size: 0.85rem;
        padding: 0.75rem;
    }

    /* Pagination */
    .page-numbers {
        padding: 6px 10px;
        margin: 0 2px;
        font-size: 0.9rem;
    }
}

/*--------------------------------------------------------------
3.0 - Small Mobile (max-width: 480px)
--------------------------------------------------------------*/
@media screen and (max-width: 480px) {
    /* Typography */
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }

    /* Buttons */
    .button,
    button,
    input[type="submit"] {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    /* Forms */
    input[type="text"],
    input[type="email"],
    input[type="url"],
    input[type="password"],
    input[type="search"],
    input[type="number"],
    input[type="tel"],
    input[type="date"],
    textarea,
    select {
        padding: 8px 12px;
        font-size: 0.9rem;
    }

    /* Location header */
    .cm2-location-header {
        height: 200px;
    }

    /* Gallery */
    .cm2-location-gallery {
        grid-template-columns: 1fr;
    }

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

    /* Tabs */
    .cm2-location-tabs {
        flex-direction: column;
        border-bottom: none;
    }

    .cm2-tab-btn {
        width: 100%;
        border-bottom: 1px solid #e0e0e0;
        border-left: 3px solid transparent;
    }

    .cm2-tab-btn.active {
        border-bottom-color: #e0e0e0;
        border-left-color: var(--color-primary);
        background-color: rgba(44, 95, 124, 0.05);
    }

    /* Contact form */
    .cm2-contact-form {
        padding: 1rem;
    }

    /* Table */
    .cm2-tarifs-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .cm2-tarifs-table thead {
        display: none;
    }

    .cm2-tarifs-table tbody tr {
        display: block;
        margin-bottom: 1rem;
        border: 1px solid #e0e0e0;
        border-radius: 4px;
    }

    .cm2-tarifs-table td {
        display: block;
        text-align: left;
        padding: 0.5rem 1rem;
    }

    .cm2-tarifs-table td::before {
        content: attr(data-label);
        font-weight: 600;
        display: block;
        margin-bottom: 0.25rem;
        color: var(--color-primary);
    }

    /* Social links */
    .social-links {
        justify-content: center;
    }

    .social-link {
        width: 35px;
        height: 35px;
    }
}

/* Print styles */
@media print {
    .site-header,
    .main-navigation,
    .site-footer,
    .menu-toggle,
    .breadcrumbs,
    .social-links,
    .cm2-tab-btn {
        display: none;
    }

    .cm2-tab-content {
        display: block !important;
    }

    body {
        font-size: 12pt;
        color: #000;
        background: #fff;
    }

    a {
        color: #000;
        text-decoration: underline;
    }
}
