.constello-tracking-card {
    margin: 30px 0;
    padding: 28px;
    border: 1px solid #dfe5e3;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .02);
}

.constello-tracking-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.constello-tracking-title {
    margin: 0;
    color: #131d2b;
    font-size: clamp(25px, 3vw, 34px);
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: -.02em;
}

.constello-tracking-status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 8px 14px;
    border-radius: 999px;
    background: #f3f5f5;
    color: #17304a;
    font-size: 14px;
    line-height: 1.2;
    font-weight: 700;
    white-space: nowrap;
}

.constello-tracking-card--delivered .constello-tracking-status-pill {
    background: #e7f4ef;
    color: #217052;
}

.constello-tracking-card--exception .constello-tracking-status-pill {
    background: #fff3e3;
    color: #9a5600;
}


.constello-tracking-progress {
    margin: 6px 0 24px;
    padding: 14px 2px 4px;
}

.constello-tracking-progress__rail {
    position: relative;
    height: 6px;
    margin: 0 11px;
    overflow: hidden;
    border-radius: 999px;
    background: #e4e9e8;
}

.constello-tracking-progress__fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #388983;
    transition: width .25s ease;
}

.constello-tracking-progress__steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    margin-top: -10px;
}

.constello-tracking-progress__step {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 0;
    color: #82909f;
    text-align: center;
}

.constello-tracking-progress__dot {
    width: 14px;
    height: 14px;
    border: 3px solid #fff;
    border-radius: 50%;
    background: #cbd4d2;
    box-shadow: 0 0 0 1px #d7dfdd;
}

.constello-tracking-progress__truck {
    position: relative;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 34px;
    margin-top: -10px;
    padding: 0 4px;
    background: transparent;
    filter: drop-shadow(0 2px 3px rgba(23, 48, 74, .18));
}

.constello-tracking-progress__truck img {
    display: block;
    width: 50px;
    height: auto;
    max-width: none;
}

.constello-tracking-progress__step.is-complete .constello-tracking-progress__dot,
.constello-tracking-progress__step.is-current .constello-tracking-progress__dot {
    background: #388983;
    box-shadow: 0 0 0 1px #388983;
}

.constello-tracking-progress__step.is-current .constello-tracking-progress__dot {
    width: 16px;
    height: 16px;
}

.constello-tracking-progress__label {
    max-width: 145px;
    padding: 0 4px;
    font-size: 12px;
    line-height: 1.3;
    font-weight: 650;
}

.constello-tracking-progress__step.is-complete,
.constello-tracking-progress__step.is-current {
    color: #21374b;
}

.constello-tracking-details {
    margin: 0;
    padding: 0;
}

.constello-tracking-details__row {
    display: grid;
    grid-template-columns: minmax(170px, 240px) 1fr;
    gap: 20px;
    align-items: center;
    margin: 0;
    padding: 14px 0;
    border-bottom: 1px solid #e8eceb;
}

.constello-tracking-details__row:first-child {
    border-top: 0;
}

.constello-tracking-details__row dt,
.constello-tracking-details__row dd {
    margin: 0;
}

.constello-tracking-details__row dt {
    color: #172033;
    font-size: 16px;
    font-weight: 700;
}

.constello-tracking-details__row dd {
    min-width: 0;
    color: #16243a;
    font-size: 16px;
    line-height: 1.45;
}

.constello-tracking-details__row--delivery {
    background: linear-gradient(90deg, rgba(56, 137, 131, .06), rgba(56, 137, 131, 0));
}

.constello-tracking-details__row--delivery dd strong {
    color: #2d7e79;
}

.constello-tracking-carrier-source {
    display: block;
    margin-top: 3px;
    color: #78899c;
    font-size: 12px;
    font-weight: 400;
}

.constello-tracking-carrier-inline {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.constello-tracking-carrier-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 28px;
    flex: 0 0 auto;
    border-radius: 5px;
    font-size: 10px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: -.02em;
}

.constello-tracking-carrier-mark--carrier_1 {
    border: 1px solid #e9cb00;
    background: #ffdc00;
    color: #111;
}

.constello-tracking-carrier-mark--carrier_2 {
    border: 1px solid #0a4a90;
    background: #0d57a7;
    color: #fff;
}

.constello-tracking-number {
    color: #2d7e79;
    font-weight: 600;
    text-decoration: none;
    word-break: break-word;
}

.constello-tracking-number:hover,
.constello-tracking-number:focus {
    color: #245f5b;
    text-decoration: underline;
}

.constello-tracking-latest {
    display: grid;
    gap: 5px;
    margin-top: 18px;
    padding: 15px 17px;
    border: 1px solid #e3e9e7;
    border-radius: 10px;
    background: #f7faf9;
    color: #52657a;
    font-size: 14px;
    line-height: 1.5;
}

.constello-tracking-latest__time {
    color: #8493a2;
    font-size: 12px;
    line-height: 1.4;
}

.constello-tracking-latest strong {
    color: #172033;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .02em;
}

.constello-tracking-actions {
    margin-top: 22px;
}

.constello-tracking-button.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 13px 24px;
    border: 0;
    border-radius: 999px;
    background: #388983;
    color: #fff;
    font-size: 15px;
    line-height: 1.2;
    font-weight: 800;
    text-transform: uppercase;
    text-decoration: none;
    box-shadow: none;
}

.constello-tracking-button.button:hover,
.constello-tracking-button.button:focus {
    background: #2d746f;
    color: #fff;
}

.constello-tracking-form {
    max-width: 620px;
    padding: 22px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
}

.constello-tracking-form label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
}

.constello-tracking-form input {
    width: 100%;
}

.constello-tracking-message {
    margin-top: 20px;
}

@media (max-width: 700px) {
    .constello-tracking-card {
        padding: 22px 18px;
        border-radius: 13px;
    }

    .constello-tracking-card__header {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }


    .constello-tracking-progress {
        margin-bottom: 20px;
        padding-left: 0;
        padding-right: 0;
    }

    .constello-tracking-progress__label {
        font-size: 10px;
    }

    .constello-tracking-details__row {
        grid-template-columns: 1fr;
        gap: 5px;
        padding: 13px 0;
    }

    .constello-tracking-actions .constello-tracking-button.button {
        width: 100%;
    }
}

/* -------------------------------------------------------------------------
 * Page détail de commande — adresses et documents de facturation
 * ---------------------------------------------------------------------- */
.woocommerce-customer-details .constello-addresses-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.woocommerce-customer-details .constello-address-card {
    min-width: 0;
    margin: 0 !important;
    padding: 24px 26px !important;
    border: 1px solid #dfe7e4;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .025);
}

.woocommerce-customer-details .constello-address-card > h2,
.woocommerce-customer-details .constello-address-card > h3,
.woocommerce-customer-details .constello-address-card .woocommerce-column__title {
    margin: 0 0 18px !important;
    padding: 0 0 14px;
    border-bottom: 1px solid #e7ecea;
}

.woocommerce-customer-details .constello-address-card address {
    margin: 0;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    line-height: 1.75;
}

.constello-invoice-heading {
    margin-bottom: 14px !important;
}

.constello-document-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 0 0 24px !important;
    padding: 0;
}

.constello-document-link-wrap {
    display: contents;
}

.constello-document-icon-link {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    padding: 0 !important;
    margin: 0 !important;
    border: 1px solid #d5e2de !important;
    border-radius: 13px;
    background: #f6faf8 !important;
    color: #2f817b !important;
    text-decoration: none !important;
    box-shadow: none !important;
    line-height: 1 !important;
    transition: background-color .18s ease, border-color .18s ease, transform .18s ease;
}

.constello-document-icon-link--invoice {
    background: #f1f8f5 !important;
}

.constello-document-icon-link--terms {
    background: #f7f8fa !important;
    color: #355a70 !important;
    border-color: #dbe2e7 !important;
}

.constello-document-icon-link:hover,
.constello-document-icon-link:focus {
    border-color: #9fc4bd !important;
    background: #edf7f3 !important;
    color: #256a65 !important;
    transform: translateY(-1px);
    outline: none;
}

.constello-document-icon-link--terms:hover,
.constello-document-icon-link--terms:focus {
    border-color: #b7c9d4 !important;
    background: #f0f4f6 !important;
    color: #294c61 !important;
}

.constello-document-icon-link:focus-visible {
    box-shadow: 0 0 0 3px rgba(56, 137, 131, .18) !important;
}

.constello-document-icon {
    display: inline-flex;
    width: 25px;
    height: 25px;
}

.constello-document-icon svg {
    display: block;
    width: 100%;
    height: 100%;
}

@media (max-width: 700px) {
    .woocommerce-customer-details .constello-addresses-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .woocommerce-customer-details .constello-address-card {
        padding: 20px !important;
        border-radius: 13px;
    }
}

/* -------------------------------------------------------------------------
 * Mon compte WooCommerce — navigation active
 * ---------------------------------------------------------------------- */
.woocommerce-account .woocommerce-MyAccount-navigation li.is-active > a,
.woocommerce-account .woocommerce-MyAccount-navigation li.current-menu-item > a,
.woocommerce-account .woocommerce-MyAccount-navigation li.is-current > a {
    background-color: #388983 !important;
    border-color: #388983 !important;
    color: #ffffff !important;
}

.woocommerce-account .woocommerce-MyAccount-navigation li.is-active > a:hover,
.woocommerce-account .woocommerce-MyAccount-navigation li.is-active > a:focus,
.woocommerce-account .woocommerce-MyAccount-navigation li.current-menu-item > a:hover,
.woocommerce-account .woocommerce-MyAccount-navigation li.current-menu-item > a:focus,
.woocommerce-account .woocommerce-MyAccount-navigation li.is-current > a:hover,
.woocommerce-account .woocommerce-MyAccount-navigation li.is-current > a:focus {
    background-color: #2f7772 !important;
    border-color: #2f7772 !important;
    color: #ffffff !important;
}


/* -------------------------------------------------------------------------
 * Recherche publique [constello_tracking_lookup]
 * ---------------------------------------------------------------------- */
.constello-tracking-public-lookup .constello-tracking-lookup-form__row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: stretch;
    width: 100%;
}

.constello-tracking-public-lookup .constello-tracking-lookup-form__row > input[type="text"] {
    width: 100% !important;
    min-width: 0;
    margin: 0 !important;
}

.constello-tracking-public-lookup .constello-tracking-lookup-form__button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 230px;
    height: 100%;
    margin: 0 !important;
    white-space: nowrap;
}

@media (max-width: 700px) {
    .constello-tracking-public-lookup .constello-tracking-lookup-form__row {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .constello-tracking-public-lookup .constello-tracking-lookup-form__button {
        width: 100%;
        min-width: 0;
    }
}

/* v0.7.22 — formulaire public : états du bouton et messages de recherche */
.constello-tracking-public-lookup .constello-tracking-lookup-form__button {
    background: #3a8580 !important;
    border-color: #3a8580 !important;
    color: #ffffff !important;
    transition: background-color .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease;
}

.constello-tracking-public-lookup .constello-tracking-lookup-form__button:hover {
    background: #32746f !important;
    border-color: #32746f !important;
    color: #ffffff !important;
}

.constello-tracking-public-lookup .constello-tracking-lookup-form__button:active,
.constello-tracking-public-lookup .constello-tracking-lookup-form__button:focus,
.constello-tracking-public-lookup .constello-tracking-lookup-form__button:focus-visible {
    background: #dcebe8 !important;
    border-color: #3a8580 !important;
    color: #1c3a52 !important;
    box-shadow: 0 0 0 3px rgba(58, 133, 128, .16) !important;
    outline: none !important;
}

.constello-tracking-public-lookup .constello-tracking-message {
    margin: 18px 0 0;
    padding: 14px 16px;
    border: 1px solid #dbe6e0;
    border-left-width: 4px;
    border-radius: 10px;
    background: #f5f9f7;
    color: #1c3a52;
    line-height: 1.5;
}

.constello-tracking-public-lookup .constello-tracking-message--warning {
    border-color: #ead8a5;
    border-left-color: #d9a82e;
    background: #fffaf0;
}

.constello-tracking-public-lookup .constello-tracking-message--error {
    border-color: #efd0c8;
    border-left-color: #c9522f;
    background: #fff5f2;
}

.constello-tracking-public-lookup .constello-tracking-message--info {
    border-left-color: #3a8580;
}
