/* En-tête du site */
.sqelm-head {
    --sqelm-head-h: 96px;
    --sqelm-head-h-s: 64px;
    --sqelm-head-x: 24px;
    --sqelm-head-max: 100%;
    --sqelm-head-logo: 150px;
    --sqelm-head-logo-s: 100px;
    --sqelm-head-ecart: 28px;
    --sqelm-head-sur-sombre: #FFFFFF;
    --sqelm-head-sur-clair: #1B1B1B;
    --sqelm-head-fond: #FFFFFF;
    --sqelm-head-ligne: rgba(0, 0, 0, .08);
    --sqelm-head-actif: #6E6B45;
    --sqelm-head-panneau: #FFFFFF;
    --sqelm-head-panneau-texte: #1B1B1B;
    --sqelm-head-panneau-ligne: #DAD7CA;
    --sqelm-head-b-fond-sombre: #FFFFFF;
    --sqelm-head-b-texte-sombre: #1B1B1B;
    --sqelm-head-b-fond-clair: #6E6B45;
    --sqelm-head-b-texte-clair: #FFFFFF;
    --sqelm-head-barre2-fond: #FFFFFF;
    --sqelm-head-barre2-texte: #1B1B1B;
    --sqelm-head-r: 3px;
    --sqelm-head-duree: 300ms;
    --sqelm-head-ease: cubic-bezier(.2, .7, .2, 1);

    /* current colors: clair by default, JS switches to sombre over marked sections */
    --c: var(--sqelm-head-sur-clair);
    --b-fond: var(--sqelm-head-b-fond-clair);
    --b-texte: var(--sqelm-head-b-texte-clair);
}
/* First paint, before the script runs: white over a dark first section of the page.
   The hero container must be the first child of the page's Elementor content and carry the class. */
html.sqelm-js body:has(.elementor[data-elementor-type="wp-page"] > .elm-hero--scinde:first-child) .sqelm-head:not(.is-pret) .sqelm-head__barre-haut,
html.sqelm-js body:has(.elementor[data-elementor-type="wp-page"] > .elm-hero--sombre:first-child) .sqelm-head:not(.is-pret),
.sqelm-head.is-sombre:not(.is-defile) {
    --c: var(--sqelm-head-sur-sombre);
    --b-fond: var(--sqelm-head-b-fond-sombre);
    --b-texte: var(--sqelm-head-b-texte-sombre);
}

/* The Elementor header container must not add its own box */
.elementor-location-header:has(.sqelm-head) { position: static; }

.sqelm-head__barre-haut {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    color: var(--c);
    background: transparent;
    box-shadow: 0 1px 0 transparent;
    transform: translateY(0);
    transition: background-color var(--sqelm-head-duree) var(--sqelm-head-ease), color var(--sqelm-head-duree) var(--sqelm-head-ease), box-shadow var(--sqelm-head-duree) var(--sqelm-head-ease), transform var(--sqelm-head-duree) var(--sqelm-head-ease);
}
.sqelm-head.is-defile .sqelm-head__barre-haut {
    background: var(--sqelm-head-fond);
    box-shadow: 0 1px 0 var(--sqelm-head-ligne);
}
.sqelm-head.is-cache .sqelm-head__barre-haut { transform: translateY(-100%); }
.admin-bar .sqelm-head__barre-haut { top: 32px; }
@media (max-width: 782px) { .admin-bar .sqelm-head__barre-haut { top: 46px; } }

.sqelm-head__rangee {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    height: var(--sqelm-head-h);
    max-width: var(--sqelm-head-max);
    margin: 0 auto;
    padding: 0 var(--sqelm-head-x);
    transition: height var(--sqelm-head-duree) var(--sqelm-head-ease);
}
.sqelm-head.is-defile .sqelm-head__barre-haut .sqelm-head__rangee { height: var(--sqelm-head-h-s); }

/* Logo: two versions, the one matching the current state is shown */
.sqelm-head__logo { display: inline-flex; align-items: center; color: inherit; line-height: 0; }
.sqelm-head__logo-img, .sqelm-head__logo svg {
    display: block;
    width: var(--sqelm-head-logo);
    height: auto;
    max-width: none;
    transition: width var(--sqelm-head-duree) var(--sqelm-head-ease);
}
.sqelm-head__logo > .is-clair svg, .sqelm-head__logo > .is-sombre svg { width: var(--sqelm-head-logo); height: auto; }
.sqelm-head.is-defile .sqelm-head__barre-haut .sqelm-head__logo-img,
.sqelm-head.is-defile .sqelm-head__barre-haut .sqelm-head__logo svg { width: var(--sqelm-head-logo-s); }
.sqelm-head__barre-haut .is-clair { display: none; }
html.sqelm-js body:has(.elementor[data-elementor-type="wp-page"] > .elm-hero--sombre:first-child) .sqelm-head:not(.is-pret) .sqelm-head__barre-haut .is-clair,
.sqelm-head.is-sombre:not(.is-defile) .sqelm-head__barre-haut .is-clair,
html.sqelm-js body:has(.elementor[data-elementor-type="wp-page"] > .elm-hero--scinde:first-child) .sqelm-head:not(.is-pret) .sqelm-head__barre-haut .is-clair,
.sqelm-head.is-scinde:not(.is-defile) .sqelm-head__barre-haut .is-clair { display: block; }
html.sqelm-js body:has(.elementor[data-elementor-type="wp-page"] > .elm-hero--sombre:first-child) .sqelm-head:not(.is-pret) .sqelm-head__barre-haut .is-sombre,
.sqelm-head.is-sombre:not(.is-defile) .sqelm-head__barre-haut .is-sombre,
html.sqelm-js body:has(.elementor[data-elementor-type="wp-page"] > .elm-hero--scinde:first-child) .sqelm-head:not(.is-pret) .sqelm-head__barre-haut .is-sombre,
.sqelm-head.is-scinde:not(.is-defile) .sqelm-head__barre-haut .is-sombre { display: none; }
.sqelm-head__logo-txt { font-size: 18px; letter-spacing: .2em; text-transform: uppercase; line-height: 1; }

/* Links */
/* Links: a fixed layer of their own, centred over the bar (split mode shows two clipped copies of it). */
.sqelm-head__nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1001;
    display: flex; justify-content: center; align-items: center;
    height: var(--sqelm-head-h);
    color: var(--c);
    pointer-events: none;
    transform: translateY(0);
    transition: height var(--sqelm-head-duree) var(--sqelm-head-ease), color var(--sqelm-head-duree) var(--sqelm-head-ease), transform var(--sqelm-head-duree) var(--sqelm-head-ease);
}
.sqelm-head__nav .sqelm-head__liens { pointer-events: auto; }
.sqelm-head.is-defile .sqelm-head__nav { height: var(--sqelm-head-h-s); }
.sqelm-head.is-cache .sqelm-head__nav { transform: translateY(-100%); }
.sqelm-head.is-ouvert .sqelm-head__nav { display: none; }
.admin-bar .sqelm-head__nav { top: 32px; }
@media (max-width: 782px) { .admin-bar .sqelm-head__nav { top: 46px; } }

/* Split section (dark left, light right): white logo, normal button, two copies of the links,
   the white one clipped to the dark side and the black one to the light side (pure colours, exact cut). */
.sqelm-head__nav--clair { display: none; }
.sqelm-head.is-scinde:not(.is-defile) .sqelm-head__nav { --c: var(--sqelm-head-sur-sombre); color: var(--sqelm-head-sur-sombre); clip-path: inset(0 calc(100% - var(--sqelm-head-scission, 50%)) 0 0); }
.sqelm-head.is-scinde:not(.is-defile) .sqelm-head__nav--clair { display: flex; --c: var(--sqelm-head-sur-clair); color: var(--sqelm-head-sur-clair); clip-path: inset(0 0 0 var(--sqelm-head-scission, 50%)); }
.sqelm-head.is-scinde:not(.is-defile) .sqelm-head__barre-haut { --c: var(--sqelm-head-sur-sombre); }
.sqelm-head.is-scinde:not(.is-defile) .sqelm-head__langues { color: var(--sqelm-head-sur-clair); }
/* the burger sits on the right, over the light half, as soon as the two halves are side by side */
@media (min-width: 768px) { .sqelm-head.is-scinde:not(.is-defile) .sqelm-head__ouvrir { color: var(--sqelm-head-sur-clair); } }

.sqelm-head__liens { display: flex; gap: var(--sqelm-head-ecart); align-items: center; margin: 0; padding: 0; list-style: none; }
.sqelm-head__liens > li { position: relative; }
.sqelm-head__liens a {
    display: inline-block;
    padding: 6px 0;
    white-space: nowrap;
    font-size: 14px;
    color: var(--c);
    text-decoration: none;
    border-bottom: 1.5px solid transparent;
    transition: color var(--sqelm-head-duree) var(--sqelm-head-ease), border-color .2s;
}
.sqelm-head__liens a:hover, .sqelm-head__liens a:focus-visible { color: var(--c); border-bottom-color: currentColor; outline: none; }
.sqelm-head__liens > li.is-actif > a { border-bottom-color: var(--sqelm-head-actif); }
.sqelm-head__sous {
    position: absolute; left: 0; top: 100%;
    min-width: 220px; margin: 0; padding: 10px 0; list-style: none;
    background: var(--sqelm-head-fond); color: var(--sqelm-head-sur-clair);
    border-radius: var(--sqelm-head-r); box-shadow: 0 12px 40px rgba(0, 0, 0, .12);
    opacity: 0; visibility: hidden; transform: translateY(8px);
    transition: opacity .2s, transform .2s, visibility .2s;
}
.sqelm-head__liens > li:hover > .sqelm-head__sous, .sqelm-head__liens > li:focus-within > .sqelm-head__sous { opacity: 1; visibility: visible; transform: none; }
.sqelm-head__sous a { display: block; padding: 8px 18px; color: var(--sqelm-head-sur-clair); border: 0; }

/* Right side */
.sqelm-head__droite { display: flex; align-items: center; gap: 18px; }
.sqelm-head__langues { display: flex; gap: 8px; font-size: 13px; letter-spacing: .06em; color: var(--c); }
.sqelm-head__langues a { color: inherit; opacity: .7; text-decoration: none; }
.sqelm-head__langues a:hover { opacity: 1; }
.sqelm-head__bouton {
    display: inline-flex; align-items: center;
    padding: 13px 20px;
    border-radius: var(--sqelm-head-r);
    background: var(--b-fond); color: var(--b-texte);
    font-size: 14px; font-weight: 500; text-decoration: none; white-space: nowrap;
    transition: background-color var(--sqelm-head-duree) var(--sqelm-head-ease), color var(--sqelm-head-duree) var(--sqelm-head-ease), transform .2s;
}
.sqelm-head__bouton:hover { color: var(--b-texte); transform: translateY(-1px); }
.sqelm-head__bouton:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

/* Burger */
.sqelm-head__ouvrir {
    display: none;
    align-items: center; gap: 10px;
    min-width: 44px; height: 44px; padding: 0 2px;
    border: 0; background: transparent; color: var(--c);
    font: inherit; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; cursor: pointer;
}
/* the theme and the kit style every <button>: keep ours transparent in every state */
.sqelm-head__ouvrir:hover, .sqelm-head__ouvrir:focus, .sqelm-head__ouvrir:active,
.sqelm-head__fermer:hover, .sqelm-head__fermer:focus, .sqelm-head__fermer:active { background: transparent; color: inherit; box-shadow: none; }
.sqelm-head__ouvrir:hover, .sqelm-head__ouvrir:focus { color: var(--c); }
.sqelm-head__ouvrir:focus-visible, .sqelm-head__fermer:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.sqelm-head__ouvrir-txt { display: none; }
.sqelm-head__burger { position: relative; display: block; width: 22px; height: 2px; background: currentColor; }
.sqelm-head__burger::before, .sqelm-head__burger::after { content: ""; position: absolute; left: 0; width: 100%; height: 2px; background: currentColor; }
.sqelm-head__burger::before { top: -7px; } .sqelm-head__burger::after { top: 7px; }

/* Full-screen panel */
.sqelm-head__panneau {
    position: fixed; inset: 0; z-index: 1001;
    display: flex; flex-direction: column;
    background: var(--sqelm-head-panneau); color: var(--sqelm-head-panneau-texte);
    overflow: auto; -webkit-overflow-scrolling: touch;
    opacity: 0; transform: translateY(-8px);
    transition: opacity var(--sqelm-head-duree) var(--sqelm-head-ease), transform var(--sqelm-head-duree) var(--sqelm-head-ease);
}
.sqelm-head__panneau[hidden] { display: none; }
.sqelm-head__panneau.is-visible { opacity: 1; transform: none; }
.admin-bar .sqelm-head__panneau { top: 32px; }
@media (max-width: 782px) { .admin-bar .sqelm-head__panneau { top: 46px; } }
/* in the column flex panel, margin:auto shrinks the row to its content: give it its width back so space-between works */
.sqelm-head__panneau .sqelm-head__rangee { flex: none; width: 100%; }
.sqelm-head__panneau .sqelm-head__logo-img, .sqelm-head__panneau .sqelm-head__logo svg { width: var(--sqelm-head-logo); }
.sqelm-head__fermer {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; margin-right: -8px; padding: 0; border: 0; border-radius: 0; background: transparent; color: inherit;
    font: inherit; cursor: pointer;
}
.sqelm-head__fermer span { font-size: 34px; font-weight: 300; line-height: 1; }
.sqelm-head__panneau nav { flex: 1; padding: 16px var(--sqelm-head-x) 0; }
.sqelm-head__panneau .sqelm-head__liens { display: block; }
.sqelm-head__panneau .sqelm-head__liens > li { border-top: 1px solid var(--sqelm-head-panneau-ligne); }
.sqelm-head__panneau .sqelm-head__liens a {
    display: flex; justify-content: space-between; align-items: center; gap: 16px;
    padding: 18px 0; border: 0;
    font-family: Figtree, inherit; font-weight: 300; font-size: 26px; line-height: 1.1;
    color: var(--sqelm-head-panneau-texte);
    opacity: 0; transform: translateY(10px);
    transition: opacity .45s var(--sqelm-head-ease), transform .45s var(--sqelm-head-ease);
}
.sqelm-head__panneau.is-visible .sqelm-head__liens a { opacity: 1; transform: none; }
.sqelm-head__panneau .sqelm-head__liens > li:nth-child(1) a { transition-delay: .05s; }
.sqelm-head__panneau .sqelm-head__liens > li:nth-child(2) a { transition-delay: .1s; }
.sqelm-head__panneau .sqelm-head__liens > li:nth-child(3) a { transition-delay: .15s; }
.sqelm-head__panneau .sqelm-head__liens > li:nth-child(4) a { transition-delay: .2s; }
.sqelm-head__panneau .sqelm-head__liens > li:nth-child(5) a { transition-delay: .25s; }
.sqelm-head__panneau .sqelm-head__liens > li:nth-child(6) a { transition-delay: .3s; }
.sqelm-head__panneau .sqelm-head__liens > li:nth-child(n+7) a { transition-delay: .35s; }
.sqelm-head__panneau .sqelm-head__liens > li.is-actif > a { color: var(--sqelm-head-actif); }
.sqelm-head__fleche { color: var(--sqelm-head-actif); font-size: 20px; }
.sqelm-head__panneau .sqelm-head__sous { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; background: transparent; padding: 0 0 12px; }
.sqelm-head__panneau .sqelm-head__sous a { font-size: 17px; padding: 6px 0 6px 24px; font-family: inherit; }
.sqelm-head__panneau-bas {
    display: flex; flex-direction: column; gap: 16px;
    padding: 24px var(--sqelm-head-x) max(24px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--sqelm-head-panneau-ligne);
}
.sqelm-head__panneau-bas .sqelm-head__bouton { justify-content: center; background: var(--sqelm-head-b-fond-clair); color: var(--sqelm-head-b-texte-clair); }
.sqelm-head__panneau-bas .sqelm-head__langues { color: inherit; justify-content: center; }
.sqelm-head__aide { padding: 8px 12px; border: 1px dashed #B9B5A3; font-size: 13px; }
body.sqelm-head-ouvert { overflow: hidden; }

/* Bottom bar (phone) */
.sqelm-head__barre {
    display: none;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 999;
    grid-template-columns: 1fr 1fr; gap: 1px;
    background: var(--sqelm-head-panneau-ligne);
    box-shadow: 0 -1px 0 var(--sqelm-head-panneau-ligne);
    padding-bottom: env(safe-area-inset-bottom);
}
.sqelm-head__barre a { display: block; padding: 16px 12px; font-size: 14px; font-weight: 500; text-align: center; text-decoration: none; }
.sqelm-head__barre .is-un { background: var(--sqelm-head-b-fond-clair); color: var(--sqelm-head-b-texte-clair); }
.sqelm-head__barre .is-deux { background: var(--sqelm-head-barre2-fond); color: var(--sqelm-head-barre2-texte); }
.sqelm-head.is-ouvert .sqelm-head__barre { display: none; }

/* The links leave the bar below the width set in the widget (inline rule per instance, default 1450px).
   Below 1024px the button goes too: one row with the logo and the burger. */
@media (max-width: 1024px) {
    .sqelm-head__nav, .sqelm-head__nav--clair,
    .sqelm-head__barre-haut .sqelm-head__bouton,
    .sqelm-head__barre-haut .sqelm-head__langues { display: none; }
    .sqelm-head__ouvrir { display: inline-flex; }
}
@media (max-width: 767px) {
    .sqelm-head__barre { display: grid; }
    body.sqelm-head-a-barre { padding-bottom: 56px; }
}
@media (min-width: 1025px) {
    .sqelm-head__ouvrir-txt { display: inline; }
}

/* Editor: the fixed header would float over the Elementor canvas, so pin it in place there */
.elementor-editor-active .sqelm-head__barre-haut { position: relative; }
.elementor-editor-active .sqelm-head__panneau { display: none !important; }
.elementor-editor-active .sqelm-head__barre { position: relative; }

@media (prefers-reduced-motion: reduce) {
    .sqelm-head *, .sqelm-head *::before, .sqelm-head *::after { transition: none !important; }
}

/* Without JavaScript: a plain sticky white bar, links always visible, no burger */
html:not(.sqelm-js) .sqelm-head .sqelm-head__barre-haut { position: sticky; background: var(--sqelm-head-fond); color: var(--sqelm-head-sur-clair); box-shadow: 0 1px 0 var(--sqelm-head-ligne); }
html:not(.sqelm-js) .sqelm-head .sqelm-head__rangee { height: auto; min-height: var(--sqelm-head-h-s); flex-wrap: wrap; gap: 12px 24px; padding-top: 10px; padding-bottom: 10px; }
html:not(.sqelm-js) .sqelm-head .sqelm-head__nav--clair { display: none !important; }
html:not(.sqelm-js) .sqelm-head .sqelm-head__nav:not(.sqelm-head__nav--clair) { display: flex !important; position: static; height: auto; padding: 8px var(--sqelm-head-x) 12px; pointer-events: auto; background: var(--sqelm-head-fond); }
html:not(.sqelm-js) .sqelm-head .sqelm-head__liens { flex-wrap: wrap; gap: 8px 18px; }
html:not(.sqelm-js) .sqelm-head .sqelm-head__bouton { display: inline-flex !important; }
html:not(.sqelm-js) .sqelm-head .sqelm-head__ouvrir, html:not(.sqelm-js) .sqelm-head .sqelm-head__barre { display: none !important; }
html:not(.sqelm-js) .sqelm-head .sqelm-head__logo-img, html:not(.sqelm-js) .sqelm-head .sqelm-head__logo svg { width: var(--sqelm-head-logo-s); }
@media (max-width: 1024px) {
    html:not(.sqelm-js) .sqelm-head__nav { flex: 1 1 100%; order: 3; justify-content: flex-start; }
    html:not(.sqelm-js) .sqelm-head__droite { margin-left: auto; }
}
