/* ═══════════════════════════════════════════════════════════════════════════
   GTH Vehicle Filter — Charte gthsarl.fr
   Palette : #232323 (texte) / #fff (fond) / #f7f7f7 (hover) / #eee (bordures)
   Accents : #e3020e (rouge GTH) / #0b69f6 (bleu)
   Font    : Inter
   ═══════════════════════════════════════════════════════════════════════════ */

.gth-vf,
.gth-vf-modal {
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ──────── Grande barre dans la nav ──────── */
.gth-vf {
    width: 100%;
    max-width: 720px;
    display: block;
    margin-right: auto;
}

.gth-vf-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-width: 280px;
    padding: 11px 18px;
    border: 1px solid #eee;
    border-radius: 8px;
    background: #fff;
    cursor: text;
    transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
    color: #232323;
}

.gth-vf-bar:hover,
.gth-vf-bar:focus-visible {
    border-color: #232323;
    box-shadow: 0 2px 14px rgba(0, 0, 0, .08);
    outline: none;
}

.gth-vf-bar__icon {
    display: inline-flex;
    color: #232323;
    flex-shrink: 0;
}

.gth-vf-bar__placeholder {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gth-vf-bar__placeholder strong {
    color: #232323;
    font-weight: 700;
    margin-left: 4px;
}

.gth-vf--has-vehicle .gth-vf-bar {
    border-color: #232323;
    background: #f7f7f7;
}
.gth-vf--has-vehicle .gth-vf-bar__placeholder {
    color: #232323;
}

.gth-vf-bar__clear {
    background: transparent;
    border: 0;
    color: #666;
    font-size: 22px;
    line-height: 1;
    padding: 0 4px;
    cursor: pointer;
    border-radius: 4px;
    transition: color .15s ease, background-color .15s ease;
}
.gth-vf-bar__clear:hover { color: #e3020e; background: rgba(0, 0, 0, 0.06); }

/* ──────── Modale ──────── */
.gth-vf-modal[hidden] { display: none; }

.gth-vf-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 16px 16px;
    color: #232323;
}

.gth-vf-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .4);
    backdrop-filter: blur(2px);
}

.gth-vf-modal__dialog {
    position: relative;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .18);
    width: 100%;
    max-width: 1180px;
    max-height: calc(100vh - 56px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.gth-vf-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
    background: #fff;
    flex-shrink: 0;
}

.gth-vf-modal__header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #232323;
    letter-spacing: .2px;
}

.gth-vf-modal__close {
    background: transparent;
    border: 0;
    cursor: pointer;
    padding: 6px;
    color: #666;
    border-radius: 8px;
    line-height: 0;
    font-size: 22px;
    transition: background .15s ease, color .15s ease;
}
.gth-vf-modal__close:hover { background: #f5f5f5; color: #232323; }

.gth-vf-modal__body {
    display: grid;
    gap: 0;
    overflow: hidden;
    flex: 1;
    min-height: 0;
}

/* Pas de véhicule : 3 colonnes (plaque / véhicules / produits). */
.gth-vf-modal__body--no-side {
    grid-template-columns: 1fr 1fr 1fr;
}

/* Véhicule sélectionné : sidebar à gauche + colonne 3 (produits) à droite. */
.gth-vf-modal__body--with-side {
    grid-template-columns: 320px 1fr;
}
.gth-vf-modal__body--with-side .gth-vf-col--plate,
.gth-vf-modal__body--with-side .gth-vf-col--vehicles {
    display: none;
}
.gth-vf-modal__body--with-side .gth-vf-side {
    order: 1;
    border-left: 0;
    border-right: 1px solid #eee;
}
.gth-vf-modal__body--with-side .gth-vf-col--products {
    order: 2;
    border-right: 0;
}

/* ──────── Colonnes ──────── */
.gth-vf-col {
    display: flex;
    flex-direction: column;
    border-right: 1px solid #eee;
    padding: 20px 20px 16px;
    min-height: 0;
    overflow: hidden;
}
.gth-vf-col:last-of-type { border-right: 0; }

.gth-vf-col__head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.gth-vf-col__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: #232323;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
    letter-spacing: .3px;
}

.gth-vf-col__head h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #232323;
    letter-spacing: .2px;
}

.gth-vf-col__hint {
    margin: 0 0 12px 0;
    font-size: 12px;
    color: #666;
    line-height: 1.5;
}

/* Helper réutilisable pour les inputs */
.gth-vf-plate input,
.gth-vf-vehicles__search input,
.gth-vf-products__search input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #eee;
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
    color: #232323;
    box-sizing: border-box;
    font-family: inherit;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.gth-vf-plate input:focus,
.gth-vf-vehicles__search input:focus,
.gth-vf-products__search input:focus {
    border-color: #232323;
    box-shadow: 0 0 0 3px rgba(35, 35, 35, .08);
    outline: none;
}

/* Plaque */
.gth-vf-plate {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.gth-vf-plate input {
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.gth-vf-plate button {
    background: #232323;
    color: #fff;
    border: 0;
    border-radius: 8px;
    padding: 11px 18px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: .5px;
    font-family: inherit;
    transition: background-color .15s ease, transform .05s ease;
}
.gth-vf-plate button:hover { background: #000; }
.gth-vf-plate button:active { transform: translateY(1px); }
.gth-vf-plate button:disabled { opacity: .5; cursor: wait; }

.gth-vf-plate__status {
    margin-top: 8px;
    font-size: 13px;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid transparent;
}
.gth-vf-plate__status.is-info { background: #f5f5f5; color: #232323; border-color: #eee; }
.gth-vf-plate__status.is-success { background: #f0faf3; color: #0a7c33; border-color: #cfe9d5; }
.gth-vf-plate__status.is-warning { background: #fff6e5; color: #8a5a00; border-color: #f1dca5; }
.gth-vf-plate__status.is-error { background: #fdecec; color: #e3020e; border-color: #f5c2c2; }

/* ──────── Véhicules - menu drill-down ──────── */
.gth-vf-vehicles__crumb {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    padding: 8px 12px;
    background: #f7f7f7;
    border-radius: 8px;
    font-size: 12px;
    color: #666;
    min-height: 32px;
}

.gth-vf-vehicles__back {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 6px;
    width: 26px;
    height: 26px;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    color: #232323;
    flex-shrink: 0;
    padding: 0;
    transition: background .15s ease, border-color .15s ease;
}
.gth-vf-vehicles__back:hover { background: #f5f5f5; border-color: #232323; }
.gth-vf-vehicles__back[hidden] { display: none; }

.gth-vf-vehicles__path {
    font-weight: 600;
    color: #232323;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    letter-spacing: .1px;
}

.gth-vf-vehicles__search {
    margin-bottom: 10px;
}

.gth-vf-vehicles__list {
    list-style: none;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}
.gth-vf-vehicles__list li { margin: 0; }

.gth-vf-vehicles__item {
    width: 100%;
    text-align: left;
    background: transparent;
    border: 0;
    padding: 11px 14px;
    font-size: 14px;
    cursor: pointer;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 8px;
    font-family: inherit;
    transition: background-color .15s ease, color .15s ease;
}
.gth-vf-vehicles__item:hover {
    background-color: #f7f7f7;
    color: #000;
}
.gth-vf-vehicles__item.is-active {
    background-color: #fdecec;
    color: #e3020e;
    font-weight: 700;
}

.gth-vf-vehicles__name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gth-vf-vehicles__chev {
    flex-shrink: 0;
    color: #999;
    font-size: 18px;
    line-height: 1;
    margin-left: 6px;
    transition: color .15s ease, transform .15s ease;
}
.gth-vf-vehicles__item:hover .gth-vf-vehicles__chev {
    color: #232323;
    transform: translateX(2px);
}

.gth-vf-vehicles__item.is-direct {
    background: #f7f7f7;
    color: #232323;
}
.gth-vf-vehicles__item.is-direct:hover { background: #efefef; }

.gth-vf-vehicles__hint {
    font-size: 11px;
    color: #999;
    margin-left: 6px;
    font-weight: 400;
}

.gth-vf-vehicles__empty {
    padding: 16px 4px;
    text-align: center;
    color: #999;
    font-size: 13px;
}

/* ──────── Produits ──────── */
.gth-vf-products__search {
    margin-bottom: 10px;
}

.gth-vf-products__hint {
    font-size: 12px;
    color: #666;
    padding: 10px 4px;
}

.gth-vf-products__list {
    list-style: none;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}
.gth-vf-products__item { margin: 0; }

.gth-vf-products__link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: background-color .15s ease;
}
.gth-vf-products__link:hover { background: #f7f7f7; text-decoration: none; }

.gth-vf-products__img {
    width: 52px;
    height: 52px;
    object-fit: cover;
    border-radius: 6px;
    background: #f5f5f5;
    flex-shrink: 0;
    border: 1px solid #eee;
}
.gth-vf-products__img--placeholder { display: inline-block; }

.gth-vf-products__info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    flex: 1;
}

.gth-vf-products__name {
    font-size: 13px;
    font-weight: 600;
    color: #232323;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gth-vf-products__ref {
    font-size: 11px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: .3px;
}

.gth-vf-products__price {
    font-size: 13px;
    color: #e3020e;
    font-weight: 700;
}

.gth-vf-products__more {
    margin-top: 8px;
    padding-top: 10px;
    border-top: 1px solid #eee;
    text-align: right;
}

.gth-vf-products__more-link {
    font-size: 12px;
    color: #232323;
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    transition: color .15s ease;
}
.gth-vf-products__more-link:hover { color: #e3020e; text-decoration: none; }

/* ──────── Sidebar véhicule ──────── */
.gth-vf-side {
    background: #f7f7f7;
    border-left: 1px solid #eee;
    display: flex;
    flex-direction: column;
    padding: 20px;
    min-height: 0;
}
.gth-vf-side[hidden] { display: none; }

.gth-vf-side__head h4 {
    margin: 0 0 14px 0;
    font-size: 12px;
    font-weight: 700;
    color: #666;
    text-transform: uppercase;
    letter-spacing: .8px;
}

.gth-vf-side__body {
    flex: 1;
    overflow-y: auto;
}

.gth-vf-side__name {
    font-size: 18px;
    font-weight: 700;
    color: #232323;
    line-height: 1.3;
    margin-bottom: 8px;
    letter-spacing: .2px;
}

.gth-vf-side__id {
    display: inline-block;
    font-size: 11px;
    color: #666;
    margin-bottom: 16px;
    padding: 3px 8px;
    background: #fff;
    border-radius: 999px;
    border: 1px solid #eee;
    text-transform: uppercase;
    letter-spacing: .4px;
    font-weight: 600;
}

.gth-vf-side__footer {
    padding-top: 14px;
    border-top: 1px solid #eee;
    margin-top: 14px;
}

.gth-vf-side__clear {
    width: 100%;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    color: #666;
    text-transform: uppercase;
    letter-spacing: .4px;
    font-family: inherit;
    transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.gth-vf-side__clear:hover {
    border-color: #e3020e;
    color: #e3020e;
    background: #fff;
}

/* ──────── Responsive ──────── */
@media (max-width: 1024px) {
    .gth-vf-modal__body--no-side {
        grid-template-columns: 1fr 1fr;
        grid-auto-rows: minmax(0, 1fr);
    }
    .gth-vf-modal__body--with-side {
        grid-template-columns: 260px 1fr;
    }
    .gth-vf-col,
    .gth-vf-side {
        border-right: 1px solid #eee;
        border-bottom: 1px solid #eee;
        border-left: 0;
    }
}

@media (max-width: 700px) {
    .gth-vf-modal {
        padding: 0;
    }
    .gth-vf-modal__dialog {
        max-height: 100vh;
        border-radius: 0;
    }
    .gth-vf-modal__body--with-side,
    .gth-vf-modal__body--no-side {
        grid-template-columns: 1fr;
        overflow-y: auto;
    }
    .gth-vf-col,
    .gth-vf-side {
        border-right: 0;
        max-height: none;
    }
    .gth-vf-vehicles__list,
    .gth-vf-products__list {
        max-height: 280px;
    }
}

/* Compatibilité ancien layout header */
.header_bottom_right.ms-auto {
    flex: 1;
    justify-content: flex-end;
    align-items: flex-end !important;
}
