/**
 * Layout CSS - Structure et mise en page du thème
 * 
 * @package Synergin-2026
 * @since 1.0.0
 */

/* ========================================
   HEADER
   ======================================== */

.site-header {
    background: #fff;
    border-bottom: 1px solid #eee;
    padding: 20px 0;
}

/* Container du header */
#bloc-header {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    justify-self: center;
}

#bloc-header > div {
    max-width: 100%;
    overflow: visible;
    flex-direction: column;
}

#main-header {
    min-height: 4.0625rem;
    position: relative;
    margin: 20px auto;
    width: 90%;
    z-index: 999;
    max-width: 90rem;
}

/* Div décorative sous le header avec ::after */
#sub-header {
    position: relative;
    top: -75px;
    left: 0;
    right: 0;
    width: 80%;
    max-width: 84rem;
    min-height: 4rem;
    border-radius: 0.9375rem;
    z-index: -1;
    background: linear-gradient(90deg, #FFA800 0%, #6000FF 100%);
    margin: 0 auto;
}

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

.site-content {
    width: 100%;
    margin: 0 auto;
    background-color: #fff;
}

/* Max width for 4k */
.width-max {
    max-width: 110rem;
}

/* ========================================
   FOOTER
   ======================================== */

#main-footer {
    max-width: 110rem;
}

.site-footer {
    background: #f8f8f8;
    padding: 30px 20px;
    text-align: center;
    border-top: 1px solid #eee;
}

/* ========================================
   SECTIONS SPÉCIFIQUES
   ======================================== */

/* Background pour lieu-container */
#lieu-container {
    position: relative;
}

#lieu-container::before {
    content: '';
    position: absolute;
    top: 25px;
    left: 50%;
    transform: translateX(-50%);
    height: 78rem;
    background-color: #4c4a46;
    z-index: -1;
}

#lieu-container > .e-con-inner {
    position: relative;
    z-index: 1;
}

#purple-area,
#purple-area * {
    overflow: visible !important;
    z-index: auto;
}

#bee4 div {
    z-index: 10;
}

/* Image header home */
#img-header-home::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        180deg,
        #321E00 0%,
        #614802 30%,
        rgba(0, 0, 0, 0.8) 100%
    );
    background-blend-mode: overlay;
    pointer-events: none;
}

#home-fresque {
    position: relative;
    clip-path: polygon(
        0 10%,
        25% 0,
        25% 0,
        100% 10%,
        100% 100%,
        0 95%
    );
    z-index: 4;
    height: 40rem;
}

/* Page Agency */
#agency-fresque-photo {
    clip-path: polygon(
        0 0,
        100% 0,
        100% 85%,
        0 100%
    );
}

/* ========================================
   RESPONSIVE - TABLETTE
   ======================================== */

@media screen and (min-width: 768px) and (max-width: 1024px) {
    .site-content {
        max-width: 90rem;
        background-color: #fff;
    }
    
    #bloc-header {
        max-width: 87rem;
    }
    
    #sub-header {
        width: 80%;
    }
    
    #main-footer {
        max-width: 90rem;
    }
}

/* ========================================
   RESPONSIVE - DESKTOP
   ======================================== */

@media screen and (min-width: 1025px) and (max-width: 1250px) {
    #sub-header {
        width: 80%;
    }
    
    #main-header {
        width: 85%;
    }
    
    #main-header::after {
        width: 78.0625rem;
    }
}

@media screen and (min-width: 1250px) {
    .site-content {
        max-width: 100%;
        margin: 0 auto;
        background-color: #fff;
    }
}

/* ========================================
   RESPONSIVE - MOBILE
   ======================================== */

@media (max-width: 768px) {
    #main-header {
        width: 95%;
    }
    
    #main-header .e-con-inner {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }
    
    #main-header::after {
        width: 78.0625rem;
        min-height: 3rem;
    }
    
    /* Ordre mobile : hamburger à gauche, logo au centre, user icon à droite */
    #main-header .e-con-inner > .e-con:nth-child(1) {
        order: 2;
        flex: 1;
        justify-content: center;
    }
    
    #main-header .e-con-inner > .e-con:nth-child(2) {
        order: 1;
        flex: 0 0 auto;
    }
    
    #main-header .e-con-inner > .e-con:nth-child(3) {
        order: 3;
        flex: 0 0 auto;
    }

    .site-content {
        overflow-x: hidden;
    }

    #lieu-container::before {
        height: -webkit-fill-available;
    }

}

/* ========================================
   ELEMENTOR EDITOR - PREVIEW MODES
   ======================================== */

/* Support pour l'éditeur Elementor en mode mobile/tablet */
.elementor-device-mobile #main-header .e-con-inner,
.elementor-device-tablet #main-header .e-con-inner {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.elementor-device-mobile #main-header .e-con-inner > .e-con:nth-child(1),
.elementor-device-tablet #main-header .e-con-inner > .e-con:nth-child(1) {
    order: 2;
    flex: 1;
    justify-content: center;
}

.elementor-device-mobile #main-header .e-con-inner > .e-con:nth-child(2),
.elementor-device-tablet #main-header .e-con-inner > .e-con:nth-child(2) {
    order: 1;
    flex: 0 0 auto;
}

.elementor-device-mobile #main-header .e-con-inner > .e-con:nth-child(3),
.elementor-device-tablet #main-header .e-con-inner > .e-con:nth-child(3) {
    order: 3;
    flex: 0 0 auto;
}

/* ========================================
   SECTION HOME_PRES - Gestion mobile
   ======================================== */

@media (max-width: 767px) {
    /* Empêcher le débordement horizontal global */
    body {
        overflow-x: hidden;
    }
    
    #home_pres,
    .elementor-element-5fcd9a9 {
        overflow: hidden;
        max-width: 100vw;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    /* Conteneur parent pour éviter le débordement */
    #home_pres.e-con,
    .elementor-element-5fcd9a9.e-con {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }
    
    /* Compenser la rotation pour éviter le débordement */
    #home_pres.e-con > *,
    .elementor-element-5fcd9a9.e-con > * {
        max-width: 95%;
        margin-left: auto;
        margin-right: auto;
    }
}

