/* Végétalisation — sous-pages (embase, câbles, etc.) */

.veg-page-section {
    padding-top: 44px;
    padding-bottom: 48px;
}

.veg-page-section > h1 {
    font-size: 2rem;
    margin: 0 0 16px;
    line-height: 1.25;
}

.veg-detail-header {
    margin: 0 0 20px;
}

.veg-back-btn {
    display: inline-block;
    border: 1px solid #d8d8d8;
    background: #fff;
    color: #444 !important;
    border-radius: 999px;
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none !important;
    transition: border-color 0.2s, color 0.2s;
}

.veg-back-btn:hover {
    border-color: var(--green-logo, #64b446);
    color: var(--green-logo, #64b446);
}

/* Intro image + texte — desktop */
@media (min-width: 993px) {
    .veg-embase-intro,
    .veg-cables-intro {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .veg-embase-intro-photo,
    .veg-cables-intro-photo {
        justify-self: start;
    }
}

.veg-embase-intro,
.veg-cables-intro {
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
    align-items: center;
    margin: 0 0 28px;
}

.veg-embase-intro-photo,
.veg-cables-intro-photo {
    width: auto;
    max-width: min(300px, 100%);
}

.veg-embase-intro-photo img,
.veg-cables-intro-photo img {
    display: block;
    width: auto;
    height: auto;
    max-width: min(280px, 100%);
    max-height: 220px;
    object-fit: contain;
    margin: 0 auto;
}

.veg-embase-intro-text h2,
.veg-cables-intro-text h2 {
    font-size: 1.35rem;
    margin: 0 0 12px;
    padding-left: 16px;
    border-left: 4px solid var(--green-logo, #64b446);
    line-height: 1.35;
    color: var(--anthracite, #333);
}

.veg-embase-intro-text p,
.veg-cables-intro-text p {
    margin: 0;
    color: #555;
    font-size: 0.95rem;
    line-height: 1.55;
    max-width: 65ch;
}

.veg-cables-spec-badge {
    display: inline-block;
    margin-top: 12px;
    padding: 6px 12px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #3d5a45;
    background: #eef6ea;
    border-radius: 999px;
}

/* Tableau embase */
.tendeur-catalog-table.veg-embase-table {
    min-width: 760px;
}

.veg-embase-table .tendeur-photo-cell {
    width: 96px;
    vertical-align: middle;
}

.veg-embase-table .tendeur-photo-slot {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
}

.veg-embase-table .tendeur-photo-slot img,
.veg-embase-table .tendeur-photo-slot .tendeur-photo-img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 80px;
    max-height: 80px;
    object-fit: contain;
}

.veg-embase-table .tendeur-col-ref {
    min-width: 118px;
    white-space: normal;
    word-break: normal;
    vertical-align: middle;
}

.veg-embase-table .tendeur-col-nom {
    min-width: min(360px, 50vw);
    max-width: 480px;
    white-space: normal;
    word-break: normal;
    vertical-align: middle;
}

.veg-embase-table .tendeur-col-nom strong {
    display: block;
    margin-bottom: 4px;
}

.veg-embase-qty-cell {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.veg-embase-qty-input {
    width: 3.2rem;
    padding: 6px 8px;
    border: 1px solid #dcdcdc;
    border-radius: 6px;
    font-size: 0.88rem;
    text-align: center;
}

.veg-embase-qty-input:focus {
    outline: none;
    border-color: var(--green-logo, #64b446);
    box-shadow: 0 0 0 3px rgba(100, 180, 70, 0.2);
}

.veg-embase-qty-suffix {
    font-size: 0.82rem;
    color: #666;
}

.veg-embase-table .tendeur-col-nom span {
    display: block;
    font-size: 0.82rem;
    color: #666;
    font-weight: 400;
    margin-top: 4px;
}

@media (max-width: 992px) {
    .veg-page-section {
        padding-top: 28px;
        padding-bottom: 36px;
    }

    .veg-page-section > h1 {
        font-size: 1.45rem;
        margin-bottom: 12px;
    }

    .veg-page-section > .section-intro {
        font-size: 0.9rem;
        line-height: 1.5;
        margin-bottom: 20px;
    }

    .veg-back-btn {
        display: block;
        width: 100%;
        box-sizing: border-box;
        text-align: center;
        min-height: 44px;
        line-height: 1.25;
        padding-top: 12px;
        padding-bottom: 12px;
    }

    .veg-embase-intro,
    .veg-cables-intro {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-bottom: 22px;
    }

    .veg-embase-intro-photo,
    .veg-cables-intro-photo {
        max-width: min(200px, 72vw);
        margin: 0 auto;
        justify-self: center;
    }

    .veg-embase-intro-photo img,
    .veg-cables-intro-photo img {
        max-height: 180px;
        margin: 0 auto;
    }

    .veg-embase-intro-text h2,
    .veg-cables-intro-text h2 {
        font-size: 1.12rem;
        padding-left: 12px;
    }

    .veg-embase-intro-text p,
    .veg-cables-intro-text p {
        font-size: 0.9rem;
        max-width: none;
    }

    /* Tableau embase → cartes empilées (plus de scroll horizontal) */
    .veg-embase-scroll {
        border: none;
        overflow: visible;
        background: transparent;
        box-shadow: none;
        border-radius: 0;
    }

    .veg-embase-scroll::after {
        display: none !important;
    }

    .tendeur-catalog-table.veg-embase-table {
        min-width: 0;
        display: block;
        width: 100%;
        font-size: 0.88rem;
    }

    .veg-embase-table thead {
        display: none;
    }

    .veg-embase-table tbody {
        display: flex;
        flex-direction: column;
        gap: 14px;
    }

    .veg-embase-table tbody tr {
        display: grid;
        grid-template-columns: 64px 1fr;
        grid-template-areas:
            "photo ref"
            "photo nom"
            "mat mat"
            "qty qty"
            "action action";
        gap: 8px 12px;
        padding: 14px;
        border: 1px solid #e4e4e4;
        border-radius: 12px;
        background: #fff;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    }

    .veg-embase-table tbody tr:hover {
        background: #fff;
    }

    .veg-embase-table tbody td {
        padding: 0 !important;
        border: none !important;
        vertical-align: top;
    }

    .veg-embase-table .tendeur-photo-cell {
        grid-area: photo;
        width: auto;
        align-self: start;
    }

    .veg-embase-table .tendeur-photo-slot {
        width: 64px;
        height: 64px;
    }

    .veg-embase-table .tendeur-photo-slot img,
    .veg-embase-table .tendeur-photo-slot .tendeur-photo-img {
        position: static;
        max-width: 64px;
        max-height: 64px;
    }

    .veg-embase-table .tendeur-col-ref {
        grid-area: ref;
        min-width: 0;
        font-size: 0.72rem;
        color: #777;
        letter-spacing: 0.02em;
        align-self: end;
        white-space: normal;
    }

    .veg-embase-table .tendeur-col-nom {
        grid-area: nom;
        min-width: 0;
        max-width: none;
        align-self: start;
    }

    .veg-embase-table .tendeur-col-nom strong {
        font-size: 0.95rem;
        line-height: 1.3;
    }

    .veg-embase-table .tendeur-col-nom span {
        font-size: 0.8rem;
        line-height: 1.45;
        margin-top: 6px;
    }

    .veg-embase-table .veg-embase-cell-matiere {
        grid-area: mat;
        grid-column: 1 / -1;
        font-size: 0.82rem;
        color: #555;
        padding-top: 10px !important;
        margin-top: 4px;
        border-top: 1px solid #eee !important;
    }

    .veg-embase-table .veg-embase-cell-matiere::before {
        content: attr(data-label);
        display: inline-block;
        font-weight: 600;
        color: #333;
        margin-right: 6px;
        font-size: 0.72rem;
        text-transform: uppercase;
        letter-spacing: 0.03em;
    }

    .veg-embase-table .veg-embase-cell-unite {
        display: none;
    }

    .veg-embase-table .veg-embase-qty-cell {
        grid-area: qty;
        grid-column: 1 / -1;
        align-items: center;
        padding-top: 4px !important;
    }

    .veg-embase-table .veg-embase-qty-cell::before {
        content: attr(data-label);
        font-weight: 600;
        font-size: 0.72rem;
        text-transform: uppercase;
        letter-spacing: 0.03em;
        color: #333;
        margin-right: 10px;
        flex-shrink: 0;
    }

    .veg-embase-table .veg-embase-qty-input {
        width: 4rem;
        min-height: 44px;
        font-size: 1rem;
    }

    .veg-embase-table .veg-embase-cell-action {
        grid-area: action;
        grid-column: 1 / -1;
    }

    .veg-embase-table .veg-embase-cell-action .add-quote-btn {
        width: 100%;
        display: block;
        text-align: center;
        box-sizing: border-box;
    }

    .veg-embase-table th:last-child,
    .veg-embase-table td:last-child {
        position: static !important;
        box-shadow: none !important;
        background: transparent !important;
    }
}
