/**
 * =========================================================
 * LE VOLTIGEUR — GÉNÉRATEUR D'ARMÉE
 * =========================================================
 */

.vab {
    width: 100%;
    margin: 0;
    padding: 0;
    font-family: inherit;
    color: #222;
    box-sizing: border-box;
}

.vab *,
.vab *::before,
.vab *::after {
    box-sizing: border-box;
}


/**
 * =========================================================
 * HEADER
 * =========================================================
 */

.vab-header {
    width: 100%;
    background: #222;
    color: #fff;
    padding: 40px 5vw;
}

.vab-header-inner {
    width: 100%;
    max-width: 1800px;
    margin: 0 auto;

    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 40px;
}

.vab-brand-small {
    display: block;
    margin-bottom: 8px;

    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;

    opacity: 0.6;
}

.vab-brand h1 {
    margin: 0;

    font-size: clamp(2rem, 4vw, 4rem);
    line-height: 0.95;
    font-weight: 700;
}


/**
 * =========================================================
 * PARAMÈTRES
 * =========================================================
 */

.vab-settings {
    display: flex;
    align-items: flex-end;
    gap: 15px;
    flex-wrap: wrap;
}

.vab-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.vab-field label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.65;
}

.vab-field select,
.vab-field input {
    height: 42px;

    padding: 0 12px;

    border: 1px solid rgba(255,255,255,0.3);

    background: transparent;
    color: #fff;

    font-family: inherit;
    font-size: 0.9rem;
}

.vab-field select option {
    color: #222;
}

.vab-list-name input {
    width: 220px;
}


/**
 * =========================================================
 * MAIN
 * =========================================================
 */

.vab-main {
    width: 100%;
    padding: 60px 5vw;
}

.vab-content {
    width: 100%;
    max-width: 1800px;
    margin: 0 auto;

    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px;
    gap: 60px;
}


/**
 * =========================================================
 * TITRES
 * =========================================================
 */

.vab-section-heading {
    margin-bottom: 50px;
}

.vab-kicker {
    display: block;

    margin-bottom: 8px;

    font-size: 0.7rem;
    font-weight: 700;

    letter-spacing: 0.12em;
    text-transform: uppercase;

    opacity: 0.55;
}

.vab-section-heading h2,
.vab-summary-header h2 {
    margin: 0;

    font-size: clamp(1.8rem, 3vw, 3rem);
    line-height: 1;
}


/**
 * =========================================================
 * CATÉGORIES
 * =========================================================
 */

.vab-category {
    margin-bottom: 60px;
}

.vab-category-header {
    margin-bottom: 20px;

    border-bottom: 1px solid #ddd;
}

.vab-category-header h3 {
    margin: 0 0 12px;

    font-size: 1.3rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}


/**
 * =========================================================
 * GRILLE UNITÉS
 * =========================================================
 */

.vab-unit-grid {
    display: grid;

    grid-template-columns:
        repeat(
            auto-fit,
            minmax(300px, 1fr)
        );

    gap: 20px;
}


/**
 * =========================================================
 * CARTE UNITÉ
 * =========================================================
 */

.vab-unit-card {
    position: relative;

    padding: 22px;

    border: 1px solid #ddd;

    background: #fff;

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        border-color 0.25s ease;
}

.vab-unit-card:hover {
    transform: translateY(-3px);

    border-color: #999;

    box-shadow:
        0 15px 35px rgba(0,0,0,0.08);
}


.vab-unit-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 15px;

    margin-bottom: 20px;
}

.vab-unit-card-header h4 {
    margin: 0;

    font-size: 1.05rem;
    line-height: 1.15;
}

.vab-unit-points {
    white-space: nowrap;

    font-size: 0.8rem;
    font-weight: 700;
}


/**
 * =========================================================
 * STATS
 * =========================================================
 */

.vab-unit-stats {
    display: grid;

    grid-template-columns:
        repeat(7, 1fr);

    gap: 5px;

    margin-bottom: 15px;
}

.vab-unit-stats > div {
    text-align: center;
}

.vab-unit-stats span {
    display: block;

    margin-bottom: 4px;

    font-size: 0.65rem;
    font-weight: 700;

    text-transform: uppercase;

    opacity: 0.5;
}

.vab-unit-stats strong {
    display: block;

    font-size: 0.85rem;
}


/**
 * =========================================================
 * RÈGLES SPÉCIALES
 * =========================================================
 */

.vab-unit-special {
    margin-bottom: 15px;
    padding: 8px 10px;

    background: #f2f2f2;

    font-size: 0.75rem;
    font-weight: 600;
}


/**
 * =========================================================
 * FOOTER CARTE
 * =========================================================
 */

.vab-unit-footer {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 15px;

    padding-top: 15px;

    border-top: 1px solid #eee;
}

.vab-unit-figures {
    font-size: 0.75rem;
    opacity: 0.6;
}


/**
 * =========================================================
 * QUANTITÉ
 * =========================================================
 */

.vab-quantity {
    display: flex;

    align-items: center;

    border: 1px solid #ccc;
}

.vab-quantity button {
    width: 34px;
    height: 32px;

    padding: 0;

    border: 0;

    background: #fff;

    font-size: 1.2rem;

    cursor: pointer;

    transition:
        background 0.2s ease,
        color 0.2s ease;
}

.vab-quantity button:hover {
    background: #222;
    color: #fff;
}

.vab-quantity-value {
    min-width: 34px;

    text-align: center;

    font-size: 0.85rem;
    font-weight: 700;
}


/**
 * =========================================================
 * RÉSUMÉ
 * =========================================================
 */

.vab-summary {
    max-width: none;

    position: sticky;
    top: 30px;

    align-self: start;
}

.vab-summary-inner {
    padding: 30px;

    background: #f4f1ea;

    border: 1px solid #ddd;
}

.vab-summary-header {
    margin-bottom: 30px;
}


/**
 * =========================================================
 * BUDGET
 * =========================================================
 */

.vab-budget {
    margin-bottom: 30px;
}

.vab-budget-top {
    display: flex;

    justify-content: space-between;
    align-items: center;

    margin-bottom: 10px;

    font-size: 0.85rem;
}

.vab-budget-top strong {
    font-size: 1.2rem;
}

.vab-progress {
    width: 100%;
    height: 6px;

    background: #ddd;

    overflow: hidden;
}

.vab-progress span {
    display: block;

    width: 0;
    height: 100%;

    background: #222;

    transition:
        width 0.3s ease;
}

.vab-progress-over span,
.vab-progress-over {
    background: #b33;
}

.vab-over-budget {
    color: #b33;
}


/**
 * =========================================================
 * STATISTIQUES RÉSUMÉ
 * =========================================================
 */

.vab-summary-stats {
    display: grid;

    grid-template-columns:
        repeat(2, 1fr);

    gap: 10px;

    margin-bottom: 30px;
}

.vab-summary-stats > div {
    padding: 15px;

    background: #fff;

    border: 1px solid #ddd;
}

.vab-summary-stats span {
    display: block;

    margin-bottom: 5px;

    font-size: 0.7rem;
    text-transform: uppercase;

    opacity: 0.55;
}

.vab-summary-stats strong {
    font-size: 1.3rem;
}


/**
 * =========================================================
 * LISTE SÉLECTIONNÉE
 * =========================================================
 */

.vab-selected-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.vab-empty {
    margin: 0;
    padding: 30px 15px;

    border: 1px dashed #bbb;

    text-align: center;

    font-size: 0.85rem;

    opacity: 0.6;
}


.vab-selected-unit {
    padding: 18px;

    background: #fff;

    border: 1px solid #ddd;
}


/**
 * =========================================================
 * UNITÉ SÉLECTIONNÉE — HEADER
 * =========================================================
 */

.vab-selected-unit-top {
    display: flex;

    align-items: flex-start;
    justify-content: space-between;

    gap: 15px;
}

.vab-selected-unit-name {
    display: flex;
    flex-direction: column;

    gap: 4px;
}

.vab-selected-unit-name strong {
    font-size: 1rem;
    line-height: 1.15;
}

.vab-selected-unit-name span {
    font-size: 0.7rem;

    opacity: 0.55;
}


/**
 * =========================================================
 * BOUTON X
 * =========================================================
 */

.vab-remove-unit {
    display: flex;

    align-items: center;
    justify-content: center;

    width: 28px;
    height: 28px;

    padding: 0;

    border: 0;

    background: transparent;

    color: #222;

    cursor: pointer;

    font-size: 1.6rem;
    font-weight: 300;

    line-height: 1;

    transition:
        transform 0.2s ease,
        opacity 0.2s ease;
}

.vab-remove-unit:hover {
    opacity: 0.6;

    transform: rotate(90deg);
}


/**
 * =========================================================
 * META UNITÉ
 * =========================================================
 */

.vab-selected-unit-meta {
    display: flex;

    align-items: center;
    justify-content: space-between;

    margin-top: 12px;

    padding-top: 10px;

    border-top: 1px solid #eee;

    font-size: 0.75rem;
}

.vab-selected-unit-meta span {
    opacity: 0.55;
}


/**
 * =========================================================
 * NOM PERSONNALISÉ
 * =========================================================
 */

.vab-selected-custom-name {
    margin-top: 10px;
}

.vab-selected-custom-name label {
    display: block;

    margin-bottom: 5px;

    font-size: 0.7rem;

    font-weight: 700;

    text-transform: uppercase;

    opacity: 0.6;
}

.vab-selected-custom-name input {
    width: 100%;
    max-width: 280px;

    padding: 8px 10px;

    border: 1px solid #ccc;

    background: #fff;

    box-sizing: border-box;

    font-family: inherit;

    font-size: 0.85rem;
}

.vab-selected-custom-name input:focus {
    outline: none;

    border-color: #999;
}


/**
 * =========================================================
 * BOUTONS
 * =========================================================
 */

.vab-summary-actions {
    display: grid;

    grid-template-columns:
        repeat(2, 1fr);

    gap: 10px;

    margin-top: 30px;
}

.vab-button {
    min-height: 44px;

    padding: 10px 15px;

    border: 1px solid #222;

    font-family: inherit;

    font-size: 0.75rem;
    font-weight: 700;

    text-transform: uppercase;

    cursor: pointer;

    transition:
        background 0.2s ease,
        color 0.2s ease;
}

.vab-button-primary {
    background: #222;
    color: #fff;
}

.vab-button-primary:hover {
    background: #555;
}

.vab-button-secondary {
    background: transparent;
    color: #222;
}

.vab-button-secondary:hover {
    background: #222;
    color: #fff;
}


/**
 * =========================================================
 * RESPONSIVE TABLETTE
 * =========================================================
 */

@media (max-width: 1200px) {

    .vab-content {
        grid-template-columns:
            minmax(0, 1fr) 340px;

        gap: 30px;
    }

    .vab-header-inner {
        align-items: flex-start;
        flex-direction: column;
    }

}


/**
 * =========================================================
 * RESPONSIVE MOBILE
 * =========================================================
 */

@media (max-width: 900px) {

    .vab-main {
        padding: 40px 20px;
    }

    .vab-header {
        padding: 30px 20px;
    }

    .vab-content {
        display: block;
    }

    .vab-summary {
        position: relative;
        top: auto;

        margin-top: 50px;
    }

    .vab-unit-grid {
        grid-template-columns:
            1fr;
    }

}


@media (max-width: 600px) {

    .vab-settings {
        width: 100%;

        display: grid;

        grid-template-columns:
            1fr 1fr;
    }

    .vab-list-name {
        grid-column: 1 / -1;
    }

    .vab-list-name input {
        width: 100%;
    }

    .vab-unit-stats {
        gap: 2px;
    }

    .vab-unit-stats strong {
        font-size: 0.75rem;
    }

    .vab-summary-actions {
        grid-template-columns:
            1fr;
    }

}


/**
 * =========================================================
 * IMPRESSION
 * =========================================================
 */

@media print {

    body {
        background: #fff !important;
    }

    .vab-header {
        background: #fff !important;
        color: #222 !important;
        padding: 20px 0;
    }

    .vab-settings,
    .vab-units-section,
    .vab-summary-actions {
        display: none !important;
    }

    .vab-main {
        padding: 0;
    }

    .vab-content {
        display: block;
    }

    .vab-summary {
        position: static;
        width: 100%;
    }

    .vab-summary-inner {
        padding: 0;

        border: 0;

        background: #fff;
    }

    .vab-selected-custom-name input {
        border: 0;
        padding-left: 0;
    }

}