/**
 * Mobile Stylesheet v02
 * Optimized mobile CSS with AJAX navigation and modern features support
 * November 2025
 */

@media screen and (max-width: 767px) {

    /* ========================================
       ROOT VARIABLES & TYPOGRAPHY
    ======================================== */
    
    html {
        font-size: 4.0vw;
        caret-color: transparent;
    }
   
    :root {
        --typo-xs: 0.75rem;
        --line-xs: 1.2;
        --typo-normal: 1.0rem;
        --line-normal: 1.4;
        --typo-h6: 1.2rem;
        --line-h6: 1.3;
        --typo-h5: 1.5rem;
        --line-h5: 1.3;
        --typo-h4: 1.8rem;
        --line-h4: 1.2;
        --typo-large: 2.2rem;
        --line-large: 1.1;
        --typo-xlarge: 2.8rem;
        --line-xlarge: 1.05;
        --typo-title: 2.5rem;
        --line-title: 1.05;
        --xlreductor: 30px;
        --lreductor: 20px;
        --reductor: 15px;
        --sreductor: 8px;
        --xsreductor: 4px;
        --padd-short: 3%;
        --padd-global: 15px;
        --correction: 0;
        --global-bottom-margin: 4vw;
        --antimargin: -5vw;
        --short-bottom-margin: 3vw;
        --lateral: 5vw;
        --max-width: 100%;
        --inner-grid-width: calc(var(--max-width));
        --column: calc((var(--inner-grid-width) / 12));
    }

    /* ========================================
       BODY LOCK DURING NAVIGATION
    ======================================== */
    
    html.is-navigating,
    body.is-navigating {
        overflow: hidden;
        overscroll-behavior: contain;
    }

    /* ========================================
       PAGE TRANSITION OVERLAY
    ======================================== */
    
    .page-transition::after {
        /* Spinner slightly smaller on mobile */
        width: 40px;
        height: 40px;
        border-width: 4px;
    }

    /* ========================================
       LOGO
    ======================================== */
    
    .logo,
    .logo-main,
    .logo-discrete {
        max-height: 100%;
        padding: 5px 0;
        flex-basis: 100%;
        left: 12px;
    }
    
    .logosvg,
    .logo img {
        max-height: 8vh;
    }

    /* ========================================
       TOPBAR & MENU
    ======================================== */
    
    .topbar {
        height: 60px;
        padding: 0 var(--lateral);
        display: flex;
    }
    .topbar-bg {
        left: 0;
        /* background: yellow; */
    }
    a.burger {
        display: block;
        position: fixed;
        top: 15px;
        right: var(--lateral);
        width: 40px;
        height: 40px;
        z-index: 100;
        cursor: pointer;
    }
    
    .burger .menu_bar {
        display: block;
        width: 100%;
        height: 2px;
        background: var(--color-black);
        margin-bottom: 8px;
        transition: all 0.3s ease;
    }
    
    .burger.menuclosed .top_menu_bar {
        transform: rotate(45deg);
        transform-origin: center;
    }
    
    .burger.menuclosed .mid_menu_bar {
        opacity: 0;
    }
    
    .burger.menuclosed .bot_menu_bar {
        transform: rotate(-45deg);
        transform-origin: center;
    }

    /* Main Menu Wrapper */
    .main-menu-wrapper {
        position: fixed;
        width: 100%;
        height: 100vh;
        top: 0;
        left: 0;
        transform: translateY(-100%);
        transition: transform 0.4s var(--speedy);
        overflow-y: auto;
        overflow-x: hidden;
        z-index: 99;
        background: var(--color-white);
    }

    ul.main-menu {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
        justify-content: flex-start;
        padding: 80px var(--lateral) 40px;
        flex-wrap: nowrap;
    }
    
    li.menu-item {
        height: auto;
        transform: none;
        margin-bottom: 0;
    }
    
    a.menu-bt {
        display: block;
        font-size: var(--typo-h4);
        height: auto;
        line-height: 1.4;
        padding: 15px 0;
        background-image: none !important;
    }
    
    a.menu-bt::after {
        display: none;
    }
    
    li.menu-item:hover a.menu-bt,
    a.menu-bt:hover,
    a.menu-bt.dock_a_sel {
        background-size: 0 100%;
    }

    /* Sub-menu mobile behavior */
    ul.sub-menu {
        position: relative;
        opacity: 0;
        max-height: 0;
        overflow: hidden;
        pointer-events: none;
        visibility: hidden;
        transform: translateY(0);
        transition: max-height 0.4s ease, opacity 0.3s ease, visibility 0.3s ease;
        padding-left: 20px;
        border: none;
    }
    
    ul.sub-menu.mobile_opened {
        opacity: 1;
        max-height: 1000px;
        pointer-events: all;
        visibility: visible;
    }
    
    li.sub-menu-item {
        padding: 0;
    }
    
    li.sub-menu-item:last-child {
        padding-bottom: 15px;
    }
    
    li.sub-menu-item a {
        font-size: var(--typo-h6);
        padding: 0;
        opacity: 0.8;
    }

    /* Mobile-only menu items */
    li.mobile_only {
        visibility: visible;
        opacity: 1;
        display: flex;
        height: 40px !important;
        margin: 4px !important;
    }

    /* Bottom menu in mobile */
    li.bottom-menu {
        position: relative;
        right: auto;
        bottom: auto;
        justify-content: flex-start;
        visibility: visible;
        opacity: 1;
        margin-top: 30px;
    }
    
    li.bottom-menu ul {
        flex-direction: row;
        display: flex;
        gap: 20px;
    }
    
    li.bottom-menu a {
        font-size: var(--typo-normal);
        opacity: 0.6;
    }

    /* Menu tools */
    .menu-tools {
        padding: 0 !important;
    }
    
    .actions {
        gap: 15px;
    }
    
    .actions span {
        width: auto;
    }
    
    .actions a::before {
        font-size: 1.4rem;
    }
    
    span.tooltiptext {
        display: none;
    }

    /* Footer menu - disable submenu hover */
    .menu-footer-col li.menu-item:hover > ul.sub-menu {
        opacity: 0;
        pointer-events: none;
        visibility: hidden;
    }

    /* ========================================
       ARIANE / BREADCRUMB
    ======================================== */
    
    .ariane {
        display: none;
    }
    
    .separator.topper {
        height: 60px;
    }

    /* ========================================
       HEAD / HERO SECTIONS
    ======================================== */
    
    .head_title {
        padding-top: 0;
        padding-left: 0;
        padding-right: 0;
    }
    
    .head_title.large figure,
    .head_title.large video {
        height: 50vh;
    }
    
    .head_title h1 {
        font-size: var(--typo-title);
        line-height: var(--line-title);
    }
    
    .head_title h2 {
        font-size: var(--typo-h5);
    }

    .title_wrapper.large {
        height: 33vh;
    }

    .title_wrapper.classic {
        margin-top: 0;
    }

    .title_block.title-hidden {
        width: 100%;
    }

    .head_title svg {
        max-width: 100%;
    }

    .title_wrapper.large .title_infos h1 {
        letter-spacing: 0;
    }
    
    /* ========================================
       CONTENT WRAPPER & GRID
    ======================================== */

    .page {
        padding-top: 60px;
    }
    
    .content_wrapper {
        /* padding: 0 var(--lateral); */
        grid-template-columns: repeat(12, 1fr);
    }
    
    .struct:empty {
        height: 0;
        min-height: 0;
        padding-bottom: 0;
    }
    
    .nogap {
        padding: var(--lateral);
    }
    
    .nogap > * {
        padding: 2vh;
    }

    .leftpadded {
        padding-left: 0;
    }

    /* Grid columns mobile override */
    .elem_1, .elem_2, .elem_3, .elem_4, 
    .elem_5, .elem_6, .elem_7, .elem_8, 
    .elem_9, .elem_10, .elem_11, .elem_12 {
        grid-column: span 12 !important;
        padding-bottom: var(--global-bottom-margin);
    }
    
    .in_flex_mode {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Empty elements */
    .twocol_elem:empty,
    .threecol_elem:empty {
        display: none;
        min-height: 0;
        padding: 0;
        margin: 0;
    }

    /* Padding adjustments */
    .rightpadded {
        padding-left: 0;
    }
    
    .leftpadded {
        padding-right: 0;
    }
    
    .expanded_h {
        padding-top: 15px;
        padding-bottom: 15px;
    }
    
    .expanded_w {
        padding-left: 15px;
        padding-right: 15px;
    }

    /* ========================================
       CONTENT BLOCKS
    ======================================== */

    /* cblock */
    .cblock.small,
    .cblock.medium,
    .cblock.large
    {
        width: calc(var(--column) * 12);
        margin-bottom: 0;
    }

    /* Hr */
    .h5, .h10, .h25 {  
        min-height: 1vh;
    }

    hr.chr {
        min-height: 0;
        height: 0;
    }

    .chr.default {
        width: 90vw;
    }

    /* Decal */

    .decal-top {
        transform: translateY(0);
    }
    .decal-right {
        transform:translateX(0);
    }
    .decal-bottom {
        transform: translateY(0);
    }
    .decal-left {
        transform:translateX(0);
    }
    .decal-top.decal-left {
        transform:translate3d(0, 0, 0);
    }
    .decal-top.decal-right {
        transform:translate3d(0, 0, 0);
    }
    .decal-bottom.decal-left {
        transform:translate3d(0, 0, 0);
    }
    .decal-bottom.decal-right {
        transform:translate3d(0, 0, 0);
    }
    
    /* Text blocks */
    .ctext {
        margin-bottom: var(--global-bottom-margin);
    }
    
    .ctext.downed {
        margin-bottom: calc(var(--global-bottom-margin) * 1.5);
    }
    
    .ctext p {
        font-size: var(--typo-normal);
        line-height: var(--line-normal);
    }
    
    .splitted {
        column-count: 1;
    }
    
    p:not(.pbig) a.arrowed,
    table a.arrowed {
        width: 100%;
        display: inline-block;
    }

    /* Titles */
    .cintertitle h2,
    .cintertitle h3 {
        font-size: var(--typo-h4);
        margin-bottom: var(--short-bottom-margin);
    }

    /* Images */
    .cpic,
    .title_pic {
        margin-bottom: 0;
    }
    
    .cpic img,
    .title_pic img {
        width: 100%;
        height: auto;
    }
    
    figcaption.legende {
        font-size: var(--typo-xs);
        padding: 10px 0;
    }

    /* Videos */
    .cvideo {
        margin-bottom: var(--global-bottom-margin);
    }
    
    video {
        width: 100%;
        height: 100%;
    }

    /* Quotes */
    .cquote {
        padding: 20px;
        margin-bottom: var(--global-bottom-margin);
    }
    
    .cquote p {
        font-size: var(--typo-h6);
        line-height: var(--line-h6);
    }

    /* Documents */
    .cdoc {
        margin-bottom: var(--global-bottom-margin);
    }

    /* ========================================
       COLLAPSIBLE CONTENT
    ======================================== */
    
    .ccollaps,
    .ccollaps.short {
        margin-bottom: var(--global-bottom-margin);
        width: 92vw;
    }
    
    button.accordion {
        padding: 12px 40px 12px 0;
        font-size: var(--typo-h6);
    }
    
    button.accordion::after {
        right: 15px;
        font-size: 1.2rem;
    }
    
    .panel {
        padding: 0;
    }

    .panel-wrapper.opened {
        padding: 0 0 var(--global-bottom-margin) 0;
    }

    /* ========================================
       GALLERIES & LOOKS
    ======================================== */
    
    .cgallery.looks_six {
        margin-bottom: var(--global-bottom-margin);
    }

    /* Looks variants mobile */
    .looks_one,
    .looks_two,
    .looks_three,
    .looks_four,
    .looks_five {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .looks_one > *,
    .looks_two > *,
    .looks_three > *,
    .looks_four > * {
        grid-column: span 1;
    }

    /* Swiper galleries mobile */
    .cgallery.looks_six {
        margin-bottom: var(--global-bottom-margin);
        min-height: 33vh;
    }
    
    .looks_six .cthumb {
        width: 90vw !important;
        margin-right: 10px;
    }
    
    .tech_local {
        margin-top: 15px;
    }
    
    .tech_tool {
        width: 35px;
        height: 35px;
    }
    
    .swiper-pagination {
        margin-top: 15px;
    }
    
    .swiper-pagination-bullet {
        width: 8px;
        height: 8px;
        margin: 0 5px;
    }

    /* ========================================
       HOME ITEMS / CARDS
    ======================================== */
    
    .home_items {
        padding: 0 var(--lateral);
        grid-template-columns: repeat(12, 1fr);
        gap: var(--global-bottom-margin);
    }

    /* Emperor */
    .emperor {
        grid-column: span 12;
        padding: 15vh var(--lateral) 0;
    }
    
    .emperor a {
        flex-direction: column;
    }
    
    .emperor figure.h_img,
    .emperor video.h_vid {
        width: 100%;
        height: 50vh;
    }
    
    .emperor span.t_infos {
        flex-basis: auto;
        padding: 20px 0;
    }
    
    .emperor.fullvideo {
        height: 70vh;
    }

    /* Tzar */
    .tzar {
        grid-column: span 12;
        flex-direction: column;
    }
    
    .tzar figure.h_img,
    .tzar video.h_vid {
        width: 100%;
        height: 40vh;
    }
    
    .tzar span.t_infos {
        order: 1;
        padding: 15px 0;
    }

    /* Privilege */
    .privilege {
        grid-column: span 12;
        flex-direction: column;
    }
    
    .privilege figure.h_img,
    .privilege video.h_vid {
        width: 100%;
        height: 40vh;
    }
    
    .privilege span.t_infos {
        padding: 15px 0;
    }

    /* Duc, Superduc, Tradition */
    .duc,
    .superduc,
    .tradition,
    .premier {
        grid-column: span 12;
    }
    
    .duc figure.h_img,
    .superduc figure.h_img,
    .tradition figure.h_img,
    .premier figure.h_img {
        height: 35vh;
    }
    
    .duc span.h_title,
    .superduc span.h_title,
    .tradition span.h_title,
    .premier span.h_title {
        font-size: var(--typo-h5);
    }
    
    .duc span.h_subtitle,
    .superduc span.h_subtitle,
    .tradition span.h_subtitle,
    .premier span.h_subtitle {
        font-size: var(--typo-normal);
    }

    /* Portrait */
    .portrait {
        grid-column: span 6;
    }
    
    .portrait figure.h_img {
        height: 30vh;
    }

    /* ========================================
       LISTS & FILTERS
    ======================================== */
    
    .list_wrapper {
        padding: 0 var(--lateral);
        grid-template-columns: repeat(2, 1fr);
        gap: var(--global-bottom-margin);
    }
    
    .list_wrapper > div {
        grid-column: span 1;
    }
    
    .list div.list_title {
        padding: 15vh var(--lateral) 5vh;
    }
    
    .list_title h1 {
        font-size: var(--typo-title);
    }

    /* Filters */
    .sub_filt_wrapper {
        padding: 15px var(--lateral);
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .list-menu-left,
    .list-menu-right {
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 10px;
    }
    
    .list-menu-right {
        width: 100%;
        justify-content: flex-start;
        padding-top: 10px;
    }
    
    a.filter {
        white-space: nowrap;
        font-size: var(--typo-normal);
        padding: 8px 15px;
    }
    
    a.filter::after {
        display: none;
    }

    /* More news grid */
    .list_wrapper.more_news {
        margin-left: 0;
        padding: 0 var(--lateral);
        grid-template-columns: repeat(2, 1fr);
    }
    
    .more_news > div {
        grid-column: span 1;
    }
    
    .more_news div h3 {
        font-size: var(--typo-h6);
    }

    /* ========================================
       ANCHOR MENU
    ======================================== */
    
    .anchor_menu {
        height: 50px;
        padding: 0 var(--lateral);
    }
    
    .anchor_menu a {
        font-size: var(--typo-normal);
        line-height: 40px;
        height: 40px;
        padding: 0 15px 0 0;
        white-space: nowrap;
    }
    
    .anchor_menu_inset {
        gap: 10px;
    }

    /* ========================================
       SCROLLER
    ======================================== */
    
    .cscroller {
        /* margin-bottom: var(--global-bottom-margin); */
        padding: 0;
    }
    
    .scroll-item {
        width: 100% !important;
        margin-right: 15px;
    }

    /* ========================================
       FORMS
    ======================================== */
    
    form {
        padding: 0;
    }
    
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    textarea {
        width: 100%;
        font-size: var(--typo-normal);
        padding: 12px;
    }
    
    button[type="submit"],
    input[type="submit"] {
        width: 100%;
        font-size: var(--typo-h6);
        padding: 15px;
    }

    /* ========================================
       SEARCH
    ======================================== */
    
    #search_wrapper {
        padding: 0 var(--lateral);
    }
    
    .search_closed {
        visibility: hidden;
        opacity: 0;
        pointer-events: none;
    }
    
    .search_opened {
        visibility: visible;
        opacity: 1;
        pointer-events: all;
        z-index: 101;
    }
    
    a#gosearch,
    a.close_search {
        width: 40px;
        height: 40px;
    }
    
    a.close_search {
        right: var(--lateral);
        top: 20px;
    }
    
    input#keyword {
        width: calc(100% - 60px);
        font-size: var(--typo-h5);
        padding: 10px;
    }

    /* ========================================
       FOOTER
    ======================================== */
    
    .footer {
        padding: 40px var(--lateral);
    }
    
    .footer_wrapper {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .col-footer-small,
    .col-footer-medium {
        grid-column: 2 / 12;
    }

    .col-footer-small {
        border-top: none;
    }
    
    .menu-footer-col {
        grid-column: span 1;
    }
    
    .menu-footer-col h3 {
        font-size: var(--typo-h6);
        margin-bottom: 15px;
    }
    
    .menu-footer-col ul {
        gap: 10px;
    }
    
    .menu-footer-col a {
        font-size: var(--typo-normal);
    }

    .footer-infos svg {
        max-width: calc(8.3333% * 10);
    }

    /* ========================================
       POPUP / MODAL
    ======================================== */
    
    #popup_display {
        padding: 20px;
    }
    
    .popup_content {
        width: 100%;
        max-width: 100%;
        padding: 30px var(--lateral);
        max-height: 80vh;
        overflow-y: auto;
    }
    
    a.popup_bt.close {
        top: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
    }

    /* ========================================
       CALENDAR / AGENDA
    ======================================== */
    
    .calendar_wrapper {
        padding: 0 var(--lateral);
    }
    
    .calendar_grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .calendar_item {
        grid-column: span 1;
    }
    
    .calendar_item.featured {
        grid-column: span 2;
    }

    /* ========================================
       TABLES
    ======================================== */
    
    table {
        font-size: var(--typo-xs);
        overflow-x: auto;
        display: block;
    }
    
    thead {
        display: none;
    }
    
    tr {
        display: block;
        margin-bottom: 20px;
        border-bottom: 2px solid var(--color-black);
    }
    
    td {
        display: block;
        text-align: left;
        padding: 8px 0;
    }
    
    td::before {
        content: attr(data-label);
        font-weight: bold;
        display: block;
        margin-bottom: 5px;
    }

    /* ========================================
       UTILITIES
    ======================================== */
    
    .hide-mobile {
        display: none !important;
    }
    
    .show-mobile {
        display: block !important;
    }
    
    .text-center-mobile {
        text-align: center;
    }
    
    .no-padding-mobile {
        padding: 0 !important;
    }
    
    .no-margin-mobile {
        margin: 0 !important;
    }

    /* ========================================
       ASPECT RATIO FALLBACKS (Mobile)
    ======================================== */
    
    @supports not (aspect-ratio: 1) {
        .title_pic_wrapper,
        .looks_one > *,
        .looks_two > *,
        .looks_three > *,
        .looks_four > *,
        .looks_five > * {
            position: relative;
            padding-bottom: 75%; /* 4:3 default */
        }
        
        .title_pic_wrapper img,
        .looks_one > * img,
        .looks_two > * img,
        .looks_three > * img,
        .looks_four > * img,
        .looks_five > * img {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
    }

    /* ========================================
       PERFORMANCE OPTIMIZATIONS
    ======================================== */
    
    /* Reduce animations on mobile for performance */
    * {
        -webkit-tap-highlight-color: transparent;
        cursor: default;
        caret-color: transparent;
    }
    
    /* Smooth scrolling optimization */
    html {
        -webkit-overflow-scrolling: touch;
    }
    
    /* Prevent zoom on input focus iOS */
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="number"],
    textarea {
        font-size: 16px !important;
    }

}

/* ========================================
   TABLET SPECIFIC (768px - 1024px)
======================================== */

@media screen and (min-width: 768px) and (max-width: 1024px) {
    
    html {
        font-size: 2.5vw;
    }
    
    :root {
        --lateral: 4vw;
        --global-bottom-margin: 5vw;
    }
    
    .content_wrapper,
    .home_items,
    .list_wrapper {
        grid-template-columns: repeat(12, 1fr);
    }
    
    .looks_one,
    .looks_two,
    .looks_three {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .duc,
    .tradition,
    .premier {
        grid-column: span 6;
    }
    
    .portrait {
        grid-column: span 4;
    }
    
    .list_wrapper > div {
        grid-column: span 6;
    }
    
    .more_news > div {
        grid-column: span 4;
    }
    
    .calendar_grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .calendar_item {
        grid-column: span 1;
    }
    
    .calendar_item.featured {
        grid-column: span 3;
    }
}

/* ========================================
   SMALL MOBILE (max 375px)
======================================== */

@media screen and (max-width: 375px) {
    
    html {
        font-size: 4.5vw;
    }
    
    :root {
        --lateral: 4vw;
    }
    
    .looks_one,
    .looks_two,
    .looks_three,
    .looks_four {
        grid-template-columns: 1fr;
    }
    
    .portrait {
        grid-column: span 12;
    }
    
    .list_wrapper,
    .more_news {
        grid-template-columns: 1fr !important;
    }
    
    .list_wrapper > div,
    .more_news > div {
        grid-column: span 1 !important;
    }
}
