:root {
    --po-green: #1e7a3c;
    --po-green-2: #2fa85c;
    --po-green-dark: #14602a;
    --po-green-soft: #eaf6ee;
    --po-ink: #1c2b22;
    --po-muted: #5f6f65;
    --po-line: #e2ece6;
    --po-bg: #f2f6f3;
    --po-radius: 18px;
    --po-shadow: 0 10px 30px rgba(20, 60, 35, .10);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0
}

html {
    -webkit-text-size-adjust: 100%
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--po-bg);
    color: var(--po-ink);
    line-height: 1.55;
}

/* ---- Hero ---- */
.po-hero {
    background: linear-gradient(140deg, var(--po-green) 0%, var(--po-green-2) 100%);
    color: #fff;
    text-align: center;
    padding: 44px 20px 92px;
}

.po-badge {
    display: inline-block;
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .4);
    padding: 7px 16px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: .6px;
    text-transform: uppercase;
    margin-bottom: 18px;
}

.po-title {
    font-size: clamp(22px, 5vw, 32px);
    font-weight: 800;
    line-height: 1.25;
    max-width: 620px;
    margin: 0 auto
}

.po-subtitle {
    margin-top: 10px;
    font-size: 15px;
    opacity: .94
}

.po-subtitle a {
    color: #fff;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px
}

/* ---- Conteneur ---- */
.po-wrap {
    max-width: 680px;
    margin: -56px auto 0;
    padding: 0 16px 48px;
    position: relative
}

/* ---- Cartes ---- */
.po-card {
    background: #fff;
    border-radius: var(--po-radius);
    border: 1px solid var(--po-line);
    box-shadow: var(--po-shadow);
    padding: 22px;
    margin-bottom: 20px;
}

.po-card-title {
    font-size: 17px;
    font-weight: 800;
    margin-bottom: 10px
}

.po-empty p {
    color: var(--po-muted);
    font-size: 15px
}

/* ---- Produit ---- */
.po-product-card {
    display: flex;
    gap: 18px;
    padding: 18px
}

.po-product-media {
    flex: 0 0 150px;
    border-radius: 14px;
    overflow: hidden;
    background: var(--po-green-soft)
}

.po-product-media img {
    width: 100%;
    height: 100%;
    min-height: 150px;
    object-fit: cover;
    display: block
}

.po-product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px
}

.po-price {
    font-size: 22px;
    font-weight: 800;
    color: var(--po-green)
}

.po-desc {
    font-size: 14px;
    color: var(--po-muted)
}

.po-btn {
    margin-top: auto;
    align-self: flex-start;
    background: var(--po-green);
    color: #fff !important;
    text-decoration: none;
    padding: 11px 20px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 14px;
    transition: background .2s, transform .2s;
}

.po-btn:hover {
    background: var(--po-green-dark);
    transform: translateY(-1px)
}

/* ---- Grille traçabilité ---- */
.po-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
    margin-top: 6px
}

.po-cell {
    background: var(--po-green-soft);
    border: 1px solid var(--po-line);
    border-radius: 14px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.po-cell-icon {
    font-size: 18px
}

.po-cell-label {
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: var(--po-muted);
    font-weight: 700
}

.po-cell-value {
    font-size: 15.5px;
    font-weight: 600;
    word-break: break-word
}

.po-block {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px dashed var(--po-line)
}

.po-block h3 {
    font-size: 14.5px;
    font-weight: 800;
    margin-bottom: 6px
}

.po-block p {
    font-size: 14.5px
}

/* ---- Vendeur ---- */
.po-vendor {
    display: flex;
    align-items: center;
    gap: 14px
}

.po-vendor img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--po-green-soft);
    flex-shrink: 0
}

.po-vendor-info {
    display: flex;
    flex-direction: column;
    gap: 2px
}

.po-vendor-name {
    font-weight: 800;
    font-size: 16px
}

.po-vendor-meta {
    font-size: 13px;
    color: var(--po-muted)
}

.po-vendor-link {
    font-size: 13.5px;
    color: var(--po-green);
    font-weight: 700;
    text-decoration: none
}

.po-vendor-link:hover {
    text-decoration: underline
}

/* ---- Footer ---- */
.po-footer {
    text-align: center;
    font-size: 12.5px;
    color: var(--po-muted)
}

/* ---- Mobile ---- */
@media (max-width:480px) {
    .po-product-card {
        flex-direction: column
    }

    .po-product-media {
        flex: none;
        height: 200px
    }

    .po-product-media img {
        height: 100%
    }

    .po-btn {
        align-self: stretch;
        text-align: center
    }
}

/* ---- Statuts de certification ---- */
.po-status-badge{display:inline-flex;align-items:center;gap:6px;padding:6px 14px;border-radius:999px;font-weight:700;font-size:13.5px}
.po-status--en_cours{background:#fff7e0;color:#8a6d1a;border:1px solid #ecd9a0}
.po-status--validee{background:#e5f6ea;color:#14602a;border:1px solid #bfe6cb}
.po-status--refusee{background:#fdeaea;color:#8f2323;border:1px solid #f0c4c4}

/* ---- Timeline traçabilité ---- */
.po-timeline{list-style:none;margin:14px 0 0;padding:0}
.po-timeline li{position:relative;padding:0 0 14px 24px;border-left:2px solid #e2ece6;margin-left:8px}
.po-timeline li:last-child{border-left-color:transparent;padding-bottom:2px}
.po-timeline li::before{content:"";position:absolute;left:-7px;top:3px;width:10px;height:10px;border-radius:50%;background:#1e7a3c;border:2px solid #fff;box-shadow:0 0 0 2px #e2ece6}
.po-timeline-time{display:block;font-size:11px;color:#5f6f65;text-transform:uppercase;letter-spacing:.5px}
.po-timeline-msg{font-size:14px;font-weight:600;color:#1c2b22}

/* ---- Identifiant ---- */
.po-trace-id{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;background:#f2f6f3;border:1px dashed #c9dcd0;border-radius:10px;padding:8px 14px;display:inline-block;font-weight:700;letter-spacing:1px}

/* ---- Lecture seule (Dokan) ---- */
.po-readonly-box{background:#f7faf8;border:1px dashed #d5e3da;border-radius:8px;padding:10px 12px;font-size:14px;margin-bottom:10px}