/* =====================================================================
   TECHINTERLAB – Améliorations progressives du design
   Chargé APRÈS style.min.css dans base.layout.tpl : les règles ci-dessous
   complètent ou remplacent les anciennes, sans modifier style.min.css.
   Après chaque modification de ce fichier, augmenter le numéro ?v=… dans
   base.layout.tpl pour que les navigateurs chargent la nouvelle version.
   ===================================================================== */


/* ---------------------------------------------------------------------
   COULEURS DE RÉFÉRENCE
   Le bleu utilisé partout (liens, boutons, page en cours, contours) est
   réglé ici, une seule fois. Il reprend la teinte du logo et des liserés
   dégradés (#19b5fe), légèrement plus soutenue pour rester lisible en texte.
   --------------------------------------------------------------------- */

:root {
    --bleu: #1590d4;                  /* bleu de référence */
    --bleu-fonce: #0d74ad;            /* survol des liens et boutons */
    --bleu-clair: #e8f6fe;            /* fonds bleutés (survol, pastilles) */
}


/* ---------------------------------------------------------------------
   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: #ffffff;
    border-bottom: 1px solid #c8ced6; /* liseré gris de séparation (épaisseur réglable ici) */
}

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

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

.nav .top-menu .row {
    align-items: stretch;
}

/* 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: #c8ced6;
}

.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-wrap: wrap;
    flex: 1;
}

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

/* Liens du menu */
.nav .menu-1 > ul > li > a,
.nav .menu-1 .nav-produits-link {
    display: flex;
    align-items: center;
    font-size: 1.125rem;
    padding: 0 12px;
    color: #2c3a4d;
}

.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 !important;
}

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

/* Partie droite : bouton « Demander un devis », trait vertical, « Tech Groupe » */
.nav .menu-1 > ul > li.nav-cta {
    margin-left: auto;                /* pousse le bouton et Tech Groupe à droite */
    align-items: center;
    padding-right: 24px;
}

.nav .menu-1 > ul > li.nav-cta > a.nav-devis {
    min-height: 42px;
    padding: 0 22px;
    border: 1px solid var(--bleu);
    border-radius: 30px;
    background: #ffffff;
    color: var(--bleu);
    font-weight: 500;
    font-size: 1rem;
    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;
}

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

/* 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: 30px;
    background: linear-gradient(45deg, #19b5fe 0%, #9870fc 100%);
    color: #ffffff;
    font-weight: 400;
    font-size: 1rem;
}

/* 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) !important;
}

#offcanvas li > a,
#offcanvas .nav-produits-link {
    font-size: 1.125rem;
}

/* 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: #2c3a4d;
    font-size: 20px;
    cursor: pointer;
    margin-right: 6px;
}

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

/* Petite flèche du menu « Produits » : même écart avec le texte qu'avant */
.nav .menu-1 .nav-produits-toggle::after {
    margin-left: -5px !important;
}

#offcanvas .nav-produits-toggle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 20px;
    cursor: pointer;
}

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

.nav .menu-1 .dropdown-menu .dropdown-item,
#offcanvas .dropdown-menu .dropdown-item {
    color: #000000;
    font-size: 15px;
}

/* 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 #ffffff;
    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: 0.9375rem;
        padding: 0 8px;
    }

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

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

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

    .nav .menu-1 > ul > li.nav-cta > a.nav-devis {
        font-size: 0.9375rem;
        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 !important;            /* 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: #2c3a4d;
}

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


/* ---------------------------------------------------------------------
   IMAGE D'ACCUEIL (include/slider.tpl)
   --------------------------------------------------------------------- */

/* Forme bleue en diagonale retirée */
#slider .index_slider::after {
    display: none;
}

/* Hauteur de la photo (réglable ici) */
#slider {
    min-height: 0;
}

/* Avant le démarrage du diaporama (main.js), la première photo est déjà affichée :
   la page ne « saute » plus au chargement */
#slider .flexslider .slides > li:first-child {
    display: block;
}

#slider .flexslider .slides li {
    min-height: 440px;
}

/* Anciens blocs de texte vides de chaque photo : ils imposaient 500 px de haut */
#slider .flexslider .slides li .slider-text {
    display: none;
}

/* Voile plus sombre à gauche, derrière le titre, pour qu'il reste lisible */
#slider .flexslider .slides li .overlay {
    opacity: 1;
    background: linear-gradient(90deg, rgba(10, 20, 35, 0.6) 0%, rgba(10, 20, 35, 0.3) 55%, rgba(10, 20, 35, 0.1) 100%);
}

/* Titre centré verticalement sur la photo, taille réduite (réglable ici) */
#slider .flexslider .slider-text-absolute {
    top: 50%;
    transform: translateY(-50%);
}

#slider .flexslider .slider-text-absolute h1 {
    font-size: clamp(1.375rem, 2.2vw, 2rem) !important;
    line-height: 1.25;
    margin: 0;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

/* Points du diaporama : en bas de la photo, sous le titre */
#slider .flexslider .flex-control-nav {
    bottom: 1.5em;
}

@media (max-width: 991.98px) {
    #slider .flexslider .slides li {
        min-height: 380px;
    }
}

@media screen and (max-width: 768px) {
    #slider .flexslider .slides li {
        min-height: 320px;
    }

    #slider .flexslider .slides li .overlay {
        background: rgba(10, 20, 35, 0.45);
    }

    #slider .flexslider .slider-text-absolute {
        left: 0;
        right: 0;
        padding: 0 20px;
    }

    #slider .flexslider .slider-text-absolute h1 {
        font-size: 1.25rem !important;
    }
}


/* ---------------------------------------------------------------------
   BANDEAU RESAH (index.tpl) – version fixe et lisible
   Le défilement continu est arrêté : les 4 avantages sont présentés
   côte à côte (2 × 2 sur tablette, à faire glisser au doigt sur mobile).
   Ses styles d'origine sont écrits dans index.tpl ; « #page » devant
   chaque règle les rend prioritaires sur ceux-ci.
   --------------------------------------------------------------------- */

#page .til-banner {
    height: auto;                     /* était fixé à 310 px */
    padding: 36px 0 40px;
}

/* En-tête */
#page .til-header {
    padding: 0 24px 22px;
}

#page .til-overline {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 0.16em;
    margin-bottom: 8px;
}

#page .til-title {
    font-size: 1.375rem;
    line-height: 1.3;
    letter-spacing: 0.01em;
}

#page .til-title em {
    color: rgba(255, 255, 255, 0.85);
}

/* Zone des avantages : plus de défilement ni de fondus sur les côtés */
#page .til-scroll-row {
    display: block;
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 24px;
}

#page .til-fade-l,
#page .til-fade-r,
#page .til-div {
    display: none;
}

#page .til-track {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    align-items: stretch;             /* cartes de même hauteur */
    animation: none;
    transform: none;
    white-space: normal;
}

/* Le défilement avait besoin des cartes en double : seules les 4 premières restent */
#page .til-track > .til-card ~ .til-card ~ .til-card ~ .til-card ~ .til-card {
    display: none;
}

/* Cartes : en-tête (icône + petit titre), puis titre, texte et étiquettes
   sur toute la largeur. Les éléments sont alignés d'une carte à l'autre. */
#page .til-card {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    grid-template-areas:
        "icon tag"
        "name name"
        "desc desc"
        "pills pills";
    grid-template-rows: auto auto auto 1fr;
    column-gap: 12px;
    row-gap: 0;
    align-items: start;               /* l'ancien style centrait tout verticalement */
    margin: 0;
    padding: 18px 20px 20px;
    border-radius: 14px;
    background: rgba(10, 30, 70, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

#page .til-body {
    display: contents;
}

#page .til-icon {
    grid-area: icon;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    gap: 0;
}

#page .til-icon img {
    width: 22px !important;
    height: 22px !important;
}

#page .til-icon-lbl {
    display: none;                    /* doublon du petit titre de la carte */
}

#page .til-tag   { grid-area: tag; align-self: center; }
#page .til-name  { grid-area: name; margin-top: 12px; }
#page .til-desc  { grid-area: desc; margin-top: 8px; }
#page .til-pills { grid-area: pills; align-self: end; margin-top: 14px; }

/* Grand écran (4 cartes côte à côte) : titres, textes et étiquettes
   commencent exactement à la même hauteur dans les 4 cartes */
@media (min-width: 1200px) {
    #page .til-track {
        grid-auto-rows: auto;
        row-gap: 0;
    }

    #page .til-card {
        grid-row: span 4;
        grid-template-rows: subgrid;
    }
}

/* Textes : plus grands, droits (plus d'italique) et plus contrastés */
#page .til-tag {
    font-size: 0.6875rem;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 0.12em;
    white-space: normal;
}

#page .til-name {
    font-size: 1rem;
    line-height: 1.3;
}

#page .til-desc {
    font-size: 0.875rem;
    font-style: normal;
    line-height: 1.5;
    color: #ffffff;
}

#page .til-pills {
    flex-wrap: wrap;
}

#page .til-pill {
    font-size: 0.75rem;
    padding: 3px 10px;
}

/* Tablette : 2 × 2 */
@media (max-width: 1199.98px) {
    #page .til-track {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Mobile : une carte à la fois, à faire glisser au doigt */
@media (max-width: 767.98px) {
    #page .til-banner {
        padding: 28px 0 30px;
    }

    #page .til-title {
        font-size: 1.125rem;
    }

    #page .til-scroll-row {
        padding: 0;
    }

    #page .til-track {
        display: flex;
        gap: 12px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-padding: 0 20px;
        padding: 0 20px 4px;
        scrollbar-width: none;
    }

    #page .til-track::-webkit-scrollbar {
        display: none;
    }

    #page .til-card {
        flex: 0 0 82%;
        scroll-snap-align: start;
    }
}


/* ---------------------------------------------------------------------
   BANDEAU RESAH POSÉ SUR LES PHOTOS DE L'ACCUEIL
   Appliqué dès l'affichage de la page (sans attendre le JavaScript), avec
   une hauteur approximative du bandeau Resah ; web/js/resah.js la remplace
   ensuite par la hauteur exacte.
   Les photos du diaporama s'étendent derrière le bandeau Resah, qui
   devient transparent : un voile sombre légèrement teinté aux couleurs
   de la charte assure la lisibilité, les cartes sont en verre dépoli.
   --------------------------------------------------------------------- */

:root {
    --resah-hauteur: 400px;           /* hauteur approximative, ajustée par resah.js */
}

@media (max-width: 1199.98px) {
    :root {
        --resah-hauteur: 580px;
    }
}

@media (max-width: 767.98px) {
    :root {
        --resah-hauteur: 460px;
    }
}

body:has(.til-banner) #slider {
    float: none;
}

/* Hauteur de la photo = zone du titre + hauteur du bandeau Resah */
body:has(.til-banner) #slider .flexslider .slides li {
    min-height: calc(440px + var(--resah-hauteur, 0px));
}

/* Le titre reste centré dans la zone au-dessus du bandeau Resah */
body:has(.til-banner) #slider .flexslider .slider-text-absolute {
    top: 220px;
}

/* Points du diaporama : juste au-dessus du bandeau Resah */
body:has(.til-banner) #slider .flexslider .flex-control-nav {
    bottom: calc(var(--resah-hauteur, 0px) + 1.2em);
}

/* Le bandeau Resah remonte sur la photo */
body:has(.til-banner) #page .til-banner {
    position: relative;
    z-index: 2;
    margin-top: calc(-1 * var(--resah-hauteur, 0px));
    background: linear-gradient(180deg, rgba(10, 22, 40, 0.4) 0%, rgba(10, 22, 40, 0.68) 100%);
    -webkit-backdrop-filter: blur(4px);  /* photo légèrement floutée derrière le bandeau */
    backdrop-filter: blur(4px);
}

/* Teinte bleu-violet de la charte : le bandeau se distingue nettement de la photo
   (intensité réglable avec les deux valeurs 0.3) */
body:has(.til-banner) #page .til-banner::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(25, 181, 254, 0.3) 0%, rgba(152, 112, 252, 0.3) 100%);
    pointer-events: none;
}

/* Fin trait dégradé en haut du bandeau, comme celui du menu au survol */
body:has(.til-banner) #page .til-banner::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #19b5fe 0%, #9870fc 100%);
    pointer-events: none;
}

body:has(.til-banner) #page .til-title,
body:has(.til-banner) #page .til-overline {
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.35);
}

/* Cartes en verre dépoli */
body:has(.til-banner) #page .til-card {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

@media (max-width: 991.98px) {
    body:has(.til-banner) #slider .flexslider .slides li {
        min-height: calc(380px + var(--resah-hauteur, 0px));
    }

    body:has(.til-banner) #slider .flexslider .slider-text-absolute {
        top: 190px;
    }
}

@media screen and (max-width: 768px) {
    body:has(.til-banner) #slider .flexslider .slides li {
        min-height: calc(320px + var(--resah-hauteur, 0px));
    }

    body:has(.til-banner) #slider .flexslider .slider-text-absolute {
        top: 160px;
    }
}


/* ---------------------------------------------------------------------
   NOS PRODUITS – cartes des catégories (index.tpl)
   Cartes claires : photo en haut, titre et description en dessous,
   lien « En savoir plus » toujours visible (aussi sur mobile).
   Les anciens styles sont en partie écrits dans index.tpl : « #page »
   et « !important » rendent ces règles prioritaires.
   --------------------------------------------------------------------- */

/* Titre de la section */
#page .nos-produits[style*="opacity: 0"],
#page #anim-fleche2,
#page #anim-fleche3 {
    display: none;                    /* bloc vide et flèches grises animées */
}

#page .nos-produits {
    background: #f6f8fb !important;
    padding: 56px 24px 8px;
}

#page .nos-produits > p:first-child {
    font-family: Poppins, sans-serif;
    font-size: 1.75rem !important;
    font-weight: 600;
    color: #0f1e33;
    margin: 0;
}

#page .nos-produits > p:first-child::after {
    content: "";
    display: block;
    width: 48px;
    height: 2px;
    margin: 14px auto 0;
    background: linear-gradient(90deg, #19b5fe 0%, #9870fc 100%);
}

/* Zone des cartes */
#page #case-categorie {
    background-color: #f6f8fb !important;
    padding: 32px 24px 72px !important;
}

#page #case-categorie > .row {
    max-width: 1320px;
    margin: 0 auto;
}

#page #case-categorie .row > [class*="col-"] {
    display: flex;
    flex-direction: column;
    margin-bottom: 24px !important;
}

/* Carte */
#page #case-categorie .category-card {
    display: flex;
    flex-direction: column;
    flex: 1;
    height: auto;
    margin: 0;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid #e3e8ef;
    box-shadow: 0 4px 14px rgba(15, 30, 51, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

#page #case-categorie .category-card::after {
    display: none;                    /* forme dégradée en diagonale */
}

#page #case-categorie .category-card > a {
    display: block;
    color: inherit;
    text-decoration: none;
}

/* Photo */
#page #case-categorie .category-card .imgWrap {
    display: block;
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #eef2f7;
}

#page #case-categorie .category-card .imgWrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 1;
    transition: transform 0.4s ease;
}

/* Photo de la gamme Resah, très bleu-violet : couleurs atténuées */
#page #case-categorie a[href$="category/16#1"] .imgWrap img {
    filter: saturate(0.45) brightness(1.05);
}

/* Titre */
#page #case-categorie .category-card .body-category-card {
    position: static;
    padding: 14px 18px 0;
    text-shadow: none;
    opacity: 1;
}

#page #case-categorie .category-card .body-category-card h3 {
    font-family: Poppins, sans-serif;
    font-size: 0.9375rem !important;       /* taille des titres de catégorie */
    font-weight: 600 !important;
    line-height: 1.35;
    color: #0f1e33 !important;
    text-transform: none !important;
    margin: 0;
    transition: color 0.25s ease;
}

/* Zone du bas : lien « En savoir plus », toujours en bas de la carte */
#page #case-categorie .category-card .footer-category-card {
    position: static;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    flex: 1;
    padding: 0 18px 14px;
    opacity: 1;
    font-size: 0.9375rem;
    text-shadow: none;
}

/* Description : posée sur le bas de la photo, sur un voile sombre.
   Sur ordinateur, elle apparaît au survol de la carte ; sur téléphone
   et tablette (pas de survol possible), elle n'est pas affichée. */
#page #case-categorie .footer-category-card > a {
    position: absolute;
    z-index: 1;
    top: 0;
    left: 0;
    width: 100%;                      /* largeur explicite : nécessaire pour Safari (iPhone, Mac) */
    aspect-ratio: 4 / 3;              /* même format que la photo */
    overflow: hidden;                 /* le voile ne dépasse jamais de la photo */
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 16px 20px;
    background: linear-gradient(180deg, rgba(10, 22, 40, 0) 35%, rgba(10, 22, 40, 0.78) 100%);
    color: #ffffff;
    text-decoration: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Texte de la description, tel qu'il est saisi dans l'administration
   (l'éditeur peut ajouter ses propres paragraphes et de l'italique) */
/* Trait dégradé en bas de la photo : il apparaît avec le voile, au survol
   (il était auparavant caché sous le voile) */
#page #case-categorie .footer-category-card > a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: linear-gradient(90deg, #19b5fe 0%, #9870fc 100%);
}

#page #case-categorie .footer-category-card > a p {
    margin: 0 !important;
    color: #ffffff !important;
    font-size: 1rem;
    font-weight: 400 !important;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35) !important;
    line-height: 1.45;
}

/* Pas de gras dans les descriptions, même si l'éditeur de l'administration en a ajouté */
#page #case-categorie .footer-category-card > a p,
#page #case-categorie .footer-category-card > a p * {
    font-weight: 400 !important;
}

#page #case-categorie .footer-category-card > a p:empty {
    display: none !important;
}

@media (hover: hover) {
    #page #case-categorie .footer-category-card > a {
        opacity: 0;
        transform: translateY(8px);
    }

    #page #case-categorie .category-card:hover .footer-category-card > a {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (hover: none) {
    #page #case-categorie .footer-category-card > a {
        display: none;
    }
}

#page #case-categorie .footer-category-card p.text-center,
#page #case-categorie .footer-category-card > p:empty {
    display: none !important;         /* anciens espaces vides */
}

#page #case-categorie .category-card .btn-category-card {
    padding-top: 10px;
    font-size: 1rem;
}

#page #case-categorie .category-card .btn-category-card a {
    color: var(--bleu) !important;
    font-weight: 500 !important;
    text-decoration: none;
}

#page #case-categorie .category-card .btn-category-card .icon-plus2 {
    display: none;                    /* « + » retiré */
}

/* Survol : la carte se soulève légèrement, la photo zoome, le titre passe en bleu */
#page #case-categorie .category-card:hover {
    transform: translateY(-4px);
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(15, 30, 51, 0.12);
}

#page #case-categorie .category-card:hover .imgWrap img {
    opacity: 1;
    transform: scale(1.04);
}

#page #case-categorie .category-card:hover .body-category-card {
    opacity: 1;
}

#page #case-categorie .category-card:hover .body-category-card h3 {
    color: var(--bleu) !important;
}

/* Mobile : photo un peu moins haute */
@media (max-width: 767.98px) {
    #page .nos-produits {
        padding-top: 40px;
    }

    #page .nos-produits > p:first-child {
        font-size: 1.5rem !important;
    }

    #page #case-categorie {
        padding: 24px 16px 48px !important;
    }

    #page #case-categorie .category-card .imgWrap,
    #page #case-categorie .footer-category-card > a {
        aspect-ratio: 16 / 9;
    }
}

@media (prefers-reduced-motion: reduce) {
    #page #case-categorie .category-card,
    #page #case-categorie .category-card .imgWrap img {
        transition: none;
    }

    #page #case-categorie .category-card:hover,
    #page #case-categorie .category-card:hover .imgWrap img {
        transform: none;
    }
}


/* ---------------------------------------------------------------------
   PRÉSENTATION DE LA SOCIÉTÉ (index.tpl)
   Deux blocs texte + photo, les pictogrammes, puis la vidéo.
   Les anciens styles sont en partie écrits dans index.tpl : « #page »
   et « !important » rendent ces règles prioritaires.
   --------------------------------------------------------------------- */

/* Forme en V conservée, de la couleur du fond de « Nos produits » au-dessus,
   pour une transition sans démarcation */
#page .custom-shape-divider-top-1666009086 .shape-fill {
    fill: #f6f8fb;
}

/* Blocs texte + photo : hauteur plus compacte, texte centré verticalement */
#page #presentation-intro {
    padding: 72px 0 !important;
}

/* Premier bloc : la forme en V reste collée en haut */
#page #presentation-intro.background1 {
    padding-top: 0 !important;
}

#page #presentation-intro .row {
    align-items: center;
    min-height: 380px;
}

#page #presentation-intro .col-sm {
    text-shadow: none !important;     /* ancien halo blanc flou */
    margin-top: 0 !important;
}

/* Sauts de ligne vides qui créaient de grands espaces */
#page #presentation-intro .titre-intro br,
#page #presentation-intro .titre-intro-col p br,
#page #presentation-intro .col-sm > p:first-child br {
    display: none;
}

/* Titres : même style que « Nos produits », alignés à gauche */
#page #presentation-intro .titre-intro,
#page #presentation-intro .col-sm > p:first-child {
    font-family: Poppins, sans-serif;
    font-size: 1.75rem !important;
    font-weight: 600 !important;
    line-height: 1.25;
    color: #0f1e33;
    text-align: left !important;
    margin: 0 0 24px;
}

#page #presentation-intro .titre-intro::after,
#page #presentation-intro .col-sm > p:first-child::after {
    content: "";
    display: block;
    width: 48px;
    height: 2px;
    margin: 14px 0 0;
    background: linear-gradient(90deg, #19b5fe 0%, #9870fc 100%);
}

/* Textes : taille de lecture normale, sans gras, alignés à gauche.
   C'est le bloc de texte qui est centré dans la zone blanche. */
#page #presentation-intro .titre-intro-col p,
#page #presentation-intro .col-sm p {
    font-size: 1rem !important;
    font-weight: 400 !important;
    line-height: 1.65;
    color: #46566b;
    text-align: left !important;
    margin-bottom: 14px;
}

/* Photos de fond : comportement d'origine conservé (photo fixe pendant le
   défilement, plein cadre). Le texte occupe la moitié blanche de la photo et
   y est centré (ordinateur et tablette). */
@media (min-width: 768px) {
    #page #presentation-intro .container {
        margin-left: auto !important;
        margin-right: auto !important;
    }

    #page #presentation-intro .row > .col-sm {
        left: 0 !important;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    #page #presentation-intro .row > .col-sm > * {
        width: 100%;
        max-width: 580px;
    }
}

/* Mobile : les deux colonnes s'empilent et le texte passerait par-dessus
   la photo. Fond blanc uni et texte sur toute la largeur. */
@media (max-width: 767.98px) {
    #page #presentation-intro {
        background-image: none !important;
        background-color: #ffffff;
    }

    #page #presentation-intro.background1 .row > .col-sm:last-child,
    #page #presentation-intro:not(.background1) .row > .col-sm:first-child {
        display: none;                /* colonne vide (place de la photo) */
    }

    #page #presentation-intro .row > .col-sm {
        left: 0 !important;
    }
}

/* Même taille pour tout le texte, même s'il a été mis en forme dans l'administration */
#page #presentation-intro .titre-intro-col p *,
#page #presentation-intro .col-sm p *,
#page #presentation-intro .titre-intro-col span {
    font-size: inherit !important;
    font-family: inherit !important;
    line-height: inherit !important;
}

#page #presentation-intro a {
    color: var(--bleu);
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Pictogrammes : bande épurée, icône dans un cercle au liseré dégradé,
   séparateurs verticaux fins comme dans le menu */
#page #modalite {
    background: #f6f8fb;
    margin: 0;
    padding: 56px 24px;
}

#page #modalite > br,
#page #modalite [id^="anim_picto"] br {
    display: none;
}

#page #modalite .row {
    max-width: 1100px;
    margin: 0 auto;
    justify-content: center !important;
    flex-wrap: nowrap;
}

#page #modalite [id^="anim_picto"] {
    position: relative;
    flex: 1 1 0;
    max-width: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 8px 24px;
    text-align: center;
}

/* Trait vertical gris entre deux pictogrammes */
#page #modalite [id^="anim_picto"] + [id^="anim_picto"]::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 1px;
    height: 64px;
    margin-top: -32px;
    background: #c8ced6;
}

#page #modalite [id^="anim_picto"] img {
    box-sizing: content-box;
    width: 36px;
    height: 36px;
    padding: 18px;
    object-fit: contain;
    border-radius: 50%;
    border: 2px solid transparent;
    background:
        linear-gradient(#ffffff, #ffffff) padding-box,
        linear-gradient(135deg, #19b5fe 0%, #9870fc 100%) border-box;
}

#page #modalite [id^="anim_picto"] h5 {
    margin: 0;
    font-family: Poppins, sans-serif;
    font-size: 1rem !important;
    font-weight: 500;
    line-height: 1.4;
    color: #0f1e33;
}

/* Tablette et mobile */
@media (max-width: 767.98px) {
    #page #presentation-intro {
        padding: 48px 0 !important;
    }

    #page #presentation-intro .row {
        min-height: 0;
    }

    #page #presentation-intro .titre-intro,
    #page #presentation-intro .col-sm > p:first-child {
        font-size: 1.5rem !important;
    }

    #page #modalite .row {
        flex-direction: column;
        align-items: stretch;
    }

    #page #modalite [id^="anim_picto"] {
        flex-direction: row;
        justify-content: flex-start;
        text-align: left;
        padding: 16px 8px;
    }

    /* Sur mobile, les traits deviennent horizontaux */
    #page #modalite [id^="anim_picto"] + [id^="anim_picto"]::before {
        top: 0;
        left: 8px;
        right: 8px;
        width: auto;
        height: 1px;
        margin-top: 0;
    }

    #page #modalite [id^="anim_picto"] img {
        width: 28px;
        height: 28px;
        padding: 12px;
    }

}


/* ---------------------------------------------------------------------
   ACTUALITÉS (index.tpl)
   Cartes blanches de la même famille que celles des produits : date en
   pastille, titre, sur-titre, texte, puis le bouton en bas de la carte.
   Les anciens styles sont en partie écrits dans index.tpl : « #page »
   et « !important » rendent ces règles prioritaires.
   --------------------------------------------------------------------- */

#page #news {
    background: #ffffff !important;   /* ancien dégradé bleu-violet transparent */
    padding: 72px 24px !important;
}

#page #news > .row {
    max-width: 1320px;
    margin-left: auto;
    margin-right: auto;
}

/* Titre de la section : même style que « Nos produits » */
#page #news .heading h2 {
    font-family: Poppins, sans-serif;
    font-size: 1.75rem;
    font-weight: 600;
    line-height: 1.25;
    text-transform: none;
    color: #0f1e33;
    margin: 0 0 40px;
}

#page #news .heading h2::after {
    content: "";
    display: block;
    width: 48px;
    height: 2px;
    margin: 14px auto 0;
    background: linear-gradient(90deg, #19b5fe 0%, #9870fc 100%);
}

/* Colonnes : cartes de même hauteur sur une ligne */
#page #news .row > [class*="col-md-3"] {
    display: flex;
    margin-bottom: 24px !important;
}

/* Carte */
#page #news .news-entry {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin: 0;
    padding: 24px;
    border-radius: 14px;
    border: 1px solid #e3e8ef;
    background: #ffffff;
    box-shadow: 0 4px 14px rgba(15, 30, 51, 0.06);
}

#page #news .news-entry > .container-fluid {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 0;
}

#page #news .news-entry > .container-fluid > .row {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    flex: 1;
    margin: 0;
    padding-bottom: 0 !important;
}

/* La première colonne s'efface pour pouvoir ranger son contenu :
   en-tête (date, titre, sur-titre) en haut, texte, puis bouton en bas */
#page #news .news-entry .row > .col-md-12 {
    display: contents !important;
}

#page #news .news-entry .desc {
    order: 1;
    margin: 0 0 16px;
    padding: 0;
    border: 0;
}

#page #news .news-entry .row > .col {
    order: 2;
    flex: 0 0 auto;
    padding: 0;
}

#page #news .news-entry .row > .col-md-12 > div:not(.desc) {
    order: 3;
    margin-top: auto !important;      /* bouton en bas de la carte */
    padding: 20px 0 0 !important;
    text-align: left !important;
}

/* Image de couverture (première image du texte, placée en haut par resah.js) */
/* Même format pour toutes les images : cadre 4/3, image entière (non recadrée)
   centrée dedans. Fond blanc, comme celui des photos de produits. */
#page #news .news-entry .actu-couverture {
    aspect-ratio: 4 / 3;
    overflow: hidden;                 /* le cadre garde sa taille, quelle que soit l'image */
    margin: -24px -24px 20px;
    padding: 16px;
    background: #ffffff;
    border-bottom: 1px solid #e3e8ef;
}

#page #news .news-entry .actu-couverture img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

/* En-tête : le titre, puis le sur-titre */
#page #news .news-entry .desc .meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    max-width: 100%;
    padding: 0;
    line-height: 1.4;
    text-transform: none;
}

#page #news .news-entry .desc .meta br {
    display: none;
}

#page #news .news-entry .desc .meta .date-2 {
    display: none !important;         /* date retirée des cartes */
    order: 1;
    flex: none;
    padding: 3px 9px;
    border-radius: 6px;
    background: var(--bleu-clair);
    -webkit-background-clip: border-box;
    background-clip: border-box;
    color: var(--bleu);
    -webkit-text-fill-color: var(--bleu);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

#page #news .news-entry .organizer {
    order: 2;
    flex: 0 0 100%;
    min-width: 0;
    margin-top: 2px;
}

#page #news .news-entry .organizer,
#page #news .news-entry .organizer p {
    margin: 0;
    font-size: 0.75rem !important;
    line-height: 1.4;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #5b6b80;
}

#page #news .news-entry .organizer p {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

#page #news .news-entry h2 {
    order: 1;
    flex: 0 0 100%;
    margin: 0;
    font-family: Poppins, sans-serif;
    font-size: 1.125rem !important;
    font-weight: 600;
    line-height: 1.35;
    text-transform: none;
    color: #0f1e33;
}

/* Texte saisi dans l'administration : taille et couleur harmonisées */
#page #news .news-entry .news-text {
    padding: 0 !important;
    font-size: 0.9375rem !important;
    line-height: 1.6;
    color: #46566b;
}

/* L'éditeur de l'administration ajoute parfois sa propre police, taille,
   épaisseur ou couleur : tout est ramené au même style dans chaque carte */
#page #news .news-entry .news-text {
    font-family: Poppins, sans-serif !important;
    font-weight: 400 !important;
}

#page #news .news-entry .news-text * {
    font-family: inherit !important;
    font-size: inherit !important;
    line-height: inherit !important;
    letter-spacing: normal !important;
}

#page #news .news-entry .news-text *:not(strong):not(b) {
    font-weight: inherit !important;
}

#page #news .news-entry .news-text strong,
#page #news .news-entry .news-text b {
    font-weight: 600 !important;
}

#page #news .news-entry .news-text *:not(a) {
    color: inherit !important;
    background-color: transparent !important;
}

#page #news .news-entry .news-text p {
    margin: 0 0 10px;
}

#page #news .news-entry .news-text ul {
    padding-left: 1.2em;
    margin: 0 0 10px;
}

#page #news .news-entry .news-text img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

#page #news .news-entry .news-text a {
    color: var(--bleu);
}

/* Texte replié (environ 4 lignes, fondu en bas) tant qu'on n'a pas cliqué sur « Lire la suite » */
#page #news .news-entry .actu-texte-replie:not(.actu-texte-ouvert):not(.actu-texte-court) {
    max-height: 7.2em;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 55%, transparent 100%);
}

#page #news .news-entry .actu-lire-suite {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    padding: 6px 0;
    border: 0;
    background: none;
    color: #7a8799;                   /* gris discret */
    font-family: Poppins, sans-serif;
    font-size: 0.875rem;
    font-weight: 400;
    cursor: pointer;
}

#page #news .news-entry .actu-lire-suite[hidden] {
    display: none;
}

#page #news .news-entry .actu-lire-suite::after {
    content: "";
    width: 6px;
    height: 6px;
    margin-top: -3px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.2s ease;
}

#page #news .news-entry .actu-lire-suite[aria-expanded="true"]::after {
    margin-top: 3px;
    transform: rotate(-135deg);
}

#page #news .news-entry .actu-lire-suite:hover {
    color: #2c3a4d;
}

/* Bouton : discret, contour bleu fin sur fond blanc */
#page #news .news-entry .btn-colored {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 20px;
    border: 1px solid var(--bleu);
    border-radius: 30px !important;
    background: #ffffff;
    color: var(--bleu);
    font-size: 0.9375rem !important;
    font-weight: 500;
    letter-spacing: normal;
    text-transform: none;
    box-shadow: none;
    transition: background-color 0.2s, color 0.2s;
}

#page #news .news-entry .btn-colored:hover,
#page #news .news-entry .btn-colored:focus {
    transform: none;
    background: var(--bleu-clair);
    color: var(--bleu-fonce);
}

@media (max-width: 767.98px) {
    #page #news {
        padding: 48px 16px !important;
    }

    #page #news .heading h2 {
        font-size: 1.5rem;
        margin-bottom: 28px;
    }

    #page #news .news-entry {
        padding: 20px;
    }

    #page #news .news-entry .actu-couverture {
        margin: -20px -20px 18px;
    }
}


/* ---------------------------------------------------------------------
   VIDÉO DE PRÉSENTATION – en bas de la page Société (societe.tpl)
   --------------------------------------------------------------------- */

.video-societe {
    clear: both;
    background: #ffffff;              /* même blanc que le reste de la page Société */
    padding: 0 24px 72px;             /* le texte au-dessus a déjà sa marge du bas */
}

.video-societe-cadre {
    max-width: 960px;
    margin: 0 auto;
}

.video-societe-titre {
    font-family: Poppins, sans-serif;
    font-size: 1.75rem;
    font-weight: 600;
    line-height: 1.25;
    color: #0f1e33;
    margin: 0 0 24px;
}

.video-societe-titre::after {
    content: "";
    display: block;
    width: 48px;
    height: 2px;
    margin-top: 14px;
    background: linear-gradient(90deg, #19b5fe 0%, #9870fc 100%);
}

.video-societe-lecteur {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 14px;
    background: #0f1e33;
    box-shadow: 0 12px 28px rgba(15, 30, 51, 0.12);
}

@media (max-width: 767.98px) {
    .video-societe {
        padding: 0 16px 48px;
    }

    .video-societe-titre {
        font-size: 1.5rem;
    }
}


/* ---------------------------------------------------------------------
   RECHERCHE DANS LE CATALOGUE
   Barre de recherche du bandeau (include/nav.tpl), suggestions
   instantanées (web/js/recherche.js) et page de résultats (recherche.tpl)
   --------------------------------------------------------------------- */

/* Bandeau resserré vers le centre : logo et menu à gauche, boutons à droite,
   dans une largeur limitée à 1240 px (réglable ici) */
.nav .top-menu > .container {
    max-width: 1240px;
}

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

.nav .menu-1 > ul {
    flex-wrap: nowrap;
}

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

/* La loupe pousse les boutons de droite contre le bord droit */
.nav .menu-1 > ul > li.nav-recherche {
    margin-left: auto;
    align-items: center;
    padding: 0 10px 0 0;
}

.nav .menu-1 > ul > li.nav-recherche + li.nav-cta {
    margin-left: 0;
}

/* 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 !important;
    }
}

/* 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: #2c3a4d;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

.recherche-ouvrir:hover {
    background: #f3f5f8;
    color: var(--bleu);
}

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

.recherche-ouvrir: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;
}

/* Panneau de recherche : s'ouvre sous le bandeau, dans le même blanc,
   avec le champ puis les suggestions directement dessous */
.nav {
    flex-wrap: wrap;                  /* le panneau passe sous la ligne du bandeau */
}

.recherche-panneau {
    flex: 0 0 100%;
    width: 100%;
    box-sizing: border-box;
    border-top: 1px solid #e3e8ef;
    background: #ffffff;
    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: #7a8799;
    pointer-events: none;
}

.recherche-champ-bandeau {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 52px;
    padding: 0 56px 0 54px;
    border: 1px solid #e3e8ef;
    border-radius: 30px;
    background: #f3f5f8;
    color: #0f1e33;
    font-family: Poppins, sans-serif;
    font-size: 1.0625rem;
    transition: background-color 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.recherche-champ-bandeau::placeholder {
    color: #7a8799;
}

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

.recherche-champ-bandeau:focus {
    outline: none;
    background: #ffffff;
    border-color: var(--bleu);
    box-shadow: 0 0 0 3px rgba(21, 144, 212, 0.18);
}

.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: #5b6b80;
    cursor: pointer;
}

.recherche-fermer:hover {
    background: #e3e8ef;
    color: #0f1e33;
}

/* 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 #e3e8ef;
    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 #e3e8ef;
    border-radius: 30px;
    background: #ffffff;
    color: #2c3a4d;
    font-size: 0.875rem;
    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(15, 30, 51, 0.28);
}

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

    .recherche-champ-bandeau {
        font-size: 1rem;              /* 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 #e3e8ef;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 16px 40px rgba(15, 30, 51, 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-left: 10px;
}

.recherche-panneau .recherche-suggestion-tout {
    justify-content: flex-start;
    margin-top: 4px;
    border-top: 1px solid #e3e8ef;
    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 #e3e8ef;
    border-radius: 30px;
    background: #ffffff;
    color: #2c3a4d;
    font-size: 0.875rem;
    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(15, 30, 51, 0.28);
}

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

    .recherche-champ-bandeau {
        font-size: 1rem;              /* 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 #e3e8ef;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 16px 40px rgba(15, 30, 51, 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: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #7a8799;
}

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

.recherche-suggestion:hover,
.recherche-suggestion.est-active {
    background: #f3f7fb;
}

.recherche-suggestion-image {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 48px;
    height: 48px;
    overflow: hidden;
    border: 1px solid #e3e8ef;
    border-radius: 8px;
    background: #ffffff;
}

.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: 0.9375rem;
    font-weight: 400;
    line-height: 1.35;
    color: #0f1e33;
}

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

.recherche-suggestion-chemin {
    overflow: hidden;
    font-size: 0.75rem;
    line-height: 1.4;
    color: #7a8799;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.recherche-suggestion-tout {
    justify-content: center;
    margin-top: 6px;
    padding: 12px 10px;
    border-top: 1px solid #e3e8ef;
    border-radius: 0 0 8px 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--bleu);
}

.recherche-suggestions-vide {
    padding: 14px 10px 6px;
    font-size: 0.9375rem;
    color: #5b6b80;
}

/* Page de résultats */
#page-recherche {
    max-width: 1100px;
    margin: 0 auto;
    padding: 56px 24px 72px;
    font-family: Poppins, sans-serif;
}

#page-recherche h1 {
    margin: 0 0 20px;
    font-size: 1.75rem;
    font-weight: 600;
    line-height: 1.25;
    color: #0f1e33;
}

.recherche-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.recherche-formulaire {
    display: flex;
    gap: 10px;
    max-width: 640px;
    margin: 0;
}

.recherche-champ {
    -webkit-appearance: none;
    appearance: none;
    flex: 1;
    min-width: 0;
    height: 48px;
    padding: 0 18px;
    border: 1px solid #c8ced6;
    border-radius: 30px;
    background: #ffffff;
    color: #0f1e33;
    font-family: inherit;
    font-size: 1rem;
}

.recherche-champ:focus {
    outline: none;
    border-color: var(--bleu);
    box-shadow: 0 0 0 3px rgba(21, 144, 212, 0.18);
}

.recherche-bouton {
    flex: none;
    height: 48px;
    padding: 0 24px;
    border: 0;
    border-radius: 30px;
    background: linear-gradient(45deg, #19b5fe 0%, #9870fc 100%);
    color: #ffffff;
    font-family: inherit;
    font-size: 1rem;
    cursor: pointer;
}

.recherche-bouton:hover {
    filter: brightness(1.08);
}

.recherche-compte {
    margin: 14px 0 0;
    font-size: 0.9375rem;
    color: #5b6b80;
}

.recherche-section h2,
.recherche-contact h2 {
    margin: 40px 0 16px;
    font-size: 1.125rem;
    font-weight: 600;
    color: #0f1e33;
}

.recherche-gammes,
.recherche-produits {
    list-style: none;
    margin: 0;
    padding: 0;
}

.recherche-gammes {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.recherche-gammes a {
    display: flex;
    flex-direction: column;
    padding: 12px 16px;
    border: 1px solid #e3e8ef;
    border-radius: 12px;
    background: #ffffff;
    text-decoration: none;
    transition: border-color 0.2s;
}

.recherche-gammes a:hover {
    border-color: var(--bleu);
}

.recherche-gamme-titre {
    font-weight: 500;
    color: #0f1e33;
}

.recherche-gamme-chemin,
.recherche-produit-chemin {
    font-size: 0.75rem;
    color: #7a8799;
}

.recherche-produits {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 16px;
}

.recherche-produits a {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    border: 1px solid #e3e8ef;
    border-radius: 14px;
    background: #ffffff;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.recherche-produits a:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(15, 30, 51, 0.12);
}

.recherche-produit-image {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    padding: 12px;
    border-bottom: 1px solid #e3e8ef;
    background: #ffffff;
}

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

.recherche-produit-texte {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 16px;
}

.recherche-produit-titre {
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.35;
    color: #0f1e33;
}

.recherche-vide {
    margin: 32px 0 0;
    color: #46566b;
}

.recherche-contact {
    margin-top: 56px;
    padding: 28px;
    border-radius: 14px;
    background: #f6f8fb;
}

.recherche-contact h2 {
    margin-top: 0;
    margin-bottom: 8px;
}

.recherche-contact p {
    margin: 0;
    color: #46566b;
}

.recherche-contact .recherche-contact-liens {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 24px;
    margin-top: 16px;
}

.recherche-contact-liens a {
    color: var(--bleu);
    font-weight: 500;
}

.recherche-contact-liens .recherche-contact-devis {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 20px;
    border: 1px solid var(--bleu);
    border-radius: 30px;
    text-decoration: none;
}

.recherche-contact-liens .recherche-contact-devis:hover {
    background: var(--bleu-clair);
}

@media (max-width: 767.98px) {
    #page-recherche {
        padding: 36px 16px 48px;
    }

    #page-recherche h1 {
        font-size: 1.5rem;
    }

    .recherche-formulaire {
        flex-direction: column;
    }
}
