/* Styles personnalisés du thème */

/* Supprimer le flash bleu natif au toucher sur Safari et Chrome mobile. */
html {
    -webkit-tap-highlight-color: transparent;
}

/* Éviter le scroll horizontal */
body {
    overflow-x: hidden;
}

/* === TEMPLATE PROJETS === */
.metri-projets-template-container {
    padding: 0 133px 15px;
}

body.category .site-content,
body.category .content-area,
body.category .site-main,
body.tax-category .site-content,
body.tax-category .content-area,
body.tax-category .site-main {
    width: 100% !important;
    max-width: none !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
}

@media (max-width: 768px) {
    .metri-projets-template-container {
        padding-right: 0;
        padding-left: 0;
    }

    body.category .site-content,
    body.category .content-area,
    body.category .site-main,
    body.tax-category .site-content,
    body.tax-category .content-area,
    body.tax-category .site-main {
        padding-right: 0 !important;
        padding-left: 0 !important;
    }
}

/* === TEMPLATE PAGE - CONTENU COMPLET === */
.metri-page-contenu-complet-hero {
    display: flex;
    align-items: flex-end;
    box-sizing: border-box;
    position: fixed !important;
    top: 0;
    left: 0;
    z-index: 1 !important;
    width: 100vw;
    min-height: 80vh;
    margin: 0;
    padding: 0 133px 32px;
    color: #ffffff;
    background-color: #000000;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

body.has-page-contenu-complet-hero .metri-projets-template-container {
    position: relative;
    z-index: 2;
    min-height: 20vh;
    margin-top: 80vh;
    background-color: #ffffff;
}

.page-contenu-complet {
    width: 100%;
    max-width: var(--container-max-width, 1140px);
    margin-right: auto;
    margin-left: auto;
}

.metri-page-contenu-complet-hero-title {
    margin: 0;
    color: inherit;
}

body.has-page-contenu-complet-hero header.site-header,
body.has-page-contenu-complet-hero #masthead,
body.has-page-contenu-complet-hero .site-header,
body.has-page-contenu-complet-hero .elementor-location-header {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: transparent;
}

@media (max-width: 768px) {
    .metri-page-contenu-complet-hero {
        min-height: 50vh;
        padding: 0 20px 20px;
    }

    body.has-page-contenu-complet-hero .metri-projets-template-container {
        min-height: 50vh;
        margin-top: 50vh;
    }
}

/* === PROJETS - Grille et cartes === */
.projets-grid-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
}

.projets-grid-wrapper .projet-card {
    background: transparent;
}

.projets-grid-wrapper .projet-card-image {
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    background: transparent;
    display: block;
    text-decoration: none;
}

.projets-grid-wrapper .projet-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.projets-grid-wrapper .projet-card-image-placeholder {
    width: 100%;
    height: 100%;
    background-color: var(--random-theme-color, var(--e-global-color-secondary, #C8373F));
}

.projets-grid-wrapper .projet-card-content {
    padding: 0;
    padding-top: 5px;
    text-align: right;
}

.projets-grid-wrapper .projet-card-content h5 {
    margin: 0 0 12px 0;
    color: #000;
}

.projet-card-link {
    text-decoration: none;
    color: inherit;
}

/* Désactivé - géré par couleurs.php avec couleur aléatoire
.projet-card-link:hover h5,
.projet-card-link:hover h3,
.projet-card-link:hover p {
            color: var( --e-global-color-secondary );

}
*/


.projets-grid-wrapper .projet-lieu {
    margin: 0 0 8px 0;
    color: #000;

}

.projets-grid-wrapper .projet-card-content p {
    margin: 0;
}

@media (max-width: 768px) {
    .projets-grid-wrapper {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

.projet-infos-grid {
    display: grid;
    grid-template-columns: minmax(140px, 1fr) 2fr;
    column-gap: 2rem;
    row-gap: 0;
    align-items: start;
    margin-bottom: 2rem;
}

.projet-info-label {
    color: var( --e-global-color-secondary );
}

.projet-info-value {
    color: #000;
}

@media (max-width: 768px) {
    .projet-infos-grid {
        grid-template-columns: 1fr;
    }
    .projet-info-label {
    }
}

/* === PROJETS - Catégories === */
.projets-categories-wrapper {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
    align-items: flex-end;
}

.projets-categories-wrapper .category-tag {
    padding: 8px 0;
    background: transparent;
    border: none;
    text-decoration: none;
    color: inherit;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
}

.projets-categories-wrapper .category-tag:hover {
    color: var( --e-global-color-secondary );
}

.projets-categories-wrapper .category-tag.all-categories {
    margin-bottom: 10px;
}

/* Catégorie active */
.projets-categories-wrapper .category-tag.active {
    color: var( --e-global-color-secondary );
}

/* === PROJETS - Diaporama plein écran === */
.projets-hero-link {
    display: block;
    width: 100%;
    height: 100vh;
    position: relative;
    z-index: 1;
    text-decoration: none;
    color: inherit;
    pointer-events: auto;
    overflow: hidden;
    margin-left: calc(-50vw + 50%);
}

.projets-hero-container {
    position: relative;
    width: 100%;
    height: 100vh;
}

.projets-hero-slider {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    margin: 0;
}

.projets-hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    pointer-events: auto;
    display: block;
}

.projets-hero-slide.is-active {
    opacity: 1;
}

.projets-hero-meta {
    position: absolute;
    right: 24px;
    bottom: 20px;
    z-index: 20;
    color: #fff;
    text-align: right;
    max-width: min(42vw, 620px);
    pointer-events: none;
}

.projets-hero-meta .elementor-heading-title {
    color: #fff !important;
    margin: 0;
}

.projets-hero-meta .projets-hero-meta-caption {
    margin-top: 0;
    white-space: pre-line;
}

/* Flèches de navigation du slider */
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 150;
    padding: 0;
    pointer-events: auto;
}

.slider-arrow:hover,
.slider-arrow:focus {
    background: transparent !important;
    background-color: transparent !important;
    color: inherit !important;
}

.slider-arrow-prev {
    left: 0;
}

.slider-arrow-next {
    right: 0;
}

.slider-arrow::before {
    content: '';
    display: block;
    width: 35px;
    height: 35px;
    border-top: 3px solid #ffffff;
    border-right: 3px solid #ffffff;
    pointer-events: none;
}

.slider-arrow-prev::before {
    transform: rotate(-135deg);
}

.slider-arrow-next::before {
    transform: rotate(45deg);
}

/* Responsive - flèches plus petites sur mobile */
@media (max-width: 768px) {
    .slider-arrow {
        width: 80px;
        height: 80px;
    }

    .projets-hero-meta {
        right: 16px;
        left: 16px;
        bottom: 16px;
        max-width: none;
    }
    
    .slider-arrow-prev {
        left: 10px;
    }
    
    .slider-arrow-next {
        right: 10px;
    }
    
    .slider-arrow::before {
        width: 35px;
        height: 35px;
    }
}

/* Variante pleine hauteur de la fenêtre pour pages projet */
.projets-hero-slider--short {
    height: 80vh;
}

.projets-hero-link--short {
    height: 80vh;
}

@media (max-width: 768px) {
    .projets-hero-slider--short,
    .projets-hero-link--short {
        height: 50vh;
    }
}

/* Masquer le bloc hero quand il n'y a pas d'image */
body.no-projet-page-hero .elementor-element-81b3308 {
    display: none !important;
    min-height: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

/* Forcer le bloc image-hero en haut de la page */
body.has-projet-page-hero .image-hero {
    margin-top: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    top: 0 !important;
    order: -1;
}

body.has-projet-page-hero .elementor-element-81b3308 {
    margin-top: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    --padding-top: 0px !important;
    --padding-bottom: 0px !important;
    top: 0 !important;
}

/* Header fixé en haut uniquement quand le hero est présent */
body.has-featured-image .elementor-location-header,
body.has-featured-image header.site-header,
body.has-featured-image #masthead,
body.has-featured-image .site-header {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 999;
    background: transparent !important;
}

body.has-projet-page-hero .elementor-237.elementor-location-single {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

body.has-projet-page-hero {
    padding-top: 0 !important;
}

/* Pages fixes (Elementor 237): forcer le hero sticky tout en haut */
body.has-projet-page-hero .elementor-237 .elementor-element-81b3308,
body.has-projet-page-hero .elementor-237 .elementor-element-81b3308.elementor-sticky,
body.has-projet-page-hero .elementor-237 .elementor-element-81b3308.elementor-sticky--active {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    margin-top: 0 !important;
    z-index: 1;
}

/* Layout contenu projet: grille 2 colonnes */
.projet-contenu-complet {
    display: block;
    width: 100%;
    padding: 20px;
}

.projet-contenu-complet a {
    color: inherit;
    text-decoration: none;
}

.projet-contenu-complet a:hover {
    color: color-mix(in srgb, currentColor 50%, transparent);
}

.projet-contenu-titre-wrapper {
    margin-bottom: 0;
}

.projet-contenu-titre-wrapper h1 {
    color: var(--random-theme-color);
}

.projet-contenu-2col-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
    margin-bottom: 32px;
}

.projet-contenu-col-droite {
    grid-column: 1 / -1;
}

.projet-contenu-infos-texte-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
}

.projet-contenu-infos-col {
    margin-top: 0 !important;
}

.projet-contenu-infos-col > *:first-child {
    margin-top: 0 !important;
}

.projet-contenu-texte-col {
    text-align: justify;
    hyphens: auto;
    -webkit-hyphens: auto;
    hyphenate-limit-chars: 6 3 3;
}

@media (max-width: 768px) {
    .projet-contenu-infos-texte-grid {
        grid-template-columns: 1fr;
    }
}

.projet-image-debut img {
    width: 100%;
    height: auto;
    display: block;
}

.projet-contenu-flexible-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 24px;
    row-gap: 20px;
}

.projet-contenu-flex-1col,
.projet-contenu-flex-texte {
    grid-column: span 1;
    text-align: justify;
    hyphens: auto;
    -webkit-hyphens: auto;
    hyphenate-limit-chars: 6 3 3;
}
.projet-contenu-flex-texte h1,.projet-contenu-flex-texte h2,.projet-contenu-flex-texte h3,.projet-contenu-flex-texte h4,.projet-contenu-flex-texte h5,.projet-contenu-flex-texte h6 {
    text-align: left;
    hyphens: none;
    -webkit-hyphens: none;
    margin-top: 0;
}

.projet-contenu-flex-1col.has-image {
    padding-top: 15px;
}

.metri-flex-image-wrapper {
    position: relative;
    overflow: hidden;
    margin-bottom: 5px;
}

.metri-flex-image-wrapper img {
    display: block;
    width: 100%;
    height: auto;
}

.metri-image-overlay-toggle {
    position: absolute;
    inset: 0 0 -1px;
    margin: 0;
    pointer-events: none;
}

.metri-image-overlay-trigger {
    position: absolute;
    right: 5px;
    bottom: 5px;
    z-index: 3;
    width: 53px;
    height: 53px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: transparent;
    border: 0;
    cursor: pointer;
    list-style: none;
    pointer-events: auto;
    user-select: none;
}

.metri-image-overlay-icon {
    width: 36px;
    height: 36px;
    display: block;
}

.metri-image-overlay-icon-plus {
    fill: #ffffff;
}

.metri-image-overlay-icon-minus {
    display: none;
    width: 34px;
    height: 8px;
    fill: var(--metri-overlay-icon-color, var(--random-theme-color, #EA7544));
}

.metri-image-overlay-toggle[open] .metri-image-overlay-icon-plus {
    display: none;
}

.metri-image-overlay-toggle[open] .metri-image-overlay-icon-minus {
    display: block;
}

.metri-image-overlay-trigger::-webkit-details-marker {
    display: none;
}

.metri-image-overlay-trigger::marker {
    content: '';
}

.metri-image-overlay-content {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    padding: 10px 10px 68px;
    background: rgba(255, 255, 255, 0.9);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
    pointer-events: none;
}

.metri-image-overlay-content p {
    margin: 0 0 10px;
    line-height: 1.25;
}

.metri-image-overlay-content p:last-child {
    margin-bottom: 0;
}

.metri-image-overlay-toggle[open] .metri-image-overlay-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

@media (max-width: 768px) {
    .metri-image-overlay-content {
        padding: 10px 10px 61px;
    }

    .metri-image-overlay-trigger {
        right: 5px;
        bottom: 5px;
        width: 46px;
        height: 46px;
    }

    .metri-image-overlay-icon {
        width: 31px;
        height: 34px;
    }

    .metri-image-overlay-icon-minus {
        width: 30px;
        height: 7px;
    }
}

/* Mots avec majuscule initiale : pas de césure */
.no-hyphen {
    hyphens: none;
    -webkit-hyphens: none;
}

.projet-contenu-flex-2col {
    grid-column: span 2;
}

.projet-contenu-flex-citation h3 {
    font-size: inherit;
    font-weight: inherit;
    margin: inherit;
    padding: inherit;
    line-height: inherit;
    letter-spacing: inherit;
}

@media (max-width: 768px) {
    .projet-contenu-2col-wrapper,
    .projet-contenu-flexible-wrapper {
        grid-template-columns: 1fr;
    }

    .projet-contenu-flex-2col {
        grid-column: span 1;
    }

    .page-contenu-complet {
        padding-left: 0;
        padding-right: 0;
    }

    body.has-page-contenu-complet-hero .page-contenu-complet {
        padding-right: 20px;
        padding-left: 20px;
    }
}

/* Animation Lottie au-dessus du diaporama */
.lottie-animation-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    pointer-events: none;
    background: transparent;
    overflow: visible;
}

.lottie-animation-overlay > div {
    width: auto;
    height: auto;
}

.lottie-animation-overlay svg {
    max-width: 52.8vw !important;
    max-height: 52.8vh !important;
    width: 52.8vw !important;
    height: auto !important;
    display: block !important;
}

/* Header au-dessus du diaporama (overlay) uniquement sur la home */
body.home header.site-header,
body.home #masthead,
body.home .site-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 30;
    background: transparent;
}

/* Elementor header en overlay uniquement sur la home */
body.home .elementor-location-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: transparent;
}

/* Si Elementor ajoute une marge sur la première section, on la neutralise quand le slider est en premier */
body.page .entry-content > .elementor:first-child,
body.page .entry-content > .elementor-section:first-child,
body.page .entry-content > .elementor-container:first-child,
body.page .entry-content > .projets-hero-slider:first-child {
    margin-top: 0;
    padding-top: 0;
}

/* Retirer le padding top éventuel du contenu de page */
body.page .entry-content {
    padding-top: 0;
}

/* Supprimer l'espacement par défaut en haut des pages qui placent le diaporama en premier bloc */
body.page .entry-content > .projets-hero-slider:first-child {
    margin-top: 0;
}

/* === PROJET PAGE HERO (60vh) === */
.projet-page-hero {
    display: block;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    height: 60vh;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    margin-top: 0;
    margin-bottom: 0;
}

/* Pas d'espacement en haut quand le hero projet est le premier bloc */
body.has-projet-page-hero .entry-content {
    padding-top: 0;
}
body.has-projet-page-hero .entry-content > *:first-child {
    margin-top: 0;
}

/* Header overlay pour les pages avec le hero projet */
body.has-projet-page-hero header.site-header,
body.has-projet-page-hero #masthead,
body.has-projet-page-hero .site-header,
body.has-projet-page-hero .elementor-location-header,
body.single-projet header.site-header,
body.single-projet #masthead,
body.single-projet .site-header,
body.single-projet .elementor-location-header {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: transparent;
}

/* Neutraliser l'espace ajouté par l'entête sticky d'Elementor */
body.has-projet-page-hero .elementor-sticky__placeholder,
body.single-projet .elementor-sticky__placeholder { display: none !important; }

/* Transparence pour les wrappers du header Elementor */
body.has-projet-page-hero .elementor-location-header .elementor-section,
body.has-projet-page-hero .elementor-location-header .e-con,
body.has-projet-page-hero .elementor-location-header .e-con-inner {
    background: transparent !important;
}

/* Supprimer les compensations de haut de page courantes */
body.has-projet-page-hero .site-content,
body.has-projet-page-hero .entry-content,
body.has-projet-page-hero .site-main,
body.has-projet-page-hero .elementor,
body.has-projet-page-hero .elementor-section {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* Resets pour les pages single projet */
body.single-projet .site-content,
body.single-projet .entry-content,
body.single-projet .site-main,
body.single-projet .elementor,
body.single-projet .elementor-section,
body.single-projet .content-area,
body.single-projet .wrap,
body.single-projet .container {
    padding-top: 0 !important;
    margin-top: 0 !important;
}
body.single-projet .entry-content > .projets-hero-slider:first-child { margin-top: 0 !important; }
body.single-projet .projets-hero-slider { width: 100vw; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); }

/* Hero full-bleed même dans un conteneur étroit */
body.has-projet-page-hero .projets-hero-slider {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

/* Assurer zéro marge si premier bloc */
body.has-projet-page-hero .entry-content > .projets-hero-slider:first-child,
body.single .entry-content > .projets-hero-slider:first-child,
body.page .entry-content > .projets-hero-slider:first-child {
    margin-top: 0 !important;
}

/* Réinitialiser aussi des wrappers fréquents des thèmes */
body.has-projet-page-hero .content-area,
body.has-projet-page-hero .hentry,
body.has-projet-page-hero .wrap,
body.has-projet-page-hero .container {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* S'assurer que le hero est sous le header (overlay) et déborde bien */
.projet-page-hero {
    position: relative;
    z-index: 1;
}


/* === MENU - Réduction de la hauteur des lignes === */
.menu-item {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.2 !important;
    font-weight: 700 !important;
}

.menu-item a,
.elementor-item {
    padding-top: 4px !important;
    padding-bottom: 4px !important;
    line-height: 1.2 !important;
    display: block;
    font-weight: 700 !important;
}

/* === CATÉGORIES PROJETS - Même hauteur que le menu === */

/* Force tous les conteneurs Elementor parents à permettre sticky */
.elementor-element-dc419e3,
.elementor-element-74de5bd {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 999 !important;
    background-color: #ffffff !important;
}

.e-con,
.elementor-widget-shortcode,
.elementor-widget-container,
.elementor-shortcode {
    overflow: visible !important;
}

.projets-categories-wrapper {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 0.8 !important;
}

.projets-categories-wrapper a {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.category-tag,
.category-tag.all-categories {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    display: block !important;
    margin: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}
/* === MENU - Item actif (current-menu-item) === */
/* Désactivé - géré par couleurs.php avec couleur aléatoire
.elementor-nav-menu .current-menu-item > .elementor-item,
.elementor-nav-menu .current_page_parent {
    color: var( --e-global-color-secondary ) !important;
}
*/

/* === FOOTER - Liens en blanc === */
body:not(.metri-mobile-menu-open) :is(header.site-header, #masthead, .site-header, .elementor-location-header),
body:not(.metri-mobile-menu-open) .metri-mobile-menu-toggle-float {
    z-index: 100;
}

footer,
.site-footer,
.elementor-location-footer,
#colophon {
    position: relative;
    z-index: 101;
}

footer a,
.site-footer a,
.elementor-location-footer a,
#colophon a {
    color: #ffffff !important;
}

footer a:hover,
.site-footer a:hover,
.elementor-location-footer a:hover,
#colophon a:hover {
    color: #ffffff !important;
    opacity: 0.8;
}

/* === COULEUR ALÉATOIRE - Variable de thème === */
/* Utiliser var(--random-theme-color) pour appliquer la couleur aléatoire */
:root {
    --random-theme-color: #EA7544; /* Couleur par défaut (fallback) */
}

/* === CLASSE .couleur - Texte et liens dans la couleur du thème === */
/* La couleur réelle est injectée par couleurs.php en wp_head */
.couleur a {
    transition: opacity 0.2s ease;
}
/* === MENU FIXE À GAUCHE === */
.menu.e-con {
    position: fixed !important;
    left: 15px;
    top: 188px;
    z-index: 100;
}

/* === MENU CATEGORIES FIXE À DROITE === */
/* Visible uniquement sur la page 242 et les pages de catégories */
body.page-id-242 .menu_categories.e-con,
body.category .menu_categories.e-con,
body.tax-category .menu_categories.e-con {
    position: fixed !important;
    right: 15px;
    top: 196px;
    z-index: 100;
}

/* Cacher le menu categories sur toutes les autres pages */
body:not(.page-id-242):not(.category):not(.tax-category) .menu_categories.e-con {
    display: none !important;
}

/* === LOGO MOBILE - Remplacement par animation Lottie hamburger === */
@media (max-width: 767px), (max-width: 1024px) and (max-height: 500px) and (orientation: landscape) {
    .elementor-element-1cd0fda.metri-mobile-logo-enhanced {
        opacity: 0 !important;
        pointer-events: none !important;
    }

    .metri-mobile-menu-toggle-float {
        position: fixed;
        z-index: 2147483647;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin: 0;
        padding: 0;
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        background-color: transparent !important;
        outline: none !important;
        box-shadow: none !important;
        appearance: none !important;
        -webkit-appearance: none !important;
        -webkit-tap-highlight-color: transparent !important;
        cursor: pointer;
    }

    .metri-mobile-menu-toggle-float::before,
    .metri-mobile-menu-toggle-float::after {
        display: none !important;
        content: none !important;
    }

    .metri-mobile-menu-toggle-float::-moz-focus-inner {
        border: 0 !important;
        padding: 0 !important;
    }

    .metri-mobile-menu-toggle-float:hover,
    .metri-mobile-menu-toggle-float:focus,
    .metri-mobile-menu-toggle-float:focus-visible,
    .metri-mobile-menu-toggle-float:active {
        background: transparent !important;
        background-color: transparent !important;
        outline: none !important;
        box-shadow: none !important;
        border: 0 !important;
    }

    .metri-mobile-menu-toggle-float * {
        outline: none !important;
        box-shadow: none !important;
    }

    .metri-mobile-menu-toggle-float .metri-mobile-logo-lottie {
        display: block;
        width: 100%;
        height: 100%;
    }

    .metri-mobile-menu-toggle-float .metri-mobile-logo-lottie svg {
        width: 100% !important;
        height: 100% !important;
        display: block !important;
    }

    .metri-mobile-menu-overlay {
        position: fixed;
        inset: 0;
        height: 100%;
        height: 100dvh;
        z-index: 2147483000;
        background-color: var(--random-theme-color, var(--e-global-color-secondary, #C8373F));
        padding: 112px 24px max(28px, env(safe-area-inset-bottom));
        box-sizing: border-box;
        overflow-y: auto;
        transform: translate3d(0, -100%, 0);
        opacity: 0;
        pointer-events: none;
        will-change: transform, opacity;
        transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.16s linear;
    }

    .metri-mobile-menu-overlay.is-open {
        transform: translate3d(0, 0, 0);
        opacity: 1;
        pointer-events: auto;
    }

    .metri-mobile-menu-panel {
        min-height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
    }

    .metri-mobile-menu-main {
        display: flex;
        flex-direction: column;
        gap: clamp(4px, 1dvh, 8px);
        align-items: flex-start;
        margin-top: 0;
    }

    .metri-mobile-menu-main-link,
    .metri-mobile-menu-category-link {
        color: #000000;
        text-decoration: none;
        font-weight: 700;
        line-height: 1.1;
    }

    .metri-mobile-menu-main-link {
        font-size: clamp(2rem, 7dvh, 3rem);
    }

    .metri-mobile-menu-categories {
        display: none;
        flex-direction: column;
        align-items: flex-end;
        justify-content: space-between;
        gap: 0;
        margin-top: 16px;
        margin-bottom: 0;
        flex: 1 0 auto;
    }

    .metri-mobile-menu-categories.is-visible {
        display: flex;
    }

    .metri-mobile-menu-category-link {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        min-width: 44px;
        min-height: 28px;
        flex-shrink: 0;
        box-sizing: border-box;
        line-height: 1.2;
        font-size: clamp(0.875rem, 2.5dvh, 1rem);
        text-align: right;
    }

    .metri-mobile-menu-main-link.is-active,
    .metri-mobile-menu-category-link.is-active {
        color: #ffffff;
    }

    .metri-mobile-menu-main-link:hover,
    .metri-mobile-menu-main-link:focus,
    .metri-mobile-menu-main-link:focus-visible,
    .metri-mobile-menu-main-link:active,
    .metri-mobile-menu-category-link:hover,
    .metri-mobile-menu-category-link:focus,
    .metri-mobile-menu-category-link:focus-visible,
    .metri-mobile-menu-category-link:active {
        color: #ffffff !important;
    }

    body.metri-mobile-menu-open {
        overflow: hidden;
    }
}

@media (max-width: 1024px) and (max-height: 500px) and (orientation: landscape) {
    .metri-mobile-menu-overlay {
        padding-top: 96px;
    }

    .metri-mobile-menu-panel {
        flex-direction: row;
        align-items: flex-start;
        gap: 48px;
    }

    .metri-mobile-menu-main {
        gap: clamp(2px, 1dvh, 6px);
    }

    .metri-mobile-menu-main-link {
        font-size: clamp(1.25rem, 8dvh, 2.4rem);
    }

    .metri-mobile-menu-categories {
        align-items: flex-start;
        margin-top: 0;
        flex: none;
    }

    .metri-mobile-menu-category-link {
        font-size: clamp(0.6875rem, 4dvh, 1rem);
        justify-content: flex-start;
        text-align: left;
    }
}

/* === LIGHTBOX ELEMENTOR - Style des flèches === */
.elementor-lightbox .elementor-swiper-button,
.elementor-lightbox .swiper-button-prev,
.elementor-lightbox .swiper-button-next {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background: transparent !important;
    border: none !important;
    width: 120px !important;
    height: 120px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    z-index: 150 !important;
    padding: 0 !important;
    font-size: 0 !important;
    color: transparent !important;
    background-image: none !important;
}

.elementor-lightbox .elementor-swiper-button:hover,
.elementor-lightbox .elementor-swiper-button:focus,
.elementor-lightbox .swiper-button-prev:hover,
.elementor-lightbox .swiper-button-prev:focus,
.elementor-lightbox .swiper-button-next:hover,
.elementor-lightbox .swiper-button-next:focus {
    background: transparent !important;
    background-color: transparent !important;
    color: transparent !important;
}

.elementor-lightbox .elementor-swiper-button::after,
.elementor-lightbox .swiper-button-prev::after,
.elementor-lightbox .swiper-button-next::after,
.elementor-lightbox .elementor-swiper-button i,
.elementor-lightbox .swiper-button-prev i,
.elementor-lightbox .swiper-button-next i {
    display: none !important;
}

.elementor-lightbox .elementor-swiper-button > *,
.elementor-lightbox .swiper-button-prev > *,
.elementor-lightbox .swiper-button-next > * {
    display: none !important;
}

.elementor-lightbox .elementor-swiper-button-prev::before,
.elementor-lightbox .elementor-swiper-button-next::before,
.elementor-lightbox .swiper-button-prev::before,
.elementor-lightbox .swiper-button-next::before {
    content: '' !important;
    display: block !important;
    width: 35px !important;
    height: 35px !important;
    border-top: 3px solid #ffffff !important;
    border-right: 3px solid #ffffff !important;
    pointer-events: none !important;
}

.elementor-lightbox .elementor-swiper-button-prev,
.elementor-lightbox .swiper-button-prev {
    left: 0 !important;
}

.elementor-lightbox .elementor-swiper-button-next,
.elementor-lightbox .swiper-button-next {
    right: 0 !important;
}

.elementor-lightbox .elementor-swiper-button-prev::before,
.elementor-lightbox .swiper-button-prev::before {
    transform: rotate(-135deg) !important;
}

.elementor-lightbox .elementor-swiper-button-next::before,
.elementor-lightbox .swiper-button-next::before {
    transform: rotate(45deg) !important;
}

@media (max-width: 768px) {
    .elementor-lightbox .elementor-swiper-button,
    .elementor-lightbox .swiper-button-prev,
    .elementor-lightbox .swiper-button-next {
        width: 80px !important;
        height: 80px !important;
    }

    .elementor-lightbox .elementor-swiper-button-prev,
    .elementor-lightbox .swiper-button-prev {
        left: 10px !important;
    }

    .elementor-lightbox .elementor-swiper-button-next,
    .elementor-lightbox .swiper-button-next {
        right: 10px !important;
    }
}

/* === CARTE CONTACT (OpenStreetMap / Leaflet) === */
.metri-map-wrapper {
    width: 100%;
    height: 100%;
}

.metri-map-container {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    background: #ede8f4;
}

/* S'assurer que les conteneurs Elementor parents laissent passer la hauteur */
.elementor-shortcode:has(.metri-map-wrapper),
.elementor-widget-container:has(.metri-map-wrapper) {
    height: 100%;
}

/* Popup Leaflet : typographie cohérente avec le thème */
.metri-map-container .leaflet-popup-content {
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
}

.metri-map-container .leaflet-popup-content-wrapper,
.metri-map-container .leaflet-popup-tip {
    background: #ede8f4;
    color: #6d657a;
    box-shadow: none;
    border: 1px solid #6d657a;
}

.metri-map-container .leaflet-control-attribution {
    background: rgba(237, 232, 244, 0.2);
    color: rgba(109, 101, 122, 0.55);
    border: 0;
    font-size: 10px;
    padding: 1px 4px;
    line-height: 1.2;
    opacity: 0.2;
    transition: opacity 0.2s ease;
}

.metri-map-container .leaflet-control-attribution a {
    color: rgba(109, 101, 122, 0.65);
}

.metri-map-container:hover .leaflet-control-attribution {
    opacity: 0.7;
}

/* Header en overlay quand la carte est présente */
body.has-contact-map header.site-header,
body.has-contact-map #masthead,
body.has-contact-map .site-header,
body.has-contact-map .elementor-location-header {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: transparent;
}

body.has-contact-map .elementor-sticky__placeholder { display: none !important; }

body.has-contact-map .elementor-location-header .elementor-section,
body.has-contact-map .elementor-location-header .e-con,
body.has-contact-map .elementor-location-header .e-con-inner {
    background: transparent !important;
}

/* Supprimer tous les espacements en haut du contenu */
body.has-contact-map .site-content,
body.has-contact-map .entry-content,
body.has-contact-map .site-main,
body.has-contact-map .elementor,
body.has-contact-map .elementor-section,
body.has-contact-map .content-area,
body.has-contact-map .wrap,
body.has-contact-map .container {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

body.has-contact-map .entry-content > *:first-child {
    margin-top: 0 !important;
}

/* Même logique que le hero projet: premier bloc image calé sous le header */
body.has-contact-map .image-hero,
body.has-contact-map .elementor-24 .elementor-element-bd96723,
body.has-contact-map .elementor-24 .elementor-element-bd96723.elementor-sticky,
body.has-contact-map .elementor-24 .elementor-element-bd96723.elementor-sticky--active {
    margin-top: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    --padding-top: 0px !important;
    --padding-bottom: 0px !important;
    top: 0 !important;
}

body.has-contact-map .metri-contact-map-block,
body.has-contact-map .metri-contact-map-svg {
    margin-top: 0 !important;
}

@media (max-width: 767px) {
    body.has-contact-map .metri-contact-map-block {
        height: 100vh !important;
    }

    body.has-contact-map .metri-contact-map-svg {
        transform: scale(1.08) !important;
        transform-origin: center center !important;
    }
}

@media (max-width: 767px) and (orientation: landscape) {
    body.has-contact-map .metri-contact-map-svg {
        transform: scale(1.22) !important;
        transform-origin: center center !important;
    }
}

@media (max-width: 768px) {
    .metri-map-wrapper {
        height: 320px !important;
    }
}