/* =====================================================================
   TECHINTERLAB – Bandeau supérieur et recherche
   Tout ce qui concerne le bandeau du haut (include/nav.tpl), dans l'ordre :
   1. le bandeau et le menu, sur ordinateur et dans le menu mobile ;
   2. sa disposition avec la loupe de recherche ;
   3. le panneau de recherche et ses suggestions (web/js/recherche.js),
      suggestions aussi utilisées sur la page de résultats ;
   4. le menu « Produits » en bandeau plein (web/js/menu-produits.js).
   ===================================================================== */


/* ---------------------------------------------------------------------
   BASES DU BANDEAU, REPRISES DU THÈME D'ORIGINE
   Mise en page de départ du menu, du menu mobile (#offcanvas, créé par
   main.js) et du menu déroulant de secours. Les sections suivantes
   l'adaptent au nouveau design : à force égale, elles l'emportent.
   --------------------------------------------------------------------- */

.offcanvas #page {
    overflow: hidden;
}

.offcanvas #page:after {
    transition: 2s;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 101;
    background: rgba(var(--noir-rgb), 0.7);
    content: "";
}

@media (max-width: 576px) and (min-width: 200px) {
    .nav .col-sm-5 {
        flex: 0 0 41.666667%;
        max-width: 41.666667%;
    }
}

.nav {
    margin: 0 auto;
}

@media screen and (max-width: 768px) {
    .nav {
        margin: 0;
    }
}

.nav #logo {
    font-size: var(--taille-30);
    margin: 0;
    text-transform: uppercase;
    font-weight: 900;
}

.nav #logo a {
    position: relative;
    color: var(--blanc);
}

.nav ul {
    padding: 0;
    margin: 0;
}

.nav ul li {
    padding: 0;
    margin: 0;
    list-style: none;
}

.nav ul li a {
    position: relative;
    font-weight: 400;
    padding: 30px 12px;
    transition: 0.5s;
}

.nav ul li.has-dropdown {
    position: relative;
}

.nav ul li.has-dropdown .dropdown {
    width: 140px;
    box-shadow: 0px 14px 33px -9px rgba(var(--noir-rgb), 0.75);
    z-index: 1002;
    visibility: hidden;
    opacity: 0;
    position: absolute;
    top: 40px;
    left: 0;
    text-align: left;
    background: var(--noir);
    padding: 20px;
    border-radius: var(--arrondi);
    transition: 0s;
}

.nav ul li.has-dropdown .dropdown:before {
    bottom: 100%;
    left: 40px;
    border: solid transparent;
    content: " ";
    height: 0;
    width: 0;
    position: absolute;
    pointer-events: none;
    border-bottom-color: var(--noir);
    border-width: 8px;
    margin-left: -8px;
}

.nav ul li.has-dropdown .dropdown li {
    display: block;
    margin-bottom: 7px;
}

.nav ul li.has-dropdown .dropdown li:last-child {
    margin-bottom: 0;
}

.nav ul li.has-dropdown .dropdown li a {
    padding: 2px 0;
    display: block;
    color: var(--texte-discret);
    line-height: 1.2;
    text-transform: none;
    font-size: var(--taille-13);
    letter-spacing: 0;
}

.nav ul li.has-dropdown .dropdown li a:hover {
    color: var(--blanc);
}

.nav ul li.has-dropdown:hover a,
.nav ul li.has-dropdown:focus a {
    color: var(--bleu);
}

.nav ul li.active > a {
    position: relative;
}

.nav ul li.active > a:after {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

#offcanvas {
    z-index: 1901;
    width: 270px;
    background: var(--encre);
    right: 0;
    top: 0;
    bottom: 0;
    padding: 75px 40px 40px 40px;
    overflow-y: auto;
    display: none;
    transform: translateX(270px);
    transition: 0.5s;
}

.offcanvas #offcanvas {
    transform: translateX(0px);
}

#offcanvas a {
    color: rgba(var(--blanc-rgb), 0.5);
}

#offcanvas a:hover {
    color: rgba(var(--blanc-rgb), 0.8);
}

#offcanvas ul {
    padding: 0;
    margin: 0;
}

#offcanvas ul li {
    padding: 0;
    margin: 0;
    list-style: none;
}

#offcanvas ul li > ul {
    padding-left: 20px;
    display: none;
}

#offcanvas ul li.offcanvas-has-dropdown > a {
    display: block;
    position: relative;
}

#offcanvas ul li.offcanvas-has-dropdown > a:after {
    position: absolute;
    right: 0px;
    font-family: 'icomoon';
    speak: none;
    font-style: normal;
    font-weight: normal;
    font-variant: normal;
    text-transform: none;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    content: "\e0c5";
    font-size: var(--taille-20);
    color: rgba(var(--blanc-rgb), 0.2);
    transition: 0.5s;
}

#offcanvas ul li.offcanvas-has-dropdown.active a:after {
    transform: rotate(-180deg);
}

.nav-toggle {
    cursor: pointer;
    text-decoration: none;
}

.nav-toggle:hover,
.nav-toggle:focus,
.nav-toggle:active {
    outline: none;
    border-bottom: none;
}

.nav-toggle i {
    position: relative;
    display: inline-block;
    width: 25px;
    height: 2px;
    font: bold 14px/.4 Helvetica;
    text-transform: uppercase;
    text-indent: -55px;
    transition: all .2s ease-out;
}

.nav-toggle i::before,
.nav-toggle i::after {
    content: '';
    width: 25px;
    height: 2px;
    position: absolute;
    left: 0;
    transition: all .2s ease-out;
}

.nav-toggle.nav-white > i {
    color: var(--blanc);
}

.nav-toggle i::before {
    top: -7px;
}

.nav-toggle i::after {
    bottom: -7px;
}

.nav-toggle:hover i::before {
    top: -10px;
}

.nav-toggle:hover i::after {
    bottom: -10px;
}

.nav-toggle.active i {
    background: transparent;
}

.nav-toggle.active i::before {
    top: 0;
    transform: rotateZ(45deg);
    background: var(--blanc);
}

.nav-toggle.active i::after {
    bottom: 0;
    transform: rotateZ(-45deg);
    background: var(--blanc);
}

.nav-toggle {
    padding: 6px 0 0 0;
    margin: 0 auto;
    display: none;
    height: 44px;
    width: 44px;
    z-index: 2001;
    border-bottom: none;
}

.animationnav {
    position: relative;
    transition: all .3s ease-in-out;
}

/* Liseré dégradé sous les liens : apparaît d'un coup au survol, sans
   animation (comme sur la page en cours) */
.animationnav a::after {
    content: "";
    visibility: hidden;
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, var(--bleu) 0%,var(--violet) 100%);
    transform: scaleX(0);
}

.animationnav a:hover::after {
    visibility: visible;
    transform: scaleX(1);
}

.animationnav .contact {
    font-size: 1em;
    background: linear-gradient(90deg,rgba(var(--bleu-rgb), 0.761) 60%,var(--blanc) 61%,rgba(var(--bleu-rgb), 0.761) 62%,rgba(var(--violet-rgb), 0.761) 100%);
    border-radius: var(--arrondi);
    text-decoration: none;
    padding: 10px;
    box-shadow: 2px 2px 5px;
    transition: all .3s ease-in-out 1s;
}

.animationnav .contact:hover {
    background: linear-gradient(90deg,var(--bleu) 60%,var(--blanc) 61%,var(--bleu) 62%,var(--violet) 100%);
    border-radius: var(--arrondi);
}

.animationnav li:last-child a::after {
    visibility: collapse;
}

.animationnav li:last-child a:hover {
    opacity: 1 !important;  /* gardé : propriété utilisée par une animation */
}

@media screen and (max-width:768px) {
    #offcanvas .contact {
        margin-top: 10px;
        text-align: center;
    }

    #offcanvas .contact {
        margin-top: 10px;
        text-align: center;
    }

    #offcanvas .contact {
        margin-top: 10px;
        text-align: center;
    }
}


/* ---------------------------------------------------------------------
   BANDEAU SUPÉRIEUR / MENU (include/nav.tpl)
   Bandeau blanc posé au-dessus de l'image, séparé d'elle par un liseré
   gris. Logo à gauche, trait vertical, puis le menu.
   Les liens occupent toute la hauteur du bandeau : le trait dégradé qui
   apparaît au survol vient ainsi se poser sur le liseré gris.
   Les mêmes règles couvrent le menu mobile (#offcanvas), copie du menu
   créée par main.js.
   --------------------------------------------------------------------- */

.nav {
    position: relative;               /* le bandeau ne recouvre plus l'image */
    background: var(--blanc);
    border-bottom: 1px solid var(--lisere); /* liseré gris de séparation (épaisseur réglable ici) */
    flex-wrap: wrap;                  /* le panneau passe sous la ligne du bandeau */
}

.nav .top-menu {
    width: 100%;
    padding: 0 30px;
}

.nav .top-menu .row {
    align-items: stretch;
    flex-wrap: nowrap;                /* le logo et le menu restent sur la même ligne */
}

/* Logo : même image, taille réduite (hauteur réglable ici).
   Le trait vertical gris est dessiné à sa droite. */
.nav #logo {
    position: relative;
    display: flex;
    align-items: center;
    width: max-content;               /* le trait vertical reste collé au logo */
    height: 100%;
    padding: 14px 24px 14px 0;
}

.nav #logo::after {
    content: "";
    position: absolute;
    right: 0;
    top: 50%;
    width: 1px;
    height: 32px;
    margin-top: -16px;
    background: var(--lisere);
}

.nav #logo a {
    display: inline-block;
    line-height: 0;
}

.nav #logo .fit-picture {
    height: 52px;
    width: auto;
    aspect-ratio: auto 1094 / 440;    /* place réservée avant le chargement du logo */
    max-width: none;
    transform: none;
}

/* Zone du menu : occupe toute la hauteur du bandeau */
.nav .menu-1 {
    display: flex;
    align-items: stretch;
    padding-left: 0;
}

.nav .menu-1 > ul {
    display: flex;
    align-items: stretch;
    flex: 1;
    flex-wrap: nowrap;
}

.nav .menu-1 > ul > li {
    display: flex;
    align-items: stretch;
    flex: none;
    white-space: nowrap;              /* « Tech Groupe » ne se coupe jamais en deux lignes */
}

/* Liens du menu */
.nav .menu-1 > ul > li > a,
.nav .menu-1 .nav-produits-link {
    display: flex;
    align-items: center;
    font-size: var(--taille-18);
    padding: 0 12px;
    color: var(--texte);
}

.nav .menu-1 > ul > li > a:hover,
.nav .menu-1 .nav-produits-link:hover {
    color: var(--bleu);
}

/* Trait dégradé du survol : posé sur le liseré gris */
.nav .menu-1 > ul > li > a::after,
.nav .menu-1 .nav-produits-link::after {
    bottom: -1px;                     /* = épaisseur du liseré */
    height: 3px;                      /* épaisseur du trait (6 px auparavant) */
}

/* « Tech Groupe » est le dernier lien : l'ancien CSS lui retirait ses
   marges et son trait de survol (prévus pour l'ancien bouton Contact) */
.nav .menu-1 > ul > li:last-child > a {
    padding: 0 12px;
}

.nav .menu-1 > ul > li:last-child > a:hover::after {
    visibility: visible;
}

.nav .menu-1 > ul > li.nav-cta {
    margin-left: auto;                /* pousse le bouton et Tech Groupe à droite */
    align-items: center;
    padding-right: 10px;
    order: 1;
}

.nav .menu-1 > ul > li.nav-cta > a.nav-devis {
    min-height: 42px;
    padding: 0 22px;
    border: 1px solid var(--bleu);
    border-radius: var(--arrondi);
    background: var(--blanc);
    color: var(--bleu);
    font-weight: 500;
    font-size: var(--taille-16);
    white-space: nowrap;
    box-shadow: none;
    transition: background-color 0.2s, color 0.2s;
}

.nav .menu-1 > ul > li.nav-cta > a.nav-devis:hover {
    background: var(--bleu-clair);
    color: var(--bleu-fonce);
}

.nav .menu-1 > ul > li.nav-cta > a.nav-devis::after {
    display: none;                    /* pas de trait de survol sous le bouton */
}

.nav .menu-1 > ul > li.nav-techgroupe {
    position: relative;
    padding-left: 12px;
    order: 3;
}

.nav .menu-1 > ul > li.nav-techgroupe::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 1px;
    height: 32px;
    margin-top: -16px;
    background: var(--lisere);
}

/* Bouton dans le menu mobile */
#offcanvas li.nav-cta {
    margin: 16px 0;
}

#offcanvas li.nav-cta > a.nav-devis {
    display: inline-block;
    white-space: nowrap;
    padding: 10px 22px;
    border-radius: var(--arrondi);
    background: linear-gradient(45deg, var(--bleu) 0%, var(--violet) 100%);
    color: var(--blanc);
    font-weight: 400;
    font-size: var(--taille-16);
}

/* Page en cours : bleu un peu plus soutenu pour rester lisible sur fond blanc */
.nav .menu-1 > ul > li.active > a,
.nav .menu-1 li.dropdown.active .nav-produits-link {
    color: var(--bleu);
}

#offcanvas li > a,
#offcanvas .nav-produits-link {
    font-size: var(--taille-18);
}

/* Menu déroulant « Produits » */
.nav .menu-1 li > div.dropdown {
    display: flex;
    align-items: stretch;
}

#offcanvas li > div.dropdown {
    display: inline-block;
}

.nav .menu-1 .nav-produits-toggle {
    display: flex;
    align-items: center;
    color: var(--texte);
    font-size: var(--taille-20);
    cursor: pointer;
    margin-right: 6px;
}

.nav .menu-1 .nav-produits-toggle > .nav-produits-link {
    align-self: stretch;
}

.nav .menu-1 .nav-produits-toggle::after {
    margin-left: -5px;
    transition: transform 0.2s ease;
}

#offcanvas .nav-produits-toggle {
    color: rgba(var(--blanc-rgb), 0.7);
    font-size: var(--taille-20);
    cursor: pointer;
}

#offcanvas .nav-produits-toggle::after {
    margin-left: 4px;
}

.nav .menu-1 .dropdown-menu .dropdown-item,
#offcanvas .dropdown-menu .dropdown-item {
    color: var(--noir);
    font-size: var(--taille-15);
}

/* Contour visible quand on navigue au clavier (touche Tab) */
.nav a:focus-visible,
.nav .dropdown-menu .dropdown-item:focus-visible {
    outline: 2px solid var(--bleu);
    outline-offset: -2px;
}

#offcanvas a:focus-visible {
    outline: 2px solid var(--blanc);
    outline-offset: 3px;
}

/* Petits écrans d'ordinateur : tout est un peu resserré pour tenir sur une ligne */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .nav .top-menu {
        padding: 0;
    }

    .nav .top-menu > .container {
        max-width: 100%;
    }

    .nav #logo {
        padding-right: 16px;
    }

    .nav #logo .fit-picture {
        height: 44px;
    }

    .nav .menu-1 > ul > li > a,
    .nav .menu-1 .nav-produits-link {
        font-size: var(--taille-15);
        padding: 0 8px;
    }

    .nav .menu-1 > ul > li:last-child > a {
        padding: 0 8px;
    }

    .nav .menu-1 .nav-produits-toggle::after {
        margin-left: -1px;
    }

    .nav .menu-1 > ul > li.nav-cta {
        padding-right: 16px;
    }

    .nav .menu-1 > ul > li.nav-cta > a.nav-devis {
        font-size: var(--taille-15);
        padding: 0 16px;
    }

    .nav .menu-1 > ul > li.nav-techgroupe {
        padding-left: 8px;
    }
}

/* Tablettes et mobiles : le menu passe dans l'icône ☰ (comme avant sur mobile,
   désormais aussi sur les tablettes en portrait, faute de place).
   Bandeau plus compact, sans trait vertical, icône ☰ en foncé sur le blanc. */
@media screen and (max-width: 991.98px) {
    .nav .menu-1 {
        display: none;
    }

    .nav-toggle,
    #offcanvas {
        display: block;
    }

    .nav .top-menu {
        padding: 0 1em;
    }

    .nav #logo {
        padding: 12px 0;
    }

    .nav #logo::after {
        display: none;
    }

    .nav #logo .fit-picture {
        height: 40px;
    }
}

/* Bandeau fixé en haut de l'écran (classes ajoutées par web/js/bandeau.js) :
   caché quand on descend, de retour dès qu'on remonte */
body.nav-fixe .nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    transition: transform 0.3s ease;
}

body.nav-fixe.nav-cachee .nav {
    transform: translateY(-100%);
}

/* L'icône ☰ et le menu mobile suivent le bandeau */
body.nav-fixe .nav-toggle {
    position: fixed;
    transition: transform 0.3s ease;
}

body.nav-fixe.nav-cachee .nav-toggle {
    transform: translateY(-120px);
}

body.nav-fixe #offcanvas {
    position: fixed;
}

/* Ouvrir le menu ☰ en bas de page ne ramène plus tout en haut */
body.nav-fixe.offcanvas #page {
    position: relative;
}

/* Lien vers une section de page (ex. contact#15) : le titre n'est pas caché sous le bandeau */
html {
    scroll-padding-top: 90px;
}

@media (prefers-reduced-motion: reduce) {
    body.nav-fixe .nav,
    body.nav-fixe .nav-toggle {
        transition: none;
    }
}

.nav-toggle {
    right: 16px;
    top: 10px;            /* icône ☰ centrée sur la hauteur du bandeau */
}

.nav-toggle:not(.active) > i,
.nav-toggle:not(.active) > i::before,
.nav-toggle:not(.active) > i::after {
    background: var(--texte);
}

/* Logo Tech Groupe (blanc) rendu visible sur le bandeau blanc */
.nav #logo img[src*="techgroup.png"] {
    filter: brightness(0);
}


/* ---------------------------------------------------------------------
   BANDEAU – DISPOSITION AVEC LA LOUPE DE RECHERCHE
   --------------------------------------------------------------------- */

/* Bandeau resserré vers le centre : logo et menu à gauche, boutons à droite,
   dans la largeur --largeur-contenu (1-reglages.css) */
.nav .top-menu > .container {
    max-width: var(--largeur-contenu);
}


/* La loupe suit « Contact », à gauche ; à droite : « Demander un devis »
   puis « Tech Groupe » (ordre fixé par nav.tpl et, à droite, par order). */

.nav .menu-1 > ul > li.nav-recherche {
    margin-left: 0;
    align-items: center;
    padding: 0 0 0 4px;
}


/* Portables (992 à 1365 px) : liens un peu resserrés */
@media (min-width: 992px) and (max-width: 1365.98px) {
    .nav .top-menu {
        padding: 0 12px;
    }

    .nav .menu-1 > ul > li > a,
    .nav .menu-1 .nav-produits-link {
        padding: 0 9px;
    }

    .nav .menu-1 > ul > li:last-child > a {
        padding: 0 9px;
    }
}

/* Loupe du bandeau */
.recherche-ouvrir {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--texte);
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

.recherche-ouvrir:hover {
    background: var(--fond-doux);
    color: var(--bleu);
}

.recherche-ouvrir[aria-expanded="true"] {
    background: var(--bleu-clair);
    color: var(--bleu);
}

/* Contour clavier (touche Tab) : loupe du bandeau et catégories du menu « Produits » */
.recherche-ouvrir:focus-visible,
#menu-produits .mp-cat:focus-visible {
    outline: 2px solid var(--bleu);
    outline-offset: 2px;
}

/* Loupe sur mobile et tablette, à gauche de l'icône ☰ */
.recherche-ouvrir-mobile {
    display: none;
}

@media (max-width: 991.98px) {
    .nav .top-menu {
        position: relative;
    }

    .recherche-ouvrir-mobile {
        display: inline-flex;
        position: absolute;
        top: 50%;
        right: 60px;
        margin-top: -21px;
    }
}

/* Dans le menu mobile, la loupe du bandeau n'est pas recopiée */
#offcanvas li.nav-recherche {
    display: none !important;  /* masquage forcé à cette largeur, quel que soit l'état de la page */
}


/* ---------------------------------------------------------------------
   PANNEAU DE RECHERCHE ET SUGGESTIONS
   Panneau ouvert par la loupe (include/nav.tpl) et suggestions
   instantanées (web/js/recherche.js), aussi utilisées sous le champ de la
   page de résultats (recherche.tpl, voir 5-pages.css).
   --------------------------------------------------------------------- */

/* Panneau de recherche : s'ouvre sous le bandeau, dans le même blanc,
   avec le champ puis les suggestions directement dessous */

.recherche-panneau {
    flex: 0 0 100%;
    width: 100%;
    box-sizing: border-box;
    border-top: 1px solid var(--bordure);
    background: var(--blanc);
    padding: 28px 24px 36px;
    max-height: calc(100vh - 90px);
    overflow-y: auto;
}

.recherche-panneau[hidden] {
    display: none;
}

.recherche-panneau-interieur {
    max-width: 820px;
    margin: 0 auto;
}

.recherche-panneau .recherche-formulaire-bandeau {
    position: relative;
    display: block;
    margin: 0;
}

.recherche-panneau .recherche-loupe {
    position: absolute;
    top: 16px;
    left: 20px;
    color: var(--texte-discret);
    pointer-events: none;
}

.recherche-champ-bandeau {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 52px;
    padding: 0 56px 0 54px;
    border: 1px solid var(--bordure);
    border-radius: var(--arrondi);
    background: var(--fond-doux);
    color: var(--encre);
    font-family: Poppins, sans-serif;
    font-size: var(--taille-17);
    transition: background-color 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.recherche-champ-bandeau::placeholder {
    color: var(--texte-discret);
}

.recherche-champ-bandeau::-webkit-search-cancel-button {
    display: none;                    /* le bouton × du panneau suffit */
}

.recherche-champ-bandeau:focus {
    outline: none;
    background: var(--blanc);
    border-color: var(--bleu);
    box-shadow: 0 0 0 3px rgba(var(--bleu-rgb), 0.2);
}

.recherche-fermer {
    position: absolute;
    top: 6px;
    right: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--texte-doux);
    cursor: pointer;
}

.recherche-fermer:hover {
    background: var(--bordure);
    color: var(--encre);
}

/* Suggestions dans le panneau : à même le blanc, sans cadre */
.recherche-panneau .recherche-suggestions {
    position: static;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    gap: 8px 32px;
    width: auto;
    max-width: none;
    max-height: none;
    overflow: visible;
    margin-top: 20px;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
}

.recherche-panneau .recherche-groupe-gammes {
    grid-column: 1;
}

.recherche-panneau .recherche-groupe-produits {
    grid-column: 2;
}

.recherche-panneau .recherche-suggestions:not(:has(.recherche-groupe-gammes)) .recherche-groupe-produits,
.recherche-panneau .recherche-suggestions:not(:has(.recherche-groupe-produits)) .recherche-groupe-gammes,
.recherche-panneau .recherche-groupe-raccourcis,
.recherche-panneau .recherche-suggestions-vide,
.recherche-panneau .recherche-suggestion-tout {
    grid-column: 1 / -1;
}

.recherche-panneau .recherche-suggestions-groupe {
    padding-left: 10px;
}

.recherche-panneau .recherche-suggestion-tout {
    justify-content: flex-start;
    margin-top: 4px;
    border-top: 1px solid var(--bordure);
    border-radius: 0;
}

/* Raccourcis vers les catégories (champ encore vide) */
.recherche-raccourcis {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 6px 10px 0;
}

.recherche-raccourci {
    padding: 8px 14px;
    border: 1px solid var(--bordure);
    border-radius: var(--arrondi);
    background: var(--blanc);
    color: var(--texte);
    font-size: var(--taille-14);
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}

.recherche-raccourci:hover,
.recherche-raccourci.est-active {
    border-color: var(--bleu);
    color: var(--bleu);
}

/* Voile léger sur la page derrière le panneau ouvert */
body.recherche-ouverte::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 99;                      /* juste sous le bandeau */
    background: rgba(var(--encre-rgb), 0.28);
}

@media (max-width: 767.98px) {
    .recherche-panneau {
        padding: 18px 16px 24px;
    }

    .recherche-champ-bandeau {
        font-size: var(--taille-16);              /* 16 px : évite le zoom automatique sur iPhone */
    }

    .recherche-panneau .recherche-suggestions {
        grid-template-columns: minmax(0, 1fr);
    }

    .recherche-panneau .recherche-groupe-gammes,
    .recherche-panneau .recherche-groupe-produits {
        grid-column: 1;
    }
}

/* Suggestions sous le champ */
.recherche-avec-suggestions {
    position: relative;
}

.recherche-suggestions {
    position: absolute;
    z-index: 1001;
    top: calc(100% + 8px);
    right: 0;
    width: 440px;
    max-width: calc(100vw - 32px);
    max-height: 70vh;
    overflow-y: auto;
    padding: 8px;
    border: 1px solid var(--bordure);
    border-radius: var(--arrondi);
    background: var(--blanc);
    box-shadow: 0 16px 40px rgba(var(--encre-rgb), 0.16);
    text-align: left;
    font-family: Poppins, sans-serif;
}

.recherche-suggestions[hidden] {
    display: none;
}

.recherche-formulaire .recherche-suggestions {
    left: 0;
    right: 0;
    width: auto;
    max-width: none;
}

.recherche-suggestions-groupe {
    padding: 10px 10px 4px;
    font-size: var(--taille-11);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--texte-discret);
}

.recherche-suggestion {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    border-radius: var(--arrondi);
    cursor: pointer;
}

.recherche-suggestion:hover,
.recherche-suggestion.est-active {
    background: var(--fond-doux);
}

.recherche-suggestion-image {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 48px;
    height: 48px;
    overflow: hidden;
    border: 1px solid var(--bordure);
    border-radius: var(--arrondi);
    background: var(--blanc);
}

.recherche-suggestion-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.recherche-suggestion-textes {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.recherche-suggestion-titre {
    font-size: var(--taille-15);
    font-weight: 400;
    line-height: 1.35;
    color: var(--encre);
}

.recherche-suggestion-titre strong {
    font-weight: 600;
}

.recherche-suggestion-chemin {
    overflow: hidden;
    font-size: var(--taille-12);
    line-height: 1.4;
    color: var(--texte-discret);
    white-space: nowrap;
    text-overflow: ellipsis;
}

.recherche-suggestion-tout {
    justify-content: center;
    margin-top: 6px;
    padding: 12px 10px;
    border-top: 1px solid var(--bordure);
    border-radius: 0 0 var(--arrondi) var(--arrondi);
    font-size: var(--taille-14);
    font-weight: 500;
    color: var(--bleu);
}

.recherche-suggestions-vide {
    padding: 14px 10px 6px;
    font-size: var(--taille-15);
    color: var(--texte-doux);
}


/* ---------------------------------------------------------------------
   MENU « PRODUITS » EN BANDEAU PLEIN (web/js/menu-produits.js)
   S'ouvre au survol de « Produits » : catégories à gauche, gammes de la
   catégorie survolée au centre, sa photo à droite jusqu'au bord de l'écran.
   --------------------------------------------------------------------- */

/* Sur ordinateur, l'ancien menu déroulant est remplacé par le bandeau */
@media (min-width: 992px) {
    body.menu-produits-pret .nav .menu-1 li.dropdown .dropdown-menu {
        display: none !important;  /* masquage forcé à cette largeur, quel que soit l'état de la page */
    }
}

.nav .menu-1 li.dropdown.mp-ouvert .nav-produits-link {
    color: var(--bleu);
}

.nav .menu-1 li.dropdown.mp-ouvert .nav-produits-link::after {
    visibility: visible;
    transform: scaleX(1);
    opacity: 1;
}


.nav .menu-1 li.dropdown.mp-ouvert .nav-produits-toggle::after {
    transform: rotate(180deg);
}

.menu-produits {
    --mp-marge: max(0px, calc((100% - var(--largeur-contenu)) / 2));   /* marge de chaque côté du contenu */
    --mp-gauche: 300px;               /* largeur de la colonne des catégories */
    --mp-photo: 360px;                /* largeur de la photo (hors marge) */
    --mp-pad: 15px;                   /* retrait intérieur, aligné sur le logo */
    position: relative;
    flex: 0 0 100%;
    width: 100%;
    overflow: hidden;
    border-top: 1px solid var(--bordure);
    background: linear-gradient(90deg, var(--fond-doux) calc(var(--mp-marge) + var(--mp-pad) + var(--mp-gauche)), var(--blanc) 0);
    box-shadow: 0 18px 40px rgba(var(--encre-rgb), 0.16);
    font-family: Poppins, sans-serif;
}

.menu-produits[hidden] {
    display: none;
}

#menu-produits .mp-interieur {
    display: grid;
    grid-template-columns: var(--mp-gauche) minmax(0, 1fr) var(--mp-photo);
    max-width: var(--largeur-contenu);
    min-height: 320px;
    margin: 0 auto;
    padding: 0 var(--mp-pad);
}

#menu-produits .mp-etiquette {
    font-size: var(--taille-11);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--texte-discret);
}

/* Catégories */
#menu-produits .mp-gauche {
    padding: 24px 0;
    border-right: 1px solid var(--bordure);
}

#menu-produits .mp-gauche .mp-etiquette {
    padding-bottom: 10px;
}

#menu-produits .mp-categories {
    list-style: none;
    margin: 0;
    padding: 0;
}

#menu-produits li {
    display: block;                   /* l'ancien CSS du menu mettait les éléments en ligne */
}

#menu-produits .mp-cat {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 13px 18px 13px 0;
    font-size: var(--taille-16);
    font-weight: 500;
    line-height: 1.3;
    color: var(--texte);
    text-decoration: none;
}

#menu-produits .mp-cat svg {
    flex: none;
    margin-right: -4px;
    color: var(--gris-pale);
}

#menu-produits .mp-cat:hover,
#menu-produits .mp-cat.est-active {
    color: var(--bleu);
}

#menu-produits .mp-cat.est-active svg {
    color: var(--bleu);
}

#menu-produits .mp-cat.est-active::after {
    content: "";
    position: absolute;
    top: 8px;
    right: -1px;
    bottom: 8px;
    width: 3px;
    border-radius: 3px;
    background: linear-gradient(180deg, var(--bleu) 0%, var(--violet) 100%);
}


/* Gammes de la catégorie survolée */
#menu-produits .mp-droite {
    padding: 24px 32px 28px 40px;
}

#menu-produits .mp-entete {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 17px;
    margin-bottom: 10px;
}

#menu-produits .mp-tout {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: none;
    font-size: var(--taille-14);
    font-weight: 500;
    color: var(--bleu);
    text-decoration: none;
    white-space: nowrap;
}

#menu-produits .mp-tout:hover {
    color: var(--bleu-fonce);
}

#menu-produits .mp-gammes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2px 24px;
    list-style: none;
    margin: 0;
    padding: 0;
}

#menu-produits .mp-gammes a {
    display: block;
    margin: 0 -12px;
    padding: 9px 12px;
    border-radius: var(--arrondi);
    font-size: var(--taille-15);
    line-height: 1.35;
    color: var(--texte);
    text-decoration: none;
}

#menu-produits .mp-gammes a:hover,
#menu-produits .mp-gammes a:focus-visible {
    background: var(--bleu-clair);
    color: var(--bleu);
    outline: none;
}

/* Grande photo, jusqu'au bord droit de l'écran, avec le titre de la catégorie */
#menu-produits .mp-photo {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    isolation: isolate;
    width: calc(var(--mp-marge) + var(--mp-pad) + var(--mp-photo));
    overflow: hidden;
    background: linear-gradient(135deg, var(--encre) 0%, var(--bleu-nuit) 100%);
    text-decoration: none;
}


#menu-produits .mp-photo img {
    position: absolute;
    top: 0;
    left: 0;
    display: block;
    width: 100%;
    max-width: none;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

#menu-produits .mp-photo img.mp-photo-fond {
    display: none;                    /* ancienne version du script : fond flou abandonné */
}

#menu-produits .mp-photo-vide img {
    display: none;
}

#menu-produits .mp-legende {
    z-index: 1;
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 72px 28px 24px;
    background: linear-gradient(180deg, rgba(var(--encre-rgb), 0) 0%, rgba(var(--encre-rgb), 0.55) 45%, rgba(var(--encre-rgb), 0.82) 100%);
    color: var(--blanc);
}


#menu-produits .mp-legende strong {
    font-size: var(--taille-22);
    font-weight: 600;
    line-height: 1.25;
}

#menu-produits .mp-legende strong::before {
    content: "";
    display: block;
    width: 32px;
    height: 2px;
    margin-bottom: 12px;
    background: var(--degrade);
}

#menu-produits .mp-legende span {
    font-size: var(--taille-14);
    line-height: 1.45;
    opacity: 0.9;
}

/* Voile léger sur la page derrière le bandeau ouvert */
body.menu-produits-ouvert::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 99;                      /* juste sous le bandeau */
    background: rgba(var(--encre-rgb), 0.2);
}

/* Petits écrans d'ordinateur : colonnes un peu plus étroites */
@media (max-width: 1263.98px) {
    .menu-produits {
        --mp-pad: 27px;               /* même retrait que le logo sur ces écrans */
    }
}

@media (max-width: 1199.98px) {
    .menu-produits {
        --mp-gauche: 250px;
        --mp-photo: 280px;
    }

    #menu-produits .mp-droite {
        padding: 24px 24px 28px 28px;
    }
}

/* Tablettes et mobiles : le menu ☰ garde la liste simple des catégories */
@media (max-width: 991.98px) {
    .menu-produits {
        display: none !important;  /* masquage forcé à cette largeur, quel que soit l'état de la page */
    }
}


/* ---------------------------------------------------------------------
   MENU DÉROULANT DE SECOURS – animation d'ouverture (main.js)
   Seule partie d'animate.css encore utile : le menu déroulant d'origine,
   qui ne sert que si le menu « Produits » ne se charge pas.
   --------------------------------------------------------------------- */

.animated-fast {
    animation-duration: 0.5s;
    animation-fill-mode: both;
}

.fadeInUpMenu {
    animation-name: fadeInUpMenu;
}

@keyframes fadeInUpMenu {
    from {
        opacity: 0;
        visibility: hidden;
        transform: translate3d(0, 20px, 0);
    }

    to {
        opacity: 1;
        visibility: visible;
        transform: none;
    }
}
