/**
 * NHP Spareparts - Frontend CSS
 */

/* =========================================
   WIDGET DE RECHERCHE (Hook)
   ========================================= */

.nhp-spareparts-widget {
    background: #efefef;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    
}

/* ---------------------------------------------------------------
   BARRE COMPACTE — hook displaySearchFilter
   ---------------------------------------------------------------
   Le widget ne s'affiche plus comme un bloc qui ouvre une page, mais
   comme UN CONTRÔLE parmi les filtres du thème : une ligne, pas de
   titre, pas de sous-titre, libellés en lecteur d'écran.

   Fond BLANC et non #f6f6f6 : la zone de filtres d'un thème est déjà,
   neuf fois sur dix, un panneau gris clair. Un second gris par-dessus
   produit deux plans indistincts ; le blanc détache la barre sans
   rien ajouter de décoratif.

   Ni texture ni image de fond : ces quatre contrôles portent du texte
   de 14 px, et toute trame derrière eux se paie en lisibilité. La
   profondeur vient d'une bordure de 1 px et d'une ombre de 1 px —
   assez pour poser le plan, trop peu pour se voir.

   Deux variantes sont prévues plus bas pour les cas où le fond ne se
   prête pas au blanc.
   --------------------------------------------------------------- */

/* LE DÉCOR ET LE WIDGET SONT SUR LE MÊME ÉLÉMENT.

   Le template pose <div class="adwcore-container"> autour, et empile
   nhp-widget-shell sur le widget lui-même :

     <div class="adwcore-container">
       <div class="nhp-widget-shell nhp-spareparts-widget nhp-widget-compact">

   adwcore-container reste au THÈME : le module n'écrit rien dessus, ce
   qui toucherait toutes ses autres apparitions dans la page.

   LA SPÉCIFICITÉ EST LE POINT DÉLICAT, et elle ne pardonne pas ici.
   Les trois classes vivant sur le même élément, elles se disputent les
   mêmes propriétés :

     .nhp-spareparts-widget                       0-1-0   fond gris, 30px
     .nhp-widget-shell                            0-1-0   fond blanc, 12px
     .nhp-spareparts-widget.nhp-widget-compact    0-2-0

   Une règle à une seule classe pour le décor perdrait donc contre toute
   règle à deux classes visant le compact — la barre se retrouverait sans
   fond ni gouttière, sans que rien ne le signale. D'où les deux classes
   ci-dessous : 0-2-0 bat proprement la base à 0-1-0, et aucune remise à
   zéro n'est nécessaire. */
.nhp-spareparts-widget.nhp-widget-shell {
    background: #fff;
    border: 1px solid #e3e3e3;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 16px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
    transition: border-color .2s ease, box-shadow .2s ease;
}

/* La barre se signale quand on s'en sert, et seulement là. Trois classes
   (0-3-0) plutôt que deux : à égalité, seul l'ordre du fichier
   départagerait, et un déplacement de bloc suffirait à perdre le focus. */
.nhp-spareparts-widget.nhp-widget-shell:focus-within {
    border-color: var(--adw-primary, #91bd31);
    box-shadow: 0 0 0 3px rgba(145, 189, 49, .15);
}

.nhp-spareparts-widget.nhp-widget-compact {
    /* Reprises de tom-select-nhp.css : redéfinies ICI, sur un ancêtre
       de .nhp-search-form, elles descendent aussi bien sur le select
       natif que sur le contrôle habillé par Tom Select. Les deux
       gardent donc la même hauteur, au pixel. */
    --nhp-control-height: 42px;
    --nhp-border-width: 1px;
}

/* Le conteneur neutre qui remplace .container du thème. */
.nhp-widget-bare {
    width: 100%;
}

/* Libellé réservé aux lecteurs d'écran.
   Défini par le MODULE : s'appuyer sur le .sr-only du thème rendrait
   l'accessibilité du widget dépendante d'une classe que rien ne
   garantit hors du thème Classic. */
.nhp-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.nhp-widget-compact .nhp-form-row {
    gap: .5rem;
    align-items: center;
}

/* ---------------------------------------------------------------
   Titre DANS la barre
   ---------------------------------------------------------------
   Il occupe une cellule de la ligne, comme un champ. Deux
   conséquences à assumer :

   1. Les trois selects perdent de la place. À quatre cellules égales
      ils prenaient chacun 1/4 de la largeur ; à cinq, 1/5. Le titre
      est donc borné — flex-grow à 0 et une largeur de base de
      200 px — pour qu'il prenne ce qu'il lui faut et rien de plus,
      au lieu de grandir à égalité avec les champs.

   2. Dès que la ligne se replie, il doit passer PLEINE LARGEUR. Sans
      cela il se retrouve en demi-cellule à côté d'un select, ce qui
      donne un titre coupé sur deux lignes face à un champ vide : la
      règle est dans le palier 991 px, plus bas.
   --------------------------------------------------------------- */
.nhp-widget-compact .nhp-form-title {
    flex: 0 1 200px;
    min-width: 0;
}

.nhp-widget-compact .title_form p {
    margin: 0;
}

.nhp-widget-compact .title_form__main {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.25;
    color: #333;
}

.nhp-widget-compact .title_form__sub {
    font-size: 12px;
    line-height: 1.3;
    color: #767676;   /* 4.54:1 sur blanc — le #666 du bloc complet n'y est pas */
    margin-top: 2px;
}

.nhp-widget-compact .nhp-select {
    height: var(--nhp-control-height);
    border-width: var(--nhp-border-width);
}

/* Bouton de la barre — couleur du THÈME.

   --adw-primary est défini par le thème, pas par le module. Le repli
   #4d6b18 n'est donc pas décoratif : sans lui, une page où la feuille du
   thème ne serait pas servie rendrait `background: var(--adw-primary)`
   invalide, et le bouton perdrait tout fond — texte blanc sur blanc.

   CE QUE CE CHANGEMENT COÛTE : le contraste n'est plus garanti par le
   module. Mesuré sur le repli :
     blanc sur #91bd31  2.20:1  échec AA texte (4.5) et composant (3.0)
     blanc sur #4d6b18  6.12:1  conforme
   Le bouton porte du texte blanc ; --adw-primary doit donc être un ton
   assez sombre pour tenir 4.5:1 avec le blanc. Un vert clair de marque
   n'y suffit pas — c'est la règle que pose déjà l'en-tête de
   tom-select-nhp.css, et elle vaut maintenant pour la variable du thème.

   Le survol s'obtient par color-mix plutôt que par une seconde couleur
   codée en dur : la teinte de départ n'est plus connue d'ici. Sur un
   navigateur sans color-mix, la déclaration est ignorée et le bouton
   garde son fond au survol — dégradation acceptable. */
.nhp-widget-compact .nhp-btn-search {
    height: var(--nhp-control-height);
    padding: 0 20px;
    background: var(--adw-primary, #4d6b18);
}

.nhp-widget-compact .nhp-btn-search:hover {
    background: color-mix(in srgb, var(--adw-primary, #4d6b18) 88%, #000);
    box-shadow: 0 4px 12px rgba(0, 0, 0, .18);
}

.nhp-widget-compact .nhp-btn-search:disabled {
    background: #ccc;
}

/* ---------------------------------------------------------------
   Variantes de fond — AUCUNE n'est appliquée par défaut
   ---------------------------------------------------------------
   À poser en classe supplémentaire sur le widget, dans le template :
   class="nhp-widget-shell nhp-spareparts-widget nhp-widget-compact nhp-widget--glass"
   --------------------------------------------------------------- */

/* Verre dépoli — pour une barre posée SUR une image ou un aplat
   coloré. Sur un fond uni clair, elle ne se distingue pas du blanc :
   c'est la variante d'un cas précis, pas une amélioration générale.
   backdrop-filter est ignoré par les navigateurs qui ne le
   connaissent pas ; le fond translucide reste alors lisible, d'où le
   rgba plutôt qu'une couleur pleine. */
.nhp-spareparts-widget.nhp-widget-shell.nhp-widget--glass {
    background: rgba(255, 255, 255, .72);
    -webkit-backdrop-filter: blur(10px) saturate(140%);
    backdrop-filter: blur(10px) saturate(140%);
    border-color: rgba(255, 255, 255, .55);
    box-shadow: 0 4px 16px rgba(16, 24, 40, .10);
}

/* Teinte de marque — identifie le module d'un coup d'œil quand la
   zone de filtres est blanche et que la barre s'y perdrait. Le vert
   ne porte ici aucun texte : il est fond et filet, jamais encre. */
.nhp-spareparts-widget.nhp-widget-shell.nhp-widget--accent {
    background: #f7faf0;
    border-color: #dfe9c6;
    border-left: 3px solid var(--adw-primary, #91bd31);
}

.nhp-widget-header {
    text-align: center;
    margin-bottom: 25px;
}

.nhp-widget-header h3 {
    margin: 0 0 10px;
    font-size: 22px;
    font-weight: 700;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.nhp-widget-header h3 svg {
    color: #91bd31;
}

.nhp-widget-header p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

/* Form Row - Alignement horizontal */
.nhp-search-form {
    width: 100%;
}

.nhp-form-row {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
}

.nhp-form-group {
    flex: 1;
    min-width: 0;
}

.nhp-form-submit {
    flex: 0 0 auto;
}

/* Labels */
.nhp-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #555;
    margin-bottom: 8px;
    text-align: left;
}

.nhp-label-spacer {
    visibility: hidden;
}

/* Select Wrapper */
.nhp-select-wrapper {
    position: relative;
}

.nhp-select {
    width: 100%;
    height: 48px;
    padding: 0 40px 0 16px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nhp-select:hover {
    border-color: #91bd31;
}

.nhp-select:focus {
    outline: none;
    border-color: #91bd31;
    box-shadow: 0 0 0 3px rgba(145, 189, 49, 0.15);
}

.nhp-select:disabled {
    background: #f0f0f0;
    color: #999;
    cursor: not-allowed;
    border-color: #e0e0e0;
}

.nhp-select:disabled:hover {
    border-color: #e0e0e0;
}

.nhp-select-arrow {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
    pointer-events: none;
    transition: color 0.2s;
}

.nhp-select:focus + .nhp-select-arrow {
    color: #91bd31;
}

.nhp-select:disabled + .nhp-select-arrow {
    color: #ccc;
}

/* Bouton Rechercher */
.nhp-btn-search {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 48px;
    padding: 0 28px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background: #1d2123;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.nhp-btn-search:hover {
    background: #7aa329;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(145, 189, 49, 0.3);
}

.nhp-btn-search:active {
    transform: translateY(0);
}

.nhp-btn-search:disabled {
    background: #727576;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.nhp-btn-search svg {
    flex-shrink: 0;
}

/* Spinner animation */
.nhp-btn-search .nhp-spinner {
    animation: nhp-spin 1s linear infinite;
}

@keyframes nhp-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Statistiques */
.nhp-widget-stats {
    display: flex;
    justify-content: center;
    gap: 50px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.nhp-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.nhp-stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #91bd31;
    line-height: 1;
}

.nhp-stat-label {
    font-size: 12px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Responsive Widget */
@media (max-width: 991px) {
    .nhp-form-row {
        flex-wrap: wrap;
    }
    
    .nhp-form-group {
        flex: 1 1 calc(50% - 0.5rem);
        min-width: calc(50% - 0.5rem);
    }
    
    .nhp-form-submit {
        flex: 1 1 100%;
    }
    
    .nhp-btn-search {
        width: 100%;
    }
    
    .nhp-label-spacer {
        display: none;
    }
}

@media (max-width: 575px) {
    .nhp-spareparts-widget {
        padding: 20px;
    }
    
    .nhp-form-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .nhp-form-group {
        flex: 1 1 100%;
        min-width: 100%;
    }
    
    .nhp-widget-stats {
        gap: 25px;
    }
    
    .nhp-stat-value {
        font-size: 20px;
    }
}

/* ---------------------------------------------------------------
   Responsive de la barre compacte
   ---------------------------------------------------------------
   Les règles ci-dessus visent .nhp-form-row sans distinction de
   variante : sans ces surcharges, la barre hériterait de l'espacement
   du bloc complet — 15 px de gouttière et un bouton pleine largeur dès
   576 px, là où la barre tient encore sur deux colonnes.

   Trois paliers, et la raison de chacun :
     ≥ 992 px  une ligne — c'est la forme voulue
     576-991   deux colonnes : trois selects à la file deviennent
               illisibles sous ~900 px, chacun tombant sous 180 px
     < 576     empilé — sur un téléphone, une cible de 42 px de haut
               pleine largeur vaut mieux que deux demi-largeurs
   --------------------------------------------------------------- */

@media (max-width: 991px) {
    .nhp-widget-compact .nhp-form-row {
        flex-wrap: wrap;
        gap: .5rem;
    }

    /* Pleine largeur dès le repli : en demi-cellule, le titre se
       casserait sur deux ou trois lignes à côté d'un select vide. */
    .nhp-widget-compact .nhp-form-title {
        flex: 1 1 100%;
        min-width: 100%;
        margin-bottom: .15rem;
    }

    .nhp-widget-compact .nhp-form-group {
        flex: 1 1 calc(50% - .25rem);
        min-width: calc(50% - .25rem);
    }

    /* Le bouton prend la quatrième case, pas une ligne à lui seul. */
    .nhp-widget-compact .nhp-form-submit {
        flex: 1 1 calc(50% - .25rem);
        min-width: calc(50% - .25rem);
    }

    .nhp-widget-compact .nhp-btn-search {
        width: 100%;
    }
}

@media (max-width: 575px) {
    /* La gouttière se resserre. Deux classes : la règle de base en a deux
       elle aussi, et une seule perdrait. */
    .nhp-spareparts-widget.nhp-widget-shell {
        padding: 10px;
    }

    .nhp-widget-compact .nhp-form-row {
        flex-direction: column;
        gap: .5rem;
    }

    .nhp-widget-compact .nhp-form-group,
    .nhp-widget-compact .nhp-form-submit {
        flex: 1 1 100%;
        min-width: 100%;
    }
}

/* Le clavier doit voir ce que la souris voit. Sur un appareil sans
   survol, :hover ne se déclenche jamais — la bordure verte au survol
   n'y existe pas, et le focus reste le seul repère. */
@media (hover: none) {
    .nhp-widget-compact .nhp-select:hover {
        border-color: #e0e0e0;
    }
}

/* Animation coupée quand le visiteur l'a demandé au système. */
@media (prefers-reduced-motion: reduce) {
    .nhp-spareparts-widget.nhp-widget-shell,
    .nhp-widget-compact .nhp-select,
    .nhp-widget-compact .nhp-btn-search {
        transition: none;
    }

    .nhp-widget-compact .nhp-btn-search:hover {
        transform: none;
    }
}

/* =========================================
   PAGE MODÈLE - Design moderne
   ========================================= */

.nhp-model-page {
    padding-bottom: 40px;
}

/* En-tête */
.nhp-model-header {
    background: #f6f6f6;
    border-radius: 3px;
    padding: 25px 30px;
    margin-bottom: 30px;
}

/* Header avec image */
.nhp-model-header.has-image {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.nhp-model-image {
    flex-shrink: 0;
    width: 200px;
    height: 200px;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.nhp-model-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.nhp-model-info {
    flex: 1;
    min-width: 0;
}

.nhp-model-description {
    margin-top: 15px;
    font-size: 14px;
    line-height: 1.6;
    color: #666;
    max-height: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nhp-model-header h1 {
    margin: 0 0 12px;
    font-size: 20px;
    font-weight: 400;
    color: #666;
    line-height: 1.3;
}

.nhp-model-header h1 strong {
    font-weight: 700;
    color: #333;
    display: block;
    font-size: 26px;
    margin-top: 4px;
}

.nhp-model-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e5e5e5;
}

.nhp-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #888;
}

.nhp-meta-item svg {
    color: #aaa;
    flex-shrink: 0;
}

.nhp-meta-highlight {
    color: #91bd31;
    font-weight: 600;
}

.nhp-meta-highlight svg {
    color: #91bd31;
}

/* Responsive header avec image */
@media (max-width: 767px) {
    .nhp-model-header.has-image {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .nhp-model-image {
        width: 150px;
        height: 150px;
    }
    
    .nhp-model-meta {
        justify-content: center;
    }
}

/* Section header */
.nhp-section-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.nhp-section-header h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.nhp-section-header h2 svg {
    color: #91bd31;
}

.nhp-section-header .nhp-count {
    font-weight: 400;
    color: #888;
    font-size: 14px;
}

/* Header spécifique pour section produits avec switch */
.nhp-products-section .nhp-section-header {
    flex-direction: column;
    align-items: stretch;
}

.nhp-reset-filter {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #666;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 6px;
    background: #f5f5f5;
    transition: all 0.2s;
}

.nhp-reset-filter:hover {
    background: #91bd31;
    color: #fff;
    text-decoration: none;
}

/* =========================================
   CATÉGORIES EN BLOCS
   ========================================= */

.nhp-categories-section {
    margin-bottom: 40px;
}

.nhp-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.nhp-category-block {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 3px;
    overflow: hidden;
    transition: all 0.2s;
}

.nhp-category-block:hover {
    border-color: #91bd31;
    box-shadow: 0 4px 15px rgba(145, 189, 49, 0.1);
}

.nhp-category-block.active {
    border-color: #91bd31;
    border-width: 2px;
}

.nhp-category-block__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 18px;
    background: #91bd31;
    border-bottom: 1px solid #f0f0f0;
}

.nhp-category-block__title {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    transition: color 0.2s;
}

.nhp-category-block__title:hover {
    color: #91bd31;
    text-decoration: none;
}

.nhp-category-block__count {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 24px;
    padding: 0 8px;
    background: #91bd31;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    border-radius: 12px;
}

.nhp-category-block__list {
    list-style: none;
    margin: 0;
    padding: 12px 18px;
    max-height: 300px;
    overflow-y: auto;
}

/* Scrollbar stylisée pour les listes de catégories */
.nhp-category-block__list::-webkit-scrollbar {
    width: 5px;
}

.nhp-category-block__list::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 3px;
}

.nhp-category-block__list::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.nhp-category-block__list::-webkit-scrollbar-thumb:hover {
    background: #91bd31;
}

/* Sous-catégories hiérarchiques */
.nhp-subcat {
    margin-bottom: 4px;
}

.nhp-subcat:last-child {
    margin-bottom: 0;
}

.nhp-subcat > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    font-size: 13px;
    color: #555;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s;
}

.nhp-subcat > a:hover {
    background: #f5f5f5;
    color: #91bd31;
    text-decoration: none;
}

.nhp-subcat > a.active {
    background: #e8f5e9;
    color: #2e7d32;
    font-weight: 600;
}

.nhp-subcat-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

}

.nhp-subcat-parent > .nhp-subcat-name {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    font-size: 14px;
    color: #000000;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s;
}

.nhp-subcat-count {
    color: #999;
    font-size: 12px;
    margin-left: 8px;
    flex-shrink: 0;
}

/* Niveaux d'indentation */
.nhp-subcat-level-0 > a {
    font-weight: 600;
    color: #333;
}

.nhp-subcat-level-1 > a {
    padding-left: 20px;
    font-size: 12px;
}

.nhp-subcat-level-2 > a {
    padding-left: 32px;
    font-size: 12px;
    color: #666;
}

.nhp-subcat-level-3 > a,
.nhp-subcat-level-4 > a {
    padding-left: 44px;
    font-size: 11px;
    color: #777;
}

/* Liste des enfants */
.nhp-subcat-children {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Bordure pour indiquer la hiérarchie */
.nhp-subcat-level-0 > .nhp-subcat-children {
    border-left: 2px solid #e5e5e5;
    margin-left: 8px;
    padding-left: 0;
}

.nhp-subcat-level-1 > .nhp-subcat-children,
.nhp-subcat-level-2 > .nhp-subcat-children {
    border-left: 1px solid #f0f0f0;
    margin-left: 10px;
}

/* =========================================
   GRILLE DES PIÈCES (SPAREPARTS)
   ========================================= */

.nhp-spareparts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.nhp-sparepart-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s;
}

.nhp-sparepart-card:hover {
    border-color: #91bd31;
    box-shadow: 0 4px 15px rgba(145, 189, 49, 0.15);
}

/* Image */
.nhp-sparepart-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    background: #f9f9f9;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.nhp-sparepart-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s;
}

.nhp-sparepart-card:hover .nhp-sparepart-image img {
    transform: scale(1.05);
}

.nhp-sparepart-noimage {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #ddd;
}

/* Infos */
.nhp-sparepart-info {
    padding: 15px;
    flex: 1;
}

.nhp-sparepart-ref {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    color: #91bd31;
    background: #e8f5e9;
    padding: 3px 8px;
    border-radius: 4px;
    margin-bottom: 8px;
}

.nhp-sparepart-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin: 0 0 6px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.nhp-sparepart-type {
    font-size: 12px;
    color: #888;
}

/* Prix */
.nhp-sparepart-prices {
    padding: 0 15px 15px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nhp-price {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nhp-price-label {
    font-size: 11px;
    text-transform: uppercase;
    color: #888;
}

.nhp-price-value {
    font-size: 15px;
    font-weight: 700;
}

.nhp-price-origine .nhp-price-value {
    color: #333;
}

.nhp-price-adaptable .nhp-price-value {
    color: #27ae60;
}

.nhp-price-na {
    justify-content: center;
}

.nhp-price-na span {
    font-size: 12px;
    color: #999;
    font-style: italic;
}

/* Actions */
.nhp-sparepart-actions {
    padding: 0 15px 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nhp-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 15px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.nhp-btn-primary {
    background: #91bd31;
    color: #fff;
}

.nhp-btn-primary:hover {
    background: #7aa329;
    color: #fff;
    text-decoration: none;
}

.nhp-btn-secondary {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #91bd31;
}

.nhp-btn-secondary:hover {
    background: #91bd31;
    color: #fff;
    text-decoration: none;
}

.nhp-btn-outline {
    background: #fff;
    color: #666;
    border: 1px solid #ddd;
}

.nhp-btn-outline:hover {
    background: #f5f5f5;
    border-color: #91bd31;
    color: #91bd31;
}

/* Responsive grille pièces */
@media (max-width: 1199px) {
    .nhp-spareparts-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 991px) {
    .nhp-spareparts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 575px) {
    .nhp-spareparts-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .nhp-sparepart-card {
        flex-direction: row;
        align-items: stretch;
    }
    
    .nhp-sparepart-image {
        width: 120px;
        aspect-ratio: auto;
        flex-shrink: 0;
    }
    
    .nhp-sparepart-info,
    .nhp-sparepart-prices,
    .nhp-sparepart-actions {
        padding: 10px;
    }
    
    .nhp-sparepart-actions {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .nhp-btn {
        flex: 1;
        min-width: 100px;
        padding: 8px 10px;
        font-size: 12px;
    }
}

/* =========================================
   SECTION PRODUITS
   ========================================= */

.nhp-products-section {
    margin-bottom: 30px;
}

.nhp-products-sort {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nhp-products-sort label {
    font-size: 13px;
    color: #666;
    margin: 0;
}

.nhp-products-sort select {
    padding: 8px 32px 8px 12px;
    font-size: 13px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 10px center;
    appearance: none;
    cursor: pointer;
}

.nhp-products-sort select:focus {
    outline: none;
    border-color: #91bd31;
}

/* Grille produits - Compatible avec PrestaShop product.tpl */
.nhp-products-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin-bottom: 30px;
    background: #f6f6f6;
    border-radius: 3px;
    padding: 3rem 0;
}

.nhp-products-grid > .product {
    width: 100%;
    max-width: 100%;
}

.nhp-products-grid .product-miniature {
    margin: 0;
}

/* Aucun résultat */
.nhp-no-results {
    text-align: center;
    padding: 60px 20px;
    background: #f9f9f9;
    border-radius: 12px;
}

.nhp-no-results svg {
    color: #ccc;
    margin-bottom: 20px;
}

.nhp-no-results h3 {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin: 0 0 10px;
}

.nhp-no-results p {
    font-size: 14px;
    color: #666;
    margin: 0 0 20px;
}

/* Bouton retour */
.nhp-back-link {
    text-align: center;
    margin-top: 30px;
}

.nhp-btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s;
}

.nhp-btn-back:hover {
    background: #91bd31;
    border-color: #91bd31;
    color: #fff;
    text-decoration: none;
}

/* =========================================
   PAGINATION
   ========================================= */

.nhp-pagination {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid #e5e5e5;
}

.nhp-pagination-info {
    font-size: 14px;
    color: #666;
}

.nhp-pagination-list {
    display: flex;
    align-items: center;
    gap: 5px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nhp-page-item {
    display: flex;
}

.nhp-page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    background: #fff;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.nhp-page-link:hover {
    background: #f5f5f5;
    border-color: #91bd31;
    color: #91bd31;
    text-decoration: none;
}

.nhp-page-item.active .nhp-page-link {
    background: #91bd31;
    border-color: #91bd31;
    color: #fff;
}

.nhp-page-item.disabled .nhp-page-link {
    background: #f5f5f5;
    border-color: #e5e5e5;
    color: #ccc;
    cursor: not-allowed;
}

.nhp-page-separator .nhp-page-link {
    border: none;
    background: transparent;
    min-width: 30px;
    color: #999;
}

/* =========================================
   RESPONSIVE PAGE MODÈLE
   ========================================= */

@media (max-width: 1199px) {
    .nhp-products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 991px) {
    .nhp-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .nhp-categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nhp-model-header {
        padding: 20px;
    }
    
    .nhp-model-header h1 {
        font-size: 18px;
    }
    
    .nhp-model-header h1 strong {
        font-size: 22px;
    }
    
    .nhp-model-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    .nhp-section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .nhp-categories-grid {
        grid-template-columns: 1fr;
    }
    
    .nhp-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

@media (max-width: 480px) {
    /* .nhp-products-grid {
        grid-template-columns: 1fr;
    } */

    .nhp-products-grid > .product {
        padding: 0;
    }

    #module-nhpspareparts-model #content-wrapper {
        margin-top: 0rem;
    }
}

/* =========================================
   PAGE DE RECHERCHE
   ========================================= */

.nhp-search-page {
    padding-bottom: 40px;
}

.nhp-search-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 50px 40px;
    margin-bottom: 40px;
    color: #fff;
    text-align: center;
}

.nhp-search-hero h1 {
    margin: 0 0 15px;
    font-size: 32px;
    font-weight: 700;
}

.nhp-search-hero .lead {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 30px;
}

.nhp-search-form-container {
    max-width: 900px;
    margin: 0 auto;
}

.nhp-search-form-large {
    background: #fff;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.nhp-form-col {
    flex: 1;
    min-width: 180px;
}

.nhp-form-col label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: #666;
    margin-bottom: 8px;
}

.nhp-form-col-btn {
    flex: 0 0 auto;
}

.nhp-search-stats {
    display: flex;
    justify-content: center;
    gap: 50px;
    margin-top: 30px;
}

.nhp-stat {
    text-align: center;
}

/* Machines grid */
.nhp-machines-section {
    margin-bottom: 40px;
}

.nhp-machines-section h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 24px;
}

.nhp-machines-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.nhp-machine-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 20px;
    background: #fff;
    border: 2px solid #eee;
    border-radius: 10px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s;
}

.nhp-machine-card:hover {
    border-color: #667eea;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.2);
    transform: translateY(-3px);
    text-decoration: none;
    color: #333;
}

.nhp-machine-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.nhp-machine-icon i {
    font-size: 28px;
    color: #fff;
}

.nhp-machine-card h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
}

/* =========================================
   PAGES ENGINE TYPES & MANUFACTURERS
   ========================================= */

.nhp-enginetypes-page,
.nhp-manufacturers-page {
    padding: 20px 0;
}

.nhp-page-header {
    background: #f6f6f6;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    text-align: center;
}

.nhp-page-header h1 {
    font-size: 22px;
    font-weight: 400;
    color: #666;
    margin: 0 0 10px 0;
}

.nhp-page-header h1 strong {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin-top: 5px;
}

.nhp-page-subtitle {
    font-size: 15px;
    color: #888;
    margin: 0 0 20px 0;
}

.nhp-page-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding-top: 20px;
    /* border-top: 1px solid #e5e5e5; */
}

.nhp-page-stats span {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #666;
}

.nhp-page-stats span:last-child {
    color: #91bd31;
}

.nhp-page-stats span i {
    font-size: 20px;
    opacity: 0.7;
}

.nhp-page-stats span strong {
    font-size: 18px;
    color: #333;
}

/* Brands grid */
.nhp-brands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.nhp-brand-card {
    display: block;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s;
    overflow: hidden;
}

.nhp-brand-card:hover {
    border-color: #91bd31;
    box-shadow: 0 4px 15px rgba(145, 189, 49, 0.15);
    text-decoration: none;
}

.nhp-brand-card-inner {
    display: flex;
    align-items: center;
    padding: 20px;
    gap: 15px;
}

.nhp-brand-logo {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
}

.nhp-brand-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.nhp-brand-logo-placeholder {
    background: linear-gradient(135deg, #91bd31 0%, #7aa329 100%);
    color: #fff;
    font-size: 20px;
    font-weight: 700;
}

.nhp-brand-info {
    flex: 1;
    min-width: 0;
}

.nhp-brand-info h3 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px 0;
}

.nhp-brand-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.nhp-brand-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: #888;
}

.nhp-brand-meta span i {
    font-size: 16px;
}

.nhp-brand-arrow {
    color: #ccc;
    transition: all 0.2s;
}

.nhp-brand-card:hover .nhp-brand-arrow {
    color: #91bd31;
    transform: translateX(5px);
}

/* Models grid */
.nhp-quick-search {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
}

.nhp-search-input {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f5f5f5;
    border-radius: 8px;
    padding: 12px 15px;
    margin-bottom: 15px;
}

.nhp-search-input i {
    color: #888;
    font-size: 20px;
}

.nhp-search-input input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 15px;
    color: #333;
    outline: none;
}

.nhp-search-input input::placeholder {
    color: #aaa;
}

.nhp-alpha-index {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: center;
}

.nhp-alpha-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: #f5f5f5;
    color: #666;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.nhp-alpha-link:hover {
    background: #91bd31;
    color: #fff;
    text-decoration: none;
}

.nhp-letter-section {
    margin-bottom: 30px;
}

.nhp-letter-title {
    font-size: 18px;
    font-weight: 700;
    color: #91bd31;
    padding: 10px 0;
    border-bottom: 2px solid #91bd31;
    margin-bottom: 15px;
}

.nhp-models-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}

.nhp-model-card {
    display: block;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s;
}

.nhp-model-card:hover {
    border-color: #91bd31;
    box-shadow: 0 3px 12px rgba(145, 189, 49, 0.12);
    text-decoration: none;
}

.nhp-model-card-inner {
    display: flex;
    align-items: center;
    padding: 15px;
    gap: 15px;
}

.nhp-model-info {
    flex: 1;
    min-width: 0;
}

.nhp-model-info h3 {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin: 0 0 6px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nhp-model-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.nhp-model-years,
.nhp-model-ref {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #888;
}

.nhp-model-years i,
.nhp-model-ref i {
    font-size: 14px;
}

.nhp-model-count {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 12px;
    background: #f5f5f5;
    border-radius: 8px;
    min-width: 60px;
}

.nhp-count-number {
    font-size: 18px;
    font-weight: 700;
    color: #91bd31;
    line-height: 1;
}

.nhp-count-label {
    font-size: 11px;
    color: #888;
    margin-top: 2px;
}

.nhp-model-arrow {
    color: #ccc;
    transition: all 0.2s;
}

.nhp-model-card:hover .nhp-model-arrow {
    color: #91bd31;
    transform: translateX(3px);
}

/* =========================================
   MON GARAGE
   ========================================= */

.nhp-garage-page {
    padding: 20px 0;
}

.nhp-garage-intro {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 25px;
}

.nhp-garage-intro p {
    margin: 0;
    color: #666;
    font-size: 15px;
}

.nhp-garage-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.nhp-garage-machine-section {
    margin-bottom: 30px;
}

.nhp-machine-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    padding-bottom: 12px;
    border-bottom: 2px solid #91bd31;
    margin-bottom: 15px;
}

.nhp-machine-title i {
    color: #91bd31;
}

.nhp-machine-count {
    font-size: 14px;
    font-weight: 400;
    color: #888;
}

.nhp-garage-models-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 15px;
}

.nhp-garage-model-card {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    padding: 15px;
    gap: 15px;
    transition: all 0.2s;
}

.nhp-garage-model-card:hover {
    border-color: #91bd31;
    box-shadow: 0 3px 12px rgba(145, 189, 49, 0.12);
}

.nhp-garage-model-info {
    flex: 1;
    min-width: 0;
}

.nhp-garage-model-info .nhp-model-brand {
    font-size: 12px;
    font-weight: 600;
    color: #91bd31;
    text-transform: uppercase;
    margin: 0 0 4px 0;
}

.nhp-garage-model-info .nhp-model-name {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px 0;
}

.nhp-garage-model-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nhp-btn-view {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    padding: 8px 15px;
    background: #91bd31;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s;
}

.nhp-btn-view:hover {
    background: #7da329;
    color: #fff;
    text-decoration: none;
}

.nhp-btn-view i {
    font-size: 18px;
}

.nhp-btn-delete {
    padding: 8px;
    color: #dc3545;
    opacity: 0.6;
    transition: all 0.2s;
}

.nhp-btn-delete:hover {
    opacity: 1;
    color: #dc3545;
}

.nhp-delete-form {
    margin: 0;
}

.nhp-garage-clear {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e5e5e5;
    text-align: center;
}

.nhp-garage-empty {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

.nhp-garage-empty i {
    font-size: 64px;
    color: #ccc;
    margin-bottom: 20px;
}

.nhp-garage-empty h3 {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin: 0 0 10px 0;
}

.nhp-garage-empty p {
    font-size: 15px;
    color: #666;
    margin: 0 0 25px 0;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.nhp-garage-footer {
    margin-top: 30px;
    text-align: center;
}

/* =========================================
   WIDGET HEADER - QUICKADD
   ========================================= */

/* ===========================================================
   ICÔNE D'EN-TÊTE — hook displayTop
   ===========================================================
   nav_quickadd.tpl emprunte les classes du THÈME —
   header-icon-link, header-icon, header-icon-text — pour que
   l'icône ressemble à celle du panier et du compte. C'est
   voulu, et ça implique une discipline : le module ne doit pas
   imposer une taille qui défait cette ressemblance.

   D'où :where(), qui ne compte POUR RIEN dans le calcul de
   spécificité. La règle ci-dessous pèse 0-0-1 — le seul `svg`
   du sélecteur. Trois couches se superposent donc, de la plus
   faible à la plus forte :

     1. width="20" dans le template   attribut de présentation,
                                      battu par toute règle CSS ;
                                      sert si front.css manque
     2. la règle ci-dessous   0-0-1   le défaut du module
     3. toute règle du thème         gagne dès qu'elle porte une
                                      classe, donc toujours

   Le thème garde la main sans avoir à surenchérir, et une
   boutique qui veut un autre calibre n'a qu'un nombre à
   redéfinir : --nhp-header-icon-size, sur .nhp-quickadd. La
   pastille a le sien, --nhp-header-badge-size, et suit une règle
   opposée expliquée plus bas. */
.nhp-quickadd {
    --nhp-header-icon-size: 20px;
    --nhp-header-badge-size: .6rem;

    position: relative;
    display: flex;
    align-items: center;
}

:where(.nhp-quickadd .header-icon) > svg {
    width: var(--nhp-header-icon-size);
    height: var(--nhp-header-icon-size);
}

/* LE BADGE, lui, ne se cède pas au thème — et voici pourquoi.

   La règle ci-dessus vise `> svg`, un ENFANT DIRECT. Le SVG de la
   pastille n'en est pas un : il vit dans .header-icon-badge, donc
   un niveau plus bas.

     <span class="header-icon">
       <svg>                          enfant direct — règle ci-dessus
       <span class="header-icon-badge">
         <svg>                        petit-enfant — passait à travers

   Il tombait donc sur la règle générique du thème,
   `.header-icon svg` (0-1-1), écrite pour l'icône unique d'un
   panier ou d'un compte — qui n'ont pas de SVG imbriqué. La
   pastille prenait la taille d'une icône pleine et élargissait tout
   le bloc d'en-tête.

   Ce SVG est notre contenu, dans un emplacement que le thème
   n'anticipe pas : c'est à nous de le calibrer. D'où une règle à
   0-2-1, qui passe DEVANT celle du thème — l'inverse du choix fait
   pour l'icône principale, et pour la raison inverse.

   width ET height : ne poser que la largeur laisse la hauteur se
   déduire du viewBox, ce qui marche — jusqu'à ce qu'une règle du
   thème fixe une hauteur, et la pastille s'écrase. */
.nhp-quickadd .header-icon-badge > svg {
    width: var(--nhp-header-badge-size);
    height: var(--nhp-header-badge-size);
    display: block;
}

/* Le bloc « Filtré sur / FS 240 » ne paraît qu'à partir de
   1200 px. Il portait hidden-lg-down, qui n'existe QUE dans
   Bootstrap 4 alpha : retirée dès la beta, elle ne correspond à
   rien sur Bootstrap 4 stable ni sur 5. Le texte restait donc
   visible à toutes les largeurs, et l'icône occupait la place
   de trois — sans que rien ne le signale, une classe inconnue
   n'étant pas une erreur.

   Le repli est fait ici, par le module, pour ne plus dépendre
   de la génération de Bootstrap servie par le thème. */
.nhp-quickadd__xl-only {
    display: none;
}

@media (min-width: 1200px) {
    .nhp-quickadd__xl-only {
        display: flex;
    }
}

/* Un nom de modèle long élargit l'en-tête d'autant. truncate:15
   côté Smarty coupe déjà, mais compte des CARACTÈRES, pas des
   pixels : « WWWWWWWWWWWWWWW » est deux fois plus large que
   « iiiiiiiiiiiiiii ». La borne en pixels est ici. */
.nhp-quickadd .header-icon-value {
    display: block;
    max-width: 150px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* ---------------------------------------------------------------
   BLOC ORPHELIN — plus aucun de ces sélecteurs ne correspond
   ---------------------------------------------------------------
   nav_quickadd.tpl a été « harmonisé » sur les classes du thème
   sans que la feuille suive : il n'émet plus nhp-quickadd__link,
   __icon, __badge, __text, __label ni __value. Les règles qui
   suivent, jusqu'au bloc « Dropdown », ne s'appliquent donc à
   rien.

   Ce n'est pas anodin : .nhp-quickadd__icon svg y fixe 24 px et
   .nhp-quickadd__value y borne la largeur à 150 px. On peut
   croire, en lisant ce fichier, que l'icône est calibrée — elle
   ne l'était plus, et c'est ce qui la rendait trop grande.

   Conservées telles quelles pour l'instant : les supprimer est
   une décision à part, et un retour en arrière du template les
   rendrait utiles.
   --------------------------------------------------------------- */
.nhp-quickadd__link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 15px;
    border-radius: 3px;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
}

.nhp-quickadd__link--empty {
    background: #f5f5f5;
    border: 1px dashed #ccc;
}

.nhp-quickadd__link--empty:hover {
    background: #e8f5e9;
    border-color: #91bd31;
    text-decoration: none;
}

.nhp-quickadd__link--active {
    background: #e8f5e9;
    border: 1px solid #91bd31;
}

.nhp-quickadd__link--active:hover {
    background: #dcedc8;
    text-decoration: none;
}

.nhp-quickadd__icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: #666;
}

.nhp-quickadd__link--active .nhp-quickadd__icon {
    color: #91bd31;
}

.nhp-quickadd__icon svg {
    width: 24px;
    height: 24px;
}

.nhp-quickadd__badge {
    position: absolute;
    top: -4px;
    right: -4px;
}

.nhp-quickadd__badge svg {
    width: 14px;
    height: 14px;
}

.nhp-quickadd__text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.nhp-quickadd__label {
    font-size: 1rem;
    color: #888;
}

.nhp-quickadd__value {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nhp-quickadd__link--active .nhp-quickadd__value {
    color: #2e7d32;
}

/* Dropdown */
.nhp-quickadd__dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 280px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    z-index: 1000;
    display: none;
    margin-top: 8px;
}

.nhp-quickadd--open .nhp-quickadd__dropdown {
    display: block;
}

.nhp-quickadd__dropdown-header {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.nhp-quickadd__dropdown-header strong {
    display: block;
    font-size: 14px;
    color: #333;
}

.nhp-quickadd__machine {
    font-size: 12px;
    color: #888;
}

.nhp-quickadd__dropdown-actions {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.nhp-quickadd__action {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 13px;
    color: #333;
    transition: all 0.2s;
}

.nhp-quickadd__action:hover {
    background: #f5f5f5;
    text-decoration: none;
}

.nhp-quickadd__action i {
    font-size: 18px;
    color: #666;
}

.nhp-quickadd__action--primary {
    background: #91bd31;
    color: #fff;
}

.nhp-quickadd__action--primary:hover {
    background: #7aa329;
    color: #fff;
}

.nhp-quickadd__action--primary i {
    color: #fff;
}

.nhp-quickadd__action--clear {
    color: #999;
}

.nhp-quickadd__action--clear:hover {
    color: #d32f2f;
    background: #ffebee;
}

.nhp-quickadd__action--clear:hover i {
    color: #d32f2f;
}

.nhp-quickadd__dropdown-recent {
    padding: 12px 15px;
    border-top: 1px solid #f0f0f0;
}

.nhp-quickadd__recent-title {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.nhp-quickadd__recent-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nhp-quickadd__recent-list li {
    margin-bottom: 6px;
}

.nhp-quickadd__recent-list a {
    display: block;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    color: #555;
    text-decoration: none;
    transition: all 0.2s;
}

.nhp-quickadd__recent-list a:hover {
    background: #f5f5f5;
    color: #91bd31;
    text-decoration: none;
}

.nhp-quickadd__dropdown-footer {
    padding: 12px 15px;
    border-top: 1px solid #f0f0f0;
    background: #fafafa;
    border-radius: 0 0 12px 12px;
}

.nhp-quickadd__dropdown-footer a {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #666;
    text-decoration: none;
}

.nhp-quickadd__dropdown-footer a:hover {
    color: #91bd31;
    text-decoration: none;
}

.nhp-quickadd__dropdown-footer i {
    font-size: 18px;
}

/* Responsive quickadd */
@media (max-width: 991px) {
    .nhp-quickadd__text {
        display: none;
    }
    
    .nhp-quickadd__link {
        padding: 8px;
    }
    
    .nhp-quickadd__dropdown {
        right: -50px;
        width: 260px;
    }
}

@media (max-width: 575px) {
    .nhp-quickadd__dropdown {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        border-radius: 12px 12px 0 0;
        margin-top: 0;
    }
}

/* =========================================
   RESPONSIVE GÉNÉRAL
   ========================================= */

@media (max-width: 768px) {
    .nhp-page-header {
        padding: 20px;
    }
    
    .nhp-page-header h1 {
        font-size: 18px;
    }
    
    .nhp-page-header h1 strong {
        font-size: 22px;
    }
    
    .nhp-page-stats {
        flex-direction: column;
        gap: 10px;
    }
    
    .nhp-brands-grid {
        grid-template-columns: 1fr;
    }
    
    .nhp-models-grid {
        grid-template-columns: 1fr;
    }
    
    .nhp-alpha-index {
        display: none;
    }
    
    .nhp-garage-stats {
        flex-direction: column;
    }
    
    .nhp-garage-models-grid {
        grid-template-columns: 1fr;
    }
    
    .nhp-garage-model-card {
        flex-direction: column;
        align-items: stretch;
    }
    
    .nhp-garage-model-actions {
        justify-content: space-between;
        padding-top: 10px;
        border-top: 1px solid #f0f0f0;
    }
}

/* ====================================
   BOUTON AJOUTER AU GARAGE
   ==================================== */

.nhp-garage-action {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e5e5e5;
}

/* =========================================
   SÉLECTEUR D'ANNÉE DE PRODUCTION
   ========================================= */

.nhp-year-filter {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-direction: column;
    align-content: flex-start;
    flex-wrap: wrap;

}

.nhp-year-filter__label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    white-space: nowrap;
}

.nhp-year-filter__label svg {
    flex-shrink: 0;
}

.nhp-year-select {
    width: auto;
    min-width: 220px; /* « 2002 → 2008 (n° 1122) » sans troncature */
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    color: #444;
    background: #fff;
    border: 2px solid #e5e5e5;
    border-radius: 25px;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}

.nhp-year-select:hover,
.nhp-year-select:focus {
    border-color: #91bd31;
    color: #91bd31;
    outline: none;
}

.nhp-btn-garage {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 25px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.nhp-btn-garage:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.nhp-btn-garage.btn-success {
    background: #28a745;
    border-color: #28a745;
    color: #fff;
}

.nhp-btn-garage.btn-success:hover {
    background: #218838;
    border-color: #1e7e34;
}

.nhp-btn-garage.btn-outline-primary {
    background: transparent;
    border: 2px solid #91bd31;
    color: #91bd31;
}

.nhp-btn-garage.btn-outline-primary:hover {
    background: #91bd31;
    color: #fff;
}

.nhp-btn-garage:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.nhp-btn-garage svg {
    flex-shrink: 0;
}

/* Garage page - Image modèle */
.nhp-garage-model-image {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
}

.nhp-garage-model-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.nhp-garage-model-image .nhp-no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
}

.nhp-garage-model-image .nhp-no-image i {
    font-size: 32px;
}

/* Garage migrate alert */
.nhp-garage-migrate {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    margin-bottom: 20px;
    background: #e3f2fd;
    border: 1px solid #90caf9;
    border-radius: 8px;
}

.nhp-garage-migrate > i {
    font-size: 32px;
    color: #1976d2;
}

.nhp-migrate-content {
    flex: 1;
}

.nhp-migrate-content p {
    margin: 0 0 10px;
}

/* Model nickname */
.nhp-model-nickname {
    display: inline-block;
    padding: 2px 8px;
    background: #fff3e0;
    color: #e65100;
    font-size: 11px;
    font-weight: 600;
    border-radius: 3px;
    margin-bottom: 5px;
}

@media (max-width: 767px) {
    .nhp-garage-action {
        text-align: center;
    }
    
    .nhp-btn-garage {
        width: 100%;
        justify-content: center;
    }

    .nhp-year-filter {
        width: 100%;
        justify-content: center;
    }

    .nhp-year-select {
        flex: 1;
        min-width: 0;
    }
    
    .nhp-garage-migrate {
        flex-direction: column;
        text-align: center;
    }
}


/* ====================================
   PAGE MES RECHERCHES
   ==================================== */

.nhp-searches-page {
    padding: 20px 0;
}

.nhp-searches-intro {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 25px;
}

.nhp-searches-intro p {
    margin: 0;
    color: #666;
    font-size: 15px;
    flex: 1;
}

.nhp-searches-stats {
    margin-bottom: 20px;
}

.nhp-stat-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 15px;
    background: #e3f2fd;
    color: #1976d2;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.nhp-stat-badge i {
    font-size: 18px;
}

.nhp-searches-date-section {
    margin-bottom: 25px;
}

.nhp-date-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5e5e5;
    margin-bottom: 15px;
}

.nhp-date-title i {
    font-size: 18px;
    color: #91bd31;
}

.nhp-searches-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nhp-search-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    gap: 15px;
    transition: all 0.2s;
}

.nhp-search-card:hover {
    border-color: #91bd31;
    box-shadow: 0 2px 8px rgba(145, 189, 49, 0.1);
}

.nhp-search-card.in-garage {
    background: #f8fff8;
    border-color: #c8e6c9;
}

.nhp-search-info {
    flex: 1;
    min-width: 0;
}

.nhp-search-machine {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    color: #91bd31;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.nhp-search-model {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin: 0 0 6px 0;
}

.nhp-search-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.nhp-search-time,
.nhp-search-results {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #888;
}

.nhp-search-time i,
.nhp-search-results i {
    font-size: 14px;
}

.nhp-search-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.nhp-in-garage-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #28a745;
    padding: 6px 12px;
    background: #e8f5e9;
    border-radius: 15px;
}

.nhp-in-garage-badge i {
    font-size: 16px;
}

.nhp-btn-add-garage {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nhp-add-form,
.nhp-delete-form {
    margin: 0;
}

.nhp-searches-clear {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e5e5e5;
    text-align: center;
}

.nhp-searches-empty {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

.nhp-searches-empty i {
    font-size: 64px;
    color: #ccc;
    margin-bottom: 20px;
}

.nhp-searches-empty h3 {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin: 0 0 10px 0;
}

.nhp-searches-empty p {
    font-size: 15px;
    color: #666;
    margin: 0 0 25px 0;
}

.nhp-empty-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

@media (max-width: 767px) {
    .nhp-searches-intro {
        flex-direction: column;
        text-align: center;
    }
    
    .nhp-search-card {
        flex-direction: column;
        align-items: stretch;
    }
    
    .nhp-search-actions {
        justify-content: flex-end;
        padding-top: 10px;
        border-top: 1px solid #f0f0f0;
    }
}

/* ====================================
   BOUTON GARAGE SUR CARTES MODÈLES
   ==================================== */

.nhp-model-card-wrapper {
    position: relative;
}

.nhp-card-garage-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 2px solid #91bd31;
    border-radius: 50%;
    color: #91bd31;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s;
    z-index: 10;
}

.nhp-model-card-wrapper:hover .nhp-card-garage-btn {
    opacity: 1;
}

.nhp-card-garage-btn:hover {
    background: #91bd31;
    color: #fff;
    transform: scale(1.1);
}

.nhp-card-garage-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.nhp-card-garage-btn.added {
    background: #28a745;
    border-color: #28a745;
    color: #fff;
    opacity: 1;
}

.nhp-card-garage-btn i {
    font-size: 18px;
}

/* Ajuster la carte pour le wrapper */
.nhp-model-card-wrapper .nhp-model-card {
    display: block;
}

@media (max-width: 767px) {
    .nhp-card-garage-btn {
        opacity: 1;
        width: 28px;
        height: 28px;
    }
    
    .nhp-card-garage-btn i {
        font-size: 16px;
    }
}

/* ====================================
   PAGE GARAGE UNIFIÉE
   ==================================== */

.nhp-garage-page {
    padding: 20px 0;
}

.nhp-section {
    margin-bottom: 30px;
}

.nhp-section-header h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0 0 15px 0;
}

.nhp-section-header h2 i {
    color: #91bd31;
}

.nhp-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    background: #91bd31;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    border-radius: 12px;
}

.nhp-count-badge.secondary {
    background: #888;
}

.nhp-section-divider {
    border: none;
    border-top: 2px dashed #e0e0e0;
    margin: 30px 0;
}

/* Liste garage/recherches */
.nhp-garage-list,
.nhp-searches-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nhp-garage-item,
.nhp-search-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    transition: all 0.2s;
}

.nhp-garage-item:hover,
.nhp-search-item:hover {
    border-color: #91bd31;
    box-shadow: 0 2px 8px rgba(145, 189, 49, 0.1);
}

.nhp-search-item.in-garage {
    background: #f8fff8;
    border-color: #c8e6c9;
}

/* Image */
.nhp-item-image {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nhp-item-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.nhp-item-image i {
    font-size: 24px;
    color: #ccc;
}

/* Infos */
.nhp-item-info {
    flex: 1;
    min-width: 0;
}

.nhp-item-machine {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #91bd31;
    text-transform: uppercase;
}

.nhp-item-name {
    display: block;
    font-size: 14px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nhp-item-parts,
.nhp-item-date {
    font-size: 12px;
    color: #888;
}

/* Actions */
.nhp-item-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.nhp-inline-form {
    margin: 0;
    display: inline;
}

.nhp-btn-delete {
    padding: 5px;
    color: #dc3545;
    opacity: 0.6;
}

.nhp-btn-delete:hover {
    opacity: 1;
}

.nhp-in-garage-icon {
    color: #28a745;
    display: flex;
    align-items: center;
}

.nhp-in-garage-icon i {
    font-size: 20px;
}

/* Message vide */
.nhp-empty-message {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    color: #666;
    font-size: 14px;
}

.nhp-empty-message i {
    color: #91bd31;
    font-size: 20px;
}

/* Footer sections */
.nhp-section-footer {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.nhp-page-footer {
    margin-top: 30px;
    text-align: center;
}

/* Responsive */
@media (max-width: 575px) {
    .nhp-garage-item,
    .nhp-search-item {
        flex-wrap: wrap;
    }
    
    .nhp-item-info {
        flex: 1 1 calc(100% - 65px);
    }
    
    .nhp-item-actions {
        flex: 1 1 100%;
        justify-content: flex-end;
        padding-top: 10px;
        border-top: 1px solid #f0f0f0;
        margin-top: 10px;
    }
}

/* ====================================
   BOUTONS D'ACTION - FOND GRIS UNIFIÉ
   ==================================== */

/* Boutons dans les listes garage/recherches */
.nhp-item-actions .btn,
.nhp-garage-model-actions .btn,
.nhp-search-actions .btn {
    background: #e4e6ef;
    border: none;
    color: #333;
}

.nhp-item-actions .btn:hover,
.nhp-garage-model-actions .btn:hover,
.nhp-search-actions .btn:hover {
    background: #d1d3dc;
    color: #333;
}

/* Bouton Voir (primary) */
.nhp-item-actions .btn-primary,
.nhp-item-actions .btn-outline-primary,
.nhp-garage-model-actions .btn-primary {
    background: #e4e6ef;
    border: none;
    color: #333;
}

.nhp-item-actions .btn-primary:hover,
.nhp-item-actions .btn-outline-primary:hover,
.nhp-garage-model-actions .btn-primary:hover {
    background: #91bd31;
    color: #fff;
}

/* Bouton Ajouter au garage (success/outline-success) */
.nhp-item-actions .btn-outline-success {
    background: #e4e6ef;
    border: none;
    color: #28a745;
}

.nhp-item-actions .btn-outline-success:hover {
    background: #28a745;
    color: #fff;
}

/* Bouton Supprimer */
.nhp-item-actions .btn-link.nhp-btn-delete,
.nhp-garage-model-actions .btn-link.nhp-btn-delete {
    background: #e4e6ef;
    border: none;
    color: #dc3545;
    opacity: 1;
    border-radius: 6px;
    padding: 6px 8px !important;
}

.nhp-item-actions .btn-link.nhp-btn-delete:hover,
.nhp-garage-model-actions .btn-link.nhp-btn-delete:hover {
    background: #dc3545;
    color: #fff;
}

/* Icône "Dans le garage" */
.nhp-in-garage-icon {
    background: #e4e6ef;
    padding: 6px 10px;
    border-radius: 6px;
}

/* Boutons footer (Vider le garage, Vider l'historique) */
.nhp-section-footer .btn-outline-danger,
.nhp-section-footer .btn-outline-secondary,
.nhp-garage-clear .btn-outline-danger {
    background: #e4e6ef;
    border: none;
    color: #666;
}

.nhp-section-footer .btn-outline-danger:hover,
.nhp-garage-clear .btn-outline-danger:hover {
    background: #dc3545;
    color: #fff;
}

.nhp-section-footer .btn-outline-secondary:hover {
    background: #6c757d;
    color: #fff;
}

/* Bouton Rechercher des pièces (footer page) */
.nhp-page-footer .btn-primary {
    background: #91bd31;
    color: #fff;
}

.nhp-page-footer .btn-primary:hover {
    background: #7aa329;
}


/* ====================================
   QUICKADD - VERSION MOBILE MODALE
   ==================================== */

@media (max-width: 575px) {
    /* Overlay sombre */
    .nhp-quickadd--open::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        animation: nhp-fade-in 0.2s ease;
    }
    
    /* Modale centrée */
    .nhp-quickadd__dropdown {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        bottom: auto;
        width: calc(100% - 40px);
        max-width: 320px;
        max-height: 80vh;
        overflow-y: auto;
        border-radius: 16px;
        margin-top: 0;
        animation: nhp-scale-in 0.2s ease;
    }
    
    /* Header modale avec bouton fermer */
    .nhp-quickadd__dropdown-header {
        position: relative;
        padding-right: 40px;
    }
    
    /* Bouton fermer (visible uniquement sur mobile) */
    .nhp-quickadd__close {
        display: flex;
        position: absolute;
        top: 12px;
        right: 12px;
        width: 28px;
        height: 28px;
        align-items: center;
        justify-content: center;
        background: #f0f0f0;
        border: none;
        border-radius: 50%;
        color: #666;
        cursor: pointer;
        transition: all 0.2s;
    }
    
    .nhp-quickadd__close:hover {
        background: #e0e0e0;
        color: #333;
    }
    
    .nhp-quickadd__close i {
        font-size: 18px;
    }
}

/* Masquer le bouton fermer sur desktop */
@media (min-width: 576px) {
    .nhp-quickadd__close {
        display: none;
    }
}

/* Animations */
@keyframes nhp-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes nhp-scale-in {
    from { 
        opacity: 0; 
        transform: translate(-50%, -50%) scale(0.9); 
    }
    to { 
        opacity: 1; 
        transform: translate(-50%, -50%) scale(1); 
    }
}

/* ====================================
   SECTION AVANTAGES
   ==================================== */

.nhp-advantages-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 40px;
}

.nhp-advantage-card {
    text-align: center;
    padding: 25px 20px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    transition: all 0.2s;
}

.nhp-advantage-card:hover {
    border-color: #91bd31;
    box-shadow: 0 4px 15px rgba(145, 189, 49, 0.1);
}

.nhp-advantage-card i {
    font-size: 36px;
    color: #91bd31;
    margin-bottom: 12px;
    display: block;
}

.nhp-advantage-card h4 {
    font-size: 15px;
    font-weight: 700;
    color: #333;
    margin: 0 0 8px;
}

.nhp-advantage-card p {
    font-size: 13px;
    color: #888;
    margin: 0;
    line-height: 1.4;
}

/* Responsive avantages */
@media (max-width: 991px) {
    .nhp-advantages-grid {
        gap: 15px;
    }
    
    .nhp-advantage-card {
        padding: 20px 15px;
    }
    
    .nhp-advantage-card i {
        font-size: 32px;
    }
    
    .nhp-advantage-card h4 {
        font-size: 14px;
    }
    
    .nhp-advantage-card p {
        font-size: 12px;
    }
}

@media (max-width: 767px) {
    .nhp-advantages-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-top: 30px;
    }
    
    .nhp-advantage-card {
        display: flex;
        align-items: center;
        text-align: left;
        padding: 15px 20px;
        gap: 15px;
    }
    
    .nhp-advantage-card i {
        font-size: 28px;
        margin-bottom: 0;
        flex-shrink: 0;
    }
    
    .nhp-advantage-card .nhp-advantage-content {
        flex: 1;
    }
    
    .nhp-advantage-card h4 {
        margin-bottom: 4px;
    }
}

.spareparts-info-block {
    display: flex;
    gap: 20px;
    padding: 20px 24px;
    background: linear-gradient(135deg, #f0f7e6 0%, #e8f5d9 100%);
    border: 1px solid #c5e1a5;
    border-left: 4px solid #91bd31;
    border-radius: 8px;
    margin: 20px 0;
}

.spareparts-info-block .info-icon {
    flex-shrink: 0;
    color: #91bd31;
    margin-top: 2px;
}

.spareparts-info-block .info-content {
    flex: 1;
}

.spareparts-info-block h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 600;
    color: #2e7d32;
}

.spareparts-info-block p {
    margin: 0 0 10px 0;
    font-size: 14px;
    line-height: 1.5;
    color: #555;
}

.spareparts-info-block p:last-of-type {
    margin-bottom: 15px;
}

.spareparts-info-block strong {
    color: #333;
}

.spareparts-info-block .info-contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #91bd31;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.spareparts-info-block .info-contact-btn:hover {
    background: #7da629;
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(145, 189, 49, 0.3);
}

.spareparts-info-block .info-contact-btn svg {
    flex-shrink: 0;
}

/* Version compacte pour mobile */
@media (max-width: 576px) {
    .spareparts-info-block {
        flex-direction: column;
        gap: 15px;
        padding: 16px;
    }

    .spareparts-info-block .info-icon {
        display: none;
    }

    .spareparts-info-block h4 {
        font-size: 15px;
    }

    .spareparts-info-block p {
        font-size: 13px;
    }

    .spareparts-info-block .info-contact-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ── Bouton Vue éclatée (PDF) — frère du bouton garage ── */
.btn.btn-outline-secondary.nhp-btn-pdf {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 3px;
    transition: all 0.3s ease;
    cursor: pointer;
    background: transparent;
    border: 2px solid #25292f;
    color: #25292f;
    text-decoration: none;
}

.btn.btn-outline-secondary.nhp-btn-pdf:hover {
    background: #25292f;
    color: #fff;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn.btn-outline-secondary.nhp-btn-pdf svg {
    flex-shrink: 0;
}

.nhp-model-productions{
    margin: 4rem 0;
}

.nhp-model-productions ul{
    display: flex;
    gap:1rem;
}

.btn.nhp-btn-pdf-link.nhp-btn-pdf-sm{
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 3px;
    transition: all 0.3s ease;
    cursor: pointer;
    background: #eee;
    border: 2px solid #25292f;
    color: #25292f;
    text-decoration: none;
}