/* ============================================ */
/*               RESPONSIVE STYLES            */
/* ============================================ */

/* Large devices and up (1200px and up) */
@media screen and (max-width: 1200px) {
    .main-content.sidebar-open {
        margin-left: 0;
    }

    .filter-options {
        margin: 0 clamp(10px, 2vw, 80px);
    }

    .image-section-large {
        height: 70vh;
    }
}

/* Medium devices (landscape tablets, 992px and up) */
@media screen and (max-width: 992px) {
    .hero-content {
        bottom: 25%;
    }

    .welcome-section {
        padding: 40px 15px;
    }

    .main-content {
        margin-left: 0 !important;
        /* Override JS margin on mobile */
    }

    .filter-options {
        justify-content: flex-start;
        padding: 0 10px;
    }

    .filter-option {
        flex: 0 1 auto;
    }

    .row {
        flex-direction: column;
    }

    .col-md-4 {
        padding-top: var(--spacing-unit);
    }

    .btn-add-to-selection {
        flex: 1;
        margin-right: var(--spacing-unit);
    }

    .image-section-large {
        display: none;
    }

    .image-section-small {
        display: block;
        margin-bottom: var(--spacing-unit);
    }

    .row {
        gap: var(--spacing-unit);
    }

    .container {
        padding: 0 15px;
    }

    .coordonnes .row {
        flex-direction: column;
    }

    .coordonnes .col-md-6 {
        width: 100%;
        margin-bottom: var(--spacing-unit);
    }

    .row > [class*='col-'] {
        margin-bottom: var(--spacing);
    }

    .calendar-section {
        margin-top: var(--spacing);
    }

    /* Prevent body scroll when sidebars are open on mobile */
    body.sidebar-open {
        overflow: hidden;
    }
}

/* Small devices (portrait tablets and large phones, 768px and up) */
@media screen and (max-width: 768px) {
    .navbar {
        flex-wrap: nowrap;
        padding: 10px;
    }

    .menu-icon {
        width: 17px !important;
        height: 18px !important;
    }

    .toggle-btn {
        font-size: 12px;
    }

    .header-logo {
        height: 44px !important;
    }

    .nav-links a {
        font-size: 0.5rem;
        font-size: 14px;
        margin: 0 10px;
    }

    .iconsna {
        display: flex;
        justify-content: flex-end;
        flex-wrap: nowrap;
        font-size: 0.68rem;
    }

    .carousel-controls {
        top: 64% !important;
        padding: 0 10px;
    }

    .actuhomeimages {
        height: 250px;
        width: 100%;
    }

    .filter-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .filter-options {
        justify-content: flex-start;
        flex-wrap: nowrap;
        padding: 0 10px;
        margin: 0;
        min-width: min-content;
    }

    .filter-option {
        flex: 0 0 auto;
        padding: 8px 12px;
    }

    .productimagecategory {
        padding: 0 10px;
    }

    .col-md-6 {
        padding-left: 10px;
        padding-right: 10px;
    }

    .container-fluid {
        padding: 15px;
    }

    .product-info {
        margin-top: 20px;
    }

    .d-flex.justify-content-between {
        flex-wrap: wrap;
        gap: 10px;
    }

    .location-iframe {
        width: 95%;
    }

    .sidebar {
        width: 220px;
        left: -220px;
    }

    .secondary-sidebar {
        width: 200px;
        left: -200px;
    }

    .secondary-sidebar.open {
        left: 220px;
        /* Matches main sidebar width */
    }

    .sidelogo img {
        width: 120px;
    }

    .calendar-table {
        font-size: 0.9rem;
    }

    .store-info,
    .appointment-box {
        margin-bottom: var(--spacing);
    }

    .contactForm-service {
        padding: var(--spacing) !important;
    }
}

/* Small devices (600px and down) */
@media only screen and (max-width: 600px) {
    .ACTUALITES {
        padding: 1em 1.5em;
    }
}

/* Extra small devices (phones, 576px and down) */
@media screen and (max-width: 576px) {
    .home_search {
        width: 90%;
        max-width: 300px;
    }

    #videoTitle {
        font-size: 0.99rem !important;
        font-size: 1.2rem;
    }

    .carousel-controls {
        padding: 0 10px;
    }

    .hero-content {
        bottom: 30%;
    }

    .textInImage {
        font-size: 2em;
    }

    .projecthome {
        padding: 1em 2em;
    }

    .selection-button {
        flex-direction: row !important;
    }

    .container.text-center.my-5 {
        padding: 15px;
    }

    .filter-option svg {
        width: 16px;
        height: 16px;
    }

    .image-category {
        height: clamp(180px, 50vw, 200px);
    }

    .thumbnail-gallery {
        gap: 8px;
        padding: 10px 0;
    }

    .color-circle {
        width: 16px;
        height: 16px;
        margin: 0 2px;
    }

    .btn-add-to-selection,
    .btn-heart {
        width: 100%;
        margin-top: 10px;
    }

    .d-flex.justify-content-end {
        flex-direction: column;
    }

    .sidebar {
        width: 200px;
        left: -200px;
    }

    .secondary-sidebar {
        width: 180px;
        left: -180px;
    }

    .secondary-sidebar.open {
        left: 200px;
        /* Matches main sidebar width */
    }

    .sidebaropenl li {
        padding: 10px 12px;
        font-size: 13px;
    }

    .liesSecondsidebar {
        padding: 8px 12px;
        font-size: 12px;
    }

    .sidelogo img {
        width: 100px;
    }

    .calendar-nav h3 {
        font-size: 1rem;
    }

    .calendar-table th,
    .calendar-table td {
        padding: 6px;
    }

    .row.mt-4 {
        margin-top: var(--spacing) !important;
    }

    .form-control,
    .form-select {
        font-size: 16px; /* Prevents zoom on mobile */
    }

    .hours {
        padding: 15px;
        font-size: 0.9rem;
    }

    .carousel-control-prev,
    .carousel-control-next {
        width: 12%;
    }

    .location-iframe {
        width: 100%;
        height: 300px;
    }
}

/* Extra small devices (480px and down) */
@media screen and (max-width: 480px) {
    #videoTitle {
        font-size: 0.99rem !important;
    }

    .home_search {
        width: 264px !important;
    }

    #search-input {
        border-top-right-radius: 16px !important;
        border-bottom-right-radius: 16px !important;
        margin-bottom: 0 !important;
    }
}

/* Small devices (portrait tablets and large phones, 600px and up) */
@media only screen and (min-width: 600px) {
    .ACTUALITES {
        padding: 1.5em 2em;
    }
}

/* Medium devices (landscape tablets, 768px and up) */
@media only screen and (min-width: 768px) {
    .ACTUALITES {
        padding: 2em 3em;
    }
}

/* Large devices (laptops/desktops, 992px and up) */
@media only screen and (min-width: 992px) {
    .ACTUALITES {
        padding: 2em 4em;
        /* Original padding */
    }
}

/* Touch device optimizations */
@media (hover: none) {
    .thumbnail,
    .color-circle,
    .btn-heart,
    .btn-add-to-selection {
        transition: none;
    }

    .thumbnail-gallery {
        padding: 15px 0;
        gap: 15px;
    }

    .btn-sm,
    .btn-heart,
    .btn-add-to-selection {
        padding: 12px;
    }
}

/* Accessibility - Reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}