/* ===== FONTS ===== */
@font-face {
    font-family: 'Helvetica Neue Cond Black';
    src: url('../fonts/helvetica-neue-cond-black.woff2') format('woff2'),
         url('../fonts/helvetica-neue-cond-black.woff')  format('woff');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

/* ===== VARIABLES ===== */
:root {
    --red: #ed494a;
    --red-dark: #c93535;
    --white: #ffffff;
    --gray-light: #f5f5f5;
    --gray-mid: #e8e8e8;
    --gray-text: #666666;
    --dark: #1a1a2e;
    --dark-mid: #2d2d2d;
    --font-title: 'HelveticaNeue-BlackCond', 'Helvetica Neue Cond Black', 'Arial Narrow', sans-serif;
    --font-body: 'Raleway', sans-serif;
    --font-menu: 'HelveticaNeue-BlackCond', 'Helvetica Neue Cond Black', 'Arial Narrow', sans-serif;
}

/* ===== TITRES GLOBAUX ===== */
h1, h2, h3, h4, h5, h6,
.entry-title,
.ast-archive-title,
.page-title,
.widget-title {
    font-family: var(--font-title) !important;
}

/* ===== ANTI-DEBORDEMENT HORIZONTAL (fix Android Chrome) ===== */
/* On utilise overflow-x: clip (et non hidden) pour ne PAS casser position: sticky */
html, body {
    overflow-x: clip !important;
    max-width: 100% !important;
    -webkit-overflow-scrolling: touch;
}
body {
    position: relative;
}
/* Le marquee a un enfant volontairement très large (padding-left:100% + nowrap).
   Sur Chrome Android, le clipping ne suffit pas toujours : on isole le rendu. */
.elmi-marquee {
    contain: layout paint !important;
    max-width: 100vw !important;
}
.elmi-marquee-track {
    box-sizing: border-box !important;
}
/* Sécurité : aucun bloc fixed du header ne dépasse la largeur viewport */
.elmi-topbar, #elmiNav, .elmi-mobile-bar {
    max-width: 100vw !important;
    box-sizing: border-box !important;
}

/* ===== MARQUEE (bandeau défilant tout en haut) ===== */
.elmi-marquee {
    background: #000000 !important;
    color: #ffffff !important;
    overflow: hidden !important;
    padding: 7px 0 !important;
    margin: 0 !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 10000 !important;
    font-family: var(--font-body) !important;
    font-size: 0.82rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.5px !important;
    text-transform: uppercase !important;
    line-height: 1.2 !important;
    box-sizing: border-box !important;
}
.elmi-marquee-track {
    display: inline-block !important;
    white-space: nowrap !important;
    padding-left: 100% !important; /* démarre hors écran à droite */
    animation: elmi-marquee-scroll 22s linear infinite !important;
    will-change: transform;
}
.elmi-marquee:hover .elmi-marquee-track {
    animation-play-state: paused !important;
}
.elmi-marquee-item {
    display: inline-block !important;
    padding: 0 !important;
    color: #ffffff !important;
}
.elmi-marquee-item::before,
.elmi-marquee-item::after {
    color: var(--red);
    font-size: 0.9rem;
}
.elmi-marquee-item::before {
    content: '\2605'; /* étoile ★ au début */
    margin-right: 12px;
}
.elmi-marquee-item::after {
    content: '\2605'; /* étoile ★ à la fin */
    margin-left: 12px;
}
@keyframes elmi-marquee-scroll {
    0%   { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-100%, 0, 0); }
}

/* ===== TOPBAR ===== */
.elmi-topbar {
    background: var(--red) !important; /* fond rouge */
    color: #ffffff;
    font-family: var(--font-body);
    font-size: 0.85rem;
    padding: 6px 0; /* bandeau réduit */
    position: fixed;
    top: 32px; /* sous le marquee */
    left: 0;
    right: 0;
    z-index: 9999;
}
.elmi-topbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    justify-content: flex-end;
}
.elmi-topbar a {
    color: #ffffff;
    text-decoration: none;
    padding: 0;
    transition: color 0.2s, background 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    line-height: 1;
}
.elmi-topbar a .material-icons {
    font-size: 18px !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    vertical-align: middle;
}
/* Bouton PRENDRE RDV : pastille blanche, texte rouge */
.elmi-topbar a.topbar-cta {
    background: #ffffff !important;
    color: var(--red) !important;
    font-weight: 700;
    padding: 6px 14px !important;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: 1;
}
.elmi-topbar a.topbar-cta .material-icons {
    color: var(--red) !important;
}
.elmi-topbar a.topbar-cta:hover {
    background: #f5f5f5 !important;
    color: var(--red-dark) !important;
}
.elmi-topbar a.topbar-cta:hover .material-icons {
    color: var(--red-dark) !important;
}
/* Téléphone en blanc */
.elmi-topbar a.topbar-phone {
    color: #ffffff !important;
    font-weight: 600;
    padding: 0 4px;
}
.elmi-topbar a.topbar-phone .material-icons {
    color: #ffffff !important;
}
.elmi-topbar a.topbar-phone:hover { color: rgba(255,255,255,0.8) !important; }
.elmi-topbar-sep {
    width: 1px;
    height: 16px;
    background: rgba(255,255,255,0.3);
}

/* ===== NAV ===== */
#elmiNav {
    background: #000000; /* fond noir */
    position: fixed;
    top: 68px; /* décalé sous marquee (32) + topbar (36) */
    left: 0;
    right: 0;
    z-index: 9998;
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
    border-bottom: 2px solid var(--red); /* trait rouge sous le header */
    font-family: var(--font-body);
    transition: box-shadow 0.3s;
}
#elmiNav.scrolled {
    box-shadow: 0 4px 30px rgba(0,0,0,0.35);
}
.elmi-nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}
.elmi-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    margin-right: 40px; /* espace entre le logo et le menu */
}
.elmi-logo img {
    height: auto !important;
    max-height: 60px !important;
    width: auto !important;
    max-width: 200px !important;
    object-fit: contain !important;
    display: block !important;
}
.elmi-logo span {
    font-family: var(--font-title);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--white); /* texte du logo en blanc */
}
.elmi-nav-menu {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0;
    margin: 0;
    padding: 0;
}
.elmi-nav-item { position: relative; }
.elmi-nav-link {
    display: block;
    padding: 8px 9px; /* + serré pour libérer de la place au logo */
    color: var(--white);
    text-decoration: none;
    font-family: var(--font-menu) !important; /* Helvetica Neue BlackCond */
    font-size: 0.72rem; /* réduit pour faire tenir tout le menu */
    font-weight: 900;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 4px;
    transition: color 0.2s, background 0.2s;
    white-space: nowrap;
}
.elmi-nav-link:hover {
    color: var(--red);
    background: rgba(255,255,255,0.08); /* léger overlay clair sur fond noir */
}
.elmi-nav-link.nav-cta {
    background: var(--red);
    color: var(--white) !important;
    padding: 10px 22px;
    margin-left: 8px;
    border-radius: 4px;
}
.elmi-nav-link.nav-cta:hover { background: var(--red-dark); }
/* Item de menu actif */
.elmi-nav-link--active {
    color: var(--red) !important;
}
/* Sous-item de menu actif */
.elmi-dropdown-link--active {
    color: var(--red) !important;
}

/* ===== DROPDOWN ===== */
.elmi-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #000000; /* fond noir */
    min-width: 220px;
    border-radius: 8px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.35);
    border: 2px solid var(--red); /* encadré rouge, même épaisseur que le header */
    padding: 8px 0;
    z-index: 10000;
}
.elmi-nav-item:hover .elmi-dropdown { display: block; }
.elmi-dropdown a {
    display: block;
    padding: 9px 18px;
    color: var(--white); /* texte blanc */
    text-decoration: none;
    font-family: var(--font-menu) !important; /* même typo que le menu principal */
    font-size: 0.75rem; /* proportionnel au menu principal */
    font-weight: 900;
    letter-spacing: 0.35px;
    text-transform: uppercase;
    transition: color 0.2s, padding-left 0.2s, background 0.2s;
}
.elmi-dropdown a:hover {
    color: var(--red);
    padding-left: 28px;
    background: rgba(255,255,255,0.08);
}

/* ===== BURGER ===== */
.elmi-burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none !important;
    background-color: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    cursor: pointer;
    padding: 4px;
    outline: none !important;
    box-shadow: none !important;
    -webkit-tap-highlight-color: transparent !important;
    text-transform: none !important;
}
.elmi-burger span {
    display: block;
    width: 26px;
    height: 2px;
    background: var(--white) !important; /* barres du burger en blanc */
    border-radius: 2px;
    transition: all 0.3s;
}
.elmi-burger:hover,
.elmi-burger:focus,
.elmi-burger:active,
.elmi-burger:focus-visible {
    background: none !important;
    background-color: transparent !important;
    border-radius: 0 !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    color: inherit !important;
    -webkit-tap-highlight-color: transparent !important;
}

/* ===== COMPENSATION HEADER FIXE ===== */
body {
    padding-top: 150px !important; /* 32 marquee + 36 topbar + 80 nav + 2 border */
}

/* ===== RESPONSIVE ===== */
@media (max-width: 960px) {
    .elmi-nav-menu { display: none; }
    .elmi-nav-menu.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #000000; /* menu mobile ouvert sur fond noir */
        box-shadow: 0 8px 30px rgba(0,0,0,0.4);
        padding: 12px 0 20px;
        gap: 0;
        max-height: calc(100vh - 160px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    .elmi-nav-menu.open .elmi-nav-link {
        color: var(--white);
    }
    .elmi-nav-menu.open .elmi-nav-link:hover {
        background: rgba(255,255,255,0.08);
    }
    .elmi-nav-menu.open .elmi-dropdown {
        position: static;
        box-shadow: none;
        padding: 0 0 8px 20px;
        display: block;
        background: transparent;
    }
    .elmi-nav-menu.open .elmi-dropdown a {
        color: rgba(255,255,255,0.85);
    }
    .elmi-nav-menu.open .elmi-dropdown a:hover {
        color: var(--red);
        background: rgba(255,255,255,0.08);
    }
    .elmi-burger { display: flex; }
}

@media (max-width: 600px) {
    .elmi-topbar { display: none; }
    body { padding-top: 114px !important; } /* 32 marquee + 80 nav + 2 border */
    #elmiNav { top: 32px; } /* juste sous le marquee */
    .elmi-marquee { font-size: 0.75rem; padding: 6px 0; }
    .elmi-nav-menu.open {
        max-height: calc(100vh - 120px);
    }
}