/**
 * NHP Spareparts - Frontend CSS
 */

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

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

.nhp-spareparts-widget.nhp-widget-compact {
    padding: 20px;
}

.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: #91bd31;
    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: #ccc;
    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;
    }
}

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

/* =========================================
   SWITCH ORIGINE / ADAPTABLE
   ========================================= */

.nhp-product-type-switch {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.nhp-switch-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    background: #fff;
    border: 2px solid #e5e5e5;
    border-radius: 3px;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
}

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

.nhp-switch-btn.active {
    background: #91bd31;
    border-color: #91bd31;
    color: #fff;
}

.nhp-switch-btn.active:hover {
    background: #7aa329;
    border-color: #7aa329;
}

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

.nhp-switch-count {
    font-weight: 400;
    opacity: 0.8;
}

/* Responsive switch */
@media (max-width: 575px) {
    .nhp-product-type-switch {
        flex-direction: column;
        gap: 8px;
    }
    
    .nhp-switch-btn {
        justify-content: center;
        padding: 12px 15px;
    }
}

/* =========================================
   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
   ========================================= */

.nhp-quickadd {
    position: relative;
    display: flex;
    align-items: center;
}

.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 {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e5e5e5;
}

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