/* ===================================================================
   site.css — Styles globaux COLIVIAS
   Charte : bleu marine · bleu · orange · blanc (logo + cachet client)
   Remplace entièrement l'ancien site.css (chargé via _Layout.cshtml avec
   asp-append-version="true" pour le cache-busting).
=================================================================== */

html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem rgba(11, 92, 192, .55);
}

html {
    position: relative;
    min-height: 100%;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* ── JETONS DE COULEUR ──────────────────────────────────────────────
   Valeurs échantillonnées sur le logo et le cachet Colivias.
   Les noms --pt-* sont conservés (alias) pour ne rien casser.        */
:root {
    --cv-navy-deep: #021C4A;   /* fonds sombres (footer, dégradés) */
    --cv-navy:      #032A6B;   /* titres, structure */
    --cv-blue:      #0B5CC0;   /* liens, focus, icônes */
    --cv-orange:    #FF6A00;   /* actions principales, accents */
    --cv-orange-hv: #E85F00;   /* orange au survol */
    --cv-orange-ink:#C24E00;   /* orange utilisé comme TEXTE sur blanc (4,8:1) */
    --cv-ice:       #F3F7FC;   /* fond des pages */
    --cv-tint:      #EAF1FB;   /* fonds de puces, en-têtes de tableau */
    --cv-line:      #DDE5F0;   /* bordures */
    --cv-ink:       #13233F;   /* texte courant */
    --cv-muted:     #5B6B85;   /* texte secondaire */

    --pt-navy: var(--cv-navy);
    --pt-blue: var(--cv-blue);
    --pt-steel: #3A4F7A;
    --pt-gray: var(--cv-muted);
    --pt-light: var(--cv-ice);
    --pt-white: #FFFFFF;
    --pt-border: var(--cv-line);
    --pt-red: #B3261E;          /* rouge = erreur / danger uniquement */
    --pt-shadow: 0 4px 24px rgba(3,42,107,0.10);
    --pt-shadow-lg: 0 8px 40px rgba(3,42,107,0.16);

    /* Bootstrap : liens, outline-primary, focus... */
    --bs-primary: #0B5CC0;
    --bs-primary-rgb: 11, 92, 192;
    --bs-link-color: #0B5CC0;
    --bs-link-color-rgb: 11, 92, 192;
    --bs-link-hover-color: #032A6B;
    --bs-link-hover-color-rgb: 3, 42, 107;
    --bs-body-color: #13233F;
    --bs-border-color: #DDE5F0;
}

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

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--cv-ice);
    color: var(--cv-ink);
    font-size: 15px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1 0 auto;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
}

code {
    color: var(--cv-navy);
    background: var(--cv-tint);
    padding: 2px 6px;
    border-radius: 6px;
    font-size: .85em;
}

/* Motif signature : la route en pointillés du logo */
.cv-road {
    height: 4px;
    background: repeating-linear-gradient(90deg, var(--cv-orange) 0 28px, transparent 28px 44px);
}

/* ── BOUTONS ──
   Action principale = orange avec texte marine (le blanc sur cet orange
   n'a qu'un contraste de 2,9:1 ; le marine donne 4,7:1).               */
.btn.btn-primary,
.btn.btn-warning {
    background-color: var(--cv-orange);
    border-color: var(--cv-orange);
    color: var(--cv-navy);
    font-weight: 700;
}

    .btn.btn-primary:hover, .btn.btn-primary:focus,
    .btn.btn-warning:hover, .btn.btn-warning:focus {
        background-color: var(--cv-orange-hv);
        border-color: var(--cv-orange-hv);
        color: var(--cv-navy-deep);
    }

    .btn.btn-primary:active, .btn.btn-primary.active,
    .btn.btn-warning:active, .btn.btn-warning.active {
        background-color: #D45500;
        border-color: #D45500;
        color: var(--cv-navy-deep);
    }

.btn.btn-outline-primary {
    color: var(--cv-blue);
    border-color: var(--cv-blue);
}

    .btn.btn-outline-primary:hover, .btn.btn-outline-primary:focus {
        background: var(--cv-blue);
        border-color: var(--cv-blue);
        color: #fff;
    }

.btn.btn-outline-warning {
    color: var(--cv-orange-ink);
    border-color: var(--cv-orange);
}

    .btn.btn-outline-warning:hover, .btn.btn-outline-warning:focus,
    .btn-check:checked + .btn.btn-outline-warning {
        background: var(--cv-orange);
        border-color: var(--cv-orange);
        color: var(--cv-navy);
    }

/* ── FORMULAIRES ── */
.form-control:focus, .form-select:focus {
    border-color: var(--cv-blue);
}

.form-check-input:checked {
    background-color: var(--cv-blue);
    border-color: var(--cv-blue);
}

/* ── CARTES & TABLEAUX (Bootstrap) ── */
.card {
    border-radius: 14px;
}

    .card.shadow-sm {
        box-shadow: 0 2px 10px rgba(3,42,107,.07) !important;
    }

.card-header:first-child {
    border-radius: 14px 14px 0 0;
}

thead.table-light {
    --bs-table-bg: var(--cv-tint);
    --bs-table-color: var(--cv-navy);
    --bs-table-border-color: var(--cv-line);
}

.table-hover > tbody > tr:hover > * {
    --bs-table-hover-bg: rgba(11,92,192,.05);
}

/* ── NAVBAR ── */
.pt-navbar {
    background: var(--pt-white);
    border-bottom: 3px solid var(--cv-orange);
    box-shadow: 0 2px 16px rgba(3,42,107,0.08);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.pt-logo {
    height: 52px;
    width: auto;
    object-fit: contain;
}

.pt-nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}

    .pt-nav-links a,
    .pt-nav-links .pt-nav-btn {
        text-decoration: none;
        color: var(--pt-navy);
        font-family: inherit;
        font-weight: 500;
        font-size: 14px;
        padding: 8px 16px;
        border: 0;
        background: none;
        border-radius: 8px;
        transition: all .2s;
        display: flex;
        align-items: center;
        gap: 6px;
        cursor: pointer;
        white-space: nowrap;
    }

        .pt-nav-links a:hover,
        .pt-nav-links .pt-nav-btn:hover {
            background: var(--cv-tint);
            color: var(--pt-blue);
        }

    /* Liens réservés au Super Admin */
    .pt-nav-links a.pt-nav-super {
        color: var(--cv-orange-ink);
        font-weight: 600;
    }

        .pt-nav-links a.pt-nav-super:hover {
            background: #FFF1E6;
            color: var(--cv-orange-ink);
        }

    .pt-nav-links .btn-admin {
        background: var(--pt-navy);
        color: white !important;
        border-radius: 8px;
        padding: 8px 18px;
    }

        .pt-nav-links .btn-admin:hover {
            background: var(--cv-orange) !important;
            color: var(--cv-navy) !important;
        }

    .pt-nav-links .btn-logout {
        background: #FEF2F2;
        color: var(--pt-red) !important;
        border: 1px solid #FECACA;
        border-radius: 8px;
        padding: 8px 14px;
    }

        .pt-nav-links .btn-logout:hover {
            background: var(--pt-red) !important;
            color: white !important;
        }

.pt-user-chip {
    background: var(--cv-tint);
    border: 1px solid var(--pt-border);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 13px;
    color: var(--cv-navy);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ── ALERTES (succès / erreur) ── */
.pt-alert {
    background: #EAF7F0;
    border: none;
    border-left: 4px solid #1E7B4B;
    border-radius: 0;
    color: #14532D;
    padding: 12px 24px;
    font-size: 14px;
}

    .pt-alert.pt-alert-error {
        background: #FEF2F2;
        border-left-color: var(--pt-red);
        color: #8F1D17;
    }

/* ── BADGES STATUT ── */
.badge[class*="badge-"] {
    font-weight: 600;
    letter-spacing: .2px;
}

.badge-EN_PREPARATION {
    background: #5B6B85;
    color: #fff;
}

.badge-EXPEDIE,
.badge-EN_EXPEDITION {
    background: #0B5CC0;
    color: #fff;
}

.badge-EN_TRANSIT {
    background: #FF6A00;
    color: #032A6B;
}

.badge-EN_DOUANE {
    background: #B45309;
    color: #fff;
}

.badge-EN_LIVRAISON {
    background: #032A6B;
    color: #fff;
}

.badge-LIVRE {
    background: #1E7B4B;
    color: #fff;
}

.badge-ECHEC {
    background: #B3261E;
    color: #fff;
}

/* ── TIMELINE ── */
.timeline {
    position: relative;
    padding-left: 2rem;
}

    .timeline::before {
        content: '';
        position: absolute;
        left: .6rem;
        top: 0;
        width: 2px;
        height: 100%;
        background: var(--cv-line);
    }

.timeline-item {
    position: relative;
    margin-bottom: 1.5rem;
}

.timeline-dot {
    position: absolute;
    left: -1.9rem;
    top: .25rem;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--pt-blue);
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px var(--pt-blue);
}

    /* Dernière étape en date : orange, comme le sillage du camion du logo */
    .timeline-dot.active {
        background: var(--cv-orange);
        box-shadow: 0 0 0 2px var(--cv-orange);
    }

/* ── CARTE ── */
#carte {
    height: 380px;
    border-radius: 12px;
    z-index: 1;
}

/* ── CARDS ── */
.pt-card {
    background: white;
    border: 1px solid var(--pt-border);
    border-radius: 16px;
    box-shadow: var(--pt-shadow);
    overflow: hidden;
}

.pt-card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--pt-border);
    font-weight: 600;
    font-size: 14px;
    color: var(--pt-navy);
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
}

.pt-card-body {
    padding: 20px;
}

/* ── STAT CARD ──
   Le dashboard fixe la couleur de la bande gauche en ligne (border-left-color) ;
   on impose ici l'épaisseur et le style pour qu'elle soit visible.          */
.stat-card {
    background: white;
    border: 1px solid var(--pt-border);
    border-left: 4px solid var(--pt-blue) !important;
    border-radius: 14px;
    padding: 12px 20px;
    box-shadow: var(--pt-shadow);
    transition: transform .2s, box-shadow .2s;
}

    .stat-card:hover {
        transform: translateY(-2px);
        box-shadow: var(--pt-shadow-lg);
    }

/* ── FOOTER ── */
.pt-footer {
    background: var(--cv-navy-deep);
    color: rgba(255,255,255,0.72);
    padding: 0 0 24px;
    margin-top: auto;
    font-size: 13px;
}

    .pt-footer .cv-road {
        margin-bottom: 24px;
    }

    .pt-footer a {
        color: rgba(255,255,255,0.6);
        text-decoration: none;
    }

    .pt-footer .footer-logo {
        height: 56px;
        width: auto;
        border-radius: 50%;
        background: #fff;
    }

.pt-footer-name {
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: .3px;
}

/* ── BOUTON « COPIER LE TRACKING » (confirmation) ── */
.btn-copy-tracking.btn-copy-success {
    color: #fff !important;
    background-color: #1E7B4B !important;
    border-color: #1E7B4B !important;
}

.pt-navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    max-width: 1600px;
    margin: 0 auto;
    padding-left: 24px;
    padding-right: 24px;
}

.pt-nav-toggler {
    display: none;
    background: none;
    border: none;
    font-size: 1.7rem;
    color: var(--pt-navy);
    cursor: pointer;
    padding: 6px 8px;
    line-height: 1;
    order: 2;
}

.pt-nav-collapse {
    order: 3;
}
/* Sur desktop large, le menu doit toujours être visible : on ignore l'état
   collapse/show de Bootstrap (qui ne sert que sous 1200px, piloté par le burger) */
@media (min-width: 1200px) {
    .pt-nav-collapse.collapse:not(.show) {
        display: block !important;
    }
}

.pt-user-chip {
    max-width: 220px;
}

.pt-user-chip-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── RESPONSIVE NAVBAR (burger < 1200px) ── */
@media (max-width: 1199.98px) {
    .pt-navbar-inner {
        flex-wrap: wrap;
        height: auto;
        min-height: 60px;
        padding-top: 8px;
        padding-bottom: 8px;
    }

    .pt-logo-link {
        order: 1;
    }

    .pt-logo {
        height: 48px;
    }

    .pt-nav-toggler {
        display: block;
    }

    .pt-nav-collapse {
        flex-basis: 100%;
        width: 100%;
    }

    .pt-nav-links {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 4px;
        padding: 12px 0 16px;
        border-top: 1px solid var(--pt-border);
        margin-top: 8px;
    }

        .pt-nav-links > li {
            width: 100%;
        }

        .pt-nav-links a,
        .pt-nav-links .pt-nav-btn,
        .pt-nav-links .btn-logout {
            width: 100%;
            justify-content: flex-start;
            padding: 12px 10px;
        }

    .pt-user-chip {
        width: 100%;
        max-width: 100%;
        justify-content: flex-start;
        border-radius: 8px;
    }

    .pt-user-chip-text {
        max-width: none;
        white-space: normal;
        word-break: break-all;
    }
}

/* ═══ PAGE D'ACCUEIL (Home/Index) ═══════════════════════════════════ */
.cv-hero {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    min-height: 86vh;
    background: linear-gradient(160deg, var(--cv-navy-deep) 0%, var(--cv-navy) 58%, #0A4FA8 130%);
}

/* Anneaux concentriques : écho du cachet circulaire */
.cv-hero-rings {
    position: absolute;
    right: -220px;
    top: 50%;
    width: 700px;
    height: 700px;
    transform: translateY(-50%);
    border-radius: 50%;
    border: 2px solid rgba(255,106,0,.35);
    pointer-events: none;
}

    .cv-hero-rings::before,
    .cv-hero-rings::after {
        content: "";
        position: absolute;
        border-radius: 50%;
    }

    .cv-hero-rings::before {
        inset: 36px;
        border: 1px solid rgba(255,255,255,.14);
    }

    .cv-hero-rings::after {
        inset: 84px;
        border: 1px solid rgba(255,255,255,.08);
    }

.cv-hero-road {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
}

.cv-hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    padding: 6px 16px;
    border-radius: 999px;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.22);
    font-size: 13px;
}

    .cv-hero-pill .cv-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: #10B981;
        display: inline-block;
    }

.cv-hero-title {
    font-size: clamp(2.1rem, 5vw, 3.3rem);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -.5px;
    margin-bottom: 16px;
}

.cv-hero-lead {
    max-width: 34rem;
    margin-bottom: 32px;
    font-size: 1.1rem;
    line-height: 1.7;
    color: rgba(255,255,255,.84);
}

.cv-pillars {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 14px 30px;
}

    .cv-pillars li {
        display: flex;
        align-items: flex-start;
        gap: 10px;
        max-width: 190px;
    }

    .cv-pillars i {
        color: var(--cv-orange);
        font-size: 1.55rem;
        line-height: 1;
    }

    .cv-pillars strong {
        display: block;
        font-family: 'Outfit', sans-serif;
        font-size: 1.05rem;
    }

    .cv-pillars span {
        font-size: 12.5px;
        line-height: 1.4;
        color: rgba(255,255,255,.72);
    }

.cv-track-card {
    background: #fff;
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 24px 64px rgba(2,28,74,.38);
}

.cv-track-logo {
    height: 96px;
    width: auto;
    margin-bottom: 12px;
}

.cv-track-input {
    width: 100%;
    padding: 16px 16px 16px 48px;
    border: 2px solid var(--cv-line);
    border-radius: 12px;
    font-size: 15px;
    font-family: 'DM Sans', sans-serif;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}

    .cv-track-input:focus {
        border-color: var(--cv-blue);
        box-shadow: 0 0 0 4px rgba(11,92,192,.12);
    }

.btn.cv-track-btn {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'Outfit', sans-serif;
    transition: transform .15s, box-shadow .15s, background-color .15s;
}

    .btn.cv-track-btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 8px 24px rgba(255,106,0,.4);
    }

.cv-services {
    background: #fff;
    border-bottom: 1px solid var(--cv-line);
    padding: 32px 0;
}

    .cv-services i {
        font-size: 2rem;
        color: var(--cv-blue);
    }

    .cv-services .cv-service-name {
        margin-top: 8px;
        font-size: 14px;
        font-weight: 600;
        color: var(--cv-navy);
    }

@media (max-width: 991.98px) {
    .cv-hero {
        min-height: 0;
    }

    .cv-track-card {
        padding: 28px 22px;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }
}
