/* ============================================================
   Thème Héron Transport — surcouche Bootstrap 5
   Palette : navy profond + teal (héron), fond gris-bleu doux
   ============================================================ */
:root {
    --hc-navy: #0e2a43;
    --hc-navy-2: #123a5c;
    --hc-primary: #14608a;
    --hc-primary-dark: #0f4d6f;
    --hc-accent: #16a394;
    --hc-accent-dark: #118578;
    --hc-bg: #f2f6f9;
    --hc-card-border: #e3ebf2;
    --hc-radius: 14px;
}

body {
    background-color: var(--hc-bg);
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    color: #1f2d3a;
}

h1, h2, h3, h4, h5, .navbar-brand { letter-spacing: -0.02em; }

/* ---------- Couleurs Bootstrap re-marquées ---------- */
.btn-primary {
    background-color: var(--hc-primary);
    border-color: var(--hc-primary);
}
.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
    background-color: var(--hc-primary-dark) !important;
    border-color: var(--hc-primary-dark) !important;
}
.btn-outline-primary { color: var(--hc-primary); border-color: var(--hc-primary); }
.btn-outline-primary:hover { background-color: var(--hc-primary); border-color: var(--hc-primary); }
.btn-success { background-color: var(--hc-accent); border-color: var(--hc-accent); }
.btn-success:hover, .btn-success:focus { background-color: var(--hc-accent-dark) !important; border-color: var(--hc-accent-dark) !important; }
.text-primary { color: var(--hc-primary) !important; }
.bg-primary { background-color: var(--hc-primary) !important; }
.border-primary { border-color: var(--hc-primary) !important; }
a { color: var(--hc-primary); }

/* ---------- Barre de navigation ---------- */
.navbar-heron {
    background: linear-gradient(120deg, var(--hc-navy) 0%, var(--hc-navy-2) 55%, var(--hc-primary) 100%);
    padding-top: .8rem;
    padding-bottom: .8rem;
}
.navbar-heron .navbar-brand { font-weight: 700; font-size: 1.25rem; display: flex; align-items: center; gap: .55rem; }
.navbar-heron .nav-link { color: rgba(255, 255, 255, .82); font-weight: 500; border-radius: 8px; padding: .45rem .85rem; }
.navbar-heron .nav-link:hover { color: #fff; background: rgba(255, 255, 255, .1); }
.brand-sub { display: block; font-size: .6rem; font-weight: 600; letter-spacing: .32em; text-transform: uppercase; color: var(--hc-accent); line-height: 1; }

/* ---------- Cartes ---------- */
.card {
    border: 1px solid var(--hc-card-border);
    border-radius: var(--hc-radius);
    box-shadow: 0 1px 2px rgba(14, 42, 67, .05), 0 4px 16px rgba(14, 42, 67, .06);
}
.card-header {
    background: #fff;
    border-bottom: 1px solid var(--hc-card-border);
    border-radius: var(--hc-radius) var(--hc-radius) 0 0 !important;
    font-weight: 600;
    padding: .85rem 1.25rem;
}
.card-header.bg-primary { background: linear-gradient(120deg, var(--hc-primary), var(--hc-navy-2)) !important; }
.card.border-primary { border-left: 4px solid var(--hc-primary); }
.card.border-success { border-left: 4px solid var(--hc-accent); border-color: var(--hc-card-border); }
.card.border-danger { border-left: 4px solid #dc3545; border-color: var(--hc-card-border); }

/* ---------- Hero de la page d'accueil ---------- */
.hero-heron {
    /* Les halos reprennent les couleurs choisies dans Paramètres → Identité */
    background:
        radial-gradient(60rem 22rem at 115% -20%,
            color-mix(in srgb, var(--hc-accent) 35%, transparent), transparent 60%),
        radial-gradient(50rem 24rem at -20% 130%,
            color-mix(in srgb, var(--hc-primary) 55%, transparent), transparent 55%),
        linear-gradient(130deg, var(--hc-navy) 10%, var(--hc-navy-2) 60%,
            color-mix(in srgb, var(--hc-primary) 85%, #000) 100%);
    color: #fff;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
}
.hero-heron h1 { font-weight: 800; }
.hero-heron .lead { color: rgba(255, 255, 255, .85); max-width: 640px; margin-inline: auto; }
.hero-route {
    position: absolute; inset: auto 0 0 0; height: 90px; opacity: .5; pointer-events: none;
}
.badge-hero {
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .22);
    color: #fff;
    font-weight: 500;
    padding: .5rem .9rem;
    border-radius: 999px;
    font-size: .85rem;
}

/* Étapes « comment ça marche » */
.etape-num {
    width: 2.3rem; height: 2.3rem; flex: none;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--hc-primary), var(--hc-accent));
    color: #fff; font-weight: 700;
}

/* Résultat du simulateur */
.sim-prix { font-size: 2.4rem; font-weight: 800; color: var(--hc-accent-dark); line-height: 1.1; }

/* ---------- Badges d'état (workflow) ---------- */
.badge[class*='etat-'] {
    color: #fff;
    font-weight: 600;
    padding: .45em .8em;
    border-radius: 999px;
    letter-spacing: .01em;
}
.etat-brouillon { background-color: #6c757d; }
.etat-soumis, .etat-soumise { background-color: #0891b2; }
.etat-devis_envoye { background-color: #ea780e; }
.etat-en_ligne { background-color: var(--hc-primary); }
.etat-convoyeur_assigne, .etat-assigne, .etat-acceptee, .etat-accepte { background-color: #6d4fc4; }
.etat-en_cours, .etat-en_route { background-color: #d99000; }
.etat-livre { background-color: #14957f; }
.etat-termine, .etat-complete { background-color: #178a4c; }
.etat-paye { background-color: #10683a; }
.etat-annule, .etat-annule_convoyeur, .etat-refusee, .etat-annulee { background-color: #d03545; }
.etat-probleme { background-color: #c22a72; }
/* États des documents commerciaux et des pénalités */
.etat-emis, .etat-a_facturer { background-color: #6b7f91; }
.etat-facturee { background-color: #ea780e; }
.etat-payee { background-color: #10683a; }
/* Paiements */
.etat-en_attente { background-color: #d99000; }
.etat-reussi { background-color: #178a4c; }
.etat-echoue { background-color: #d03545; }
.etat-rembourse { background-color: #6d4fc4; }

/* ---------- Stepper de progression ---------- */
.stepper { display: flex; align-items: flex-start; gap: 0; overflow-x: auto; padding: .25rem 0; }
.stepper .step { flex: 1; min-width: 84px; text-align: center; position: relative; }
.stepper .step::before {
    content: ''; position: absolute; top: 13px; left: -50%; width: 100%; height: 3px;
    background: #d6e1ea; z-index: 0;
}
.stepper .step:first-child::before { display: none; }
.stepper .step .dot {
    width: 28px; height: 28px; border-radius: 50%; margin: 0 auto;
    background: #fff; border: 3px solid #d6e1ea; position: relative; z-index: 1;
    display: flex; align-items: center; justify-content: center;
    font-size: .8rem; color: #90a4b5; font-weight: 700;
}
.stepper .step .lbl { font-size: .72rem; color: #90a4b5; margin-top: .35rem; font-weight: 500; }
.stepper .step.fait::before, .stepper .step.actif::before { background: var(--hc-accent); }
.stepper .step.fait .dot { border-color: var(--hc-accent); background: var(--hc-accent); color: #fff; }
.stepper .step.actif .dot { border-color: var(--hc-accent); color: var(--hc-accent-dark); box-shadow: 0 0 0 5px rgba(22, 163, 148, .15); }
.stepper .step.fait .lbl, .stepper .step.actif .lbl { color: var(--hc-accent-dark); font-weight: 600; }
.stepper.annulee .step.actif .dot { border-color: #d03545; color: #d03545; box-shadow: 0 0 0 5px rgba(208, 53, 69, .12); }
.stepper.annulee .step.actif .lbl { color: #d03545; }

/* ---------- Timeline (historique) ---------- */
.timeline { position: relative; padding-left: 1.4rem; }
.timeline::before { content: ''; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 2px; background: #dbe5ee; }
.timeline-item { position: relative; padding-bottom: .95rem; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
    content: ''; position: absolute; left: -1.4rem; top: .35rem; width: 12px; height: 12px;
    border-radius: 50%; background: #fff; border: 3px solid var(--hc-primary);
}
.timeline-item .t-date { font-size: .72rem; color: #8aa0b2; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }

/* ---------- Tableaux ---------- */
.table { --bs-table-hover-bg: #eef5f9; }
.table thead th {
    background: #f6fafc; color: #5b7286; font-size: .78rem; text-transform: uppercase;
    letter-spacing: .05em; border-bottom: 2px solid var(--hc-card-border);
}
.table-responsive { background: #fff; border: 1px solid var(--hc-card-border); border-radius: var(--hc-radius); padding: .25rem .75rem; box-shadow: 0 1px 2px rgba(14,42,67,.05); }
.table > :not(caption) > * > * { padding: .8rem .75rem; }

/* ---------- Formulaires ---------- */
.form-control, .form-select { border-color: #cfdce6; border-radius: 9px; padding: .55rem .8rem; }
.form-control:focus, .form-select:focus {
    border-color: var(--hc-accent);
    box-shadow: 0 0 0 .2rem rgba(22, 163, 148, .18);
}
.form-label { font-weight: 600; font-size: .86rem; color: #35485a; margin-bottom: .3rem; }

/* ---------- Boutons ---------- */
.btn { border-radius: 9px; font-weight: 600; }
.btn-lg { padding: .7rem 1.5rem; }

/* ---------- Autocomplétion d'adresses ---------- */
.autocomplete-liste { z-index: 1050; max-height: 240px; overflow-y: auto; box-shadow: 0 10px 30px rgba(14,42,67,.18); border-radius: 10px; }
.autocomplete-liste .list-group-item { cursor: pointer; padding: .6rem .9rem; }
.autocomplete-liste .list-group-item:hover { background-color: #e8f4f2; }

/* ---------- Canvas de signature ---------- */
.signature-canvas {
    display: block;
    width: 100%;
    touch-action: none;
    background: #fff;
    border-radius: 10px;
    border: 2px dashed #cfdce6;
    cursor: crosshair;
}

/* ---------- Cartes mission (grille convoyeur) ---------- */
.card-mission { transition: transform .12s ease, box-shadow .12s ease; }
.card-mission:hover { transform: translateY(-3px); box-shadow: 0 8px 28px rgba(14, 42, 67, .14); }
.prix-pill {
    background: linear-gradient(135deg, var(--hc-accent), #1cc0ad);
    color: #fff; font-weight: 700; border-radius: 999px; padding: .35rem .9rem; font-size: .95rem;
}

/* ---------- Trajet départ → arrivée ---------- */
.trajet { position: relative; padding-left: 1.35rem; }
.trajet .pt { position: relative; padding-bottom: .8rem; }
.trajet .pt:last-child { padding-bottom: 0; }
.trajet .pt::before {
    content: ''; position: absolute; left: -1.35rem; top: .3rem;
    width: 11px; height: 11px; border-radius: 50%;
}
.trajet .pt.depart::before { background: var(--hc-primary); box-shadow: 0 0 0 3px rgba(20, 96, 138, .18); }
.trajet .pt.arrivee::before { background: var(--hc-accent); box-shadow: 0 0 0 3px rgba(22, 163, 148, .2); }
.trajet .pt.depart::after {
    content: ''; position: absolute; left: -1.05rem; top: 1.05rem; bottom: -0.15rem; width: 2px;
    background-image: linear-gradient(#b9cbd9 55%, transparent 55%);
    background-size: 2px 7px;
}
.trajet .pt .pt-lbl { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #8aa0b2; }

/* ============================================================
   ÉTAT DES LIEUX (formulaire terrain, pensé mobile d'abord)
   ============================================================ */
.edl-entete {
    background: #fff;
    border: 1px solid var(--hc-card-border);
    border-radius: var(--hc-radius);
    padding: 1rem 1.25rem;
    box-shadow: 0 1px 2px rgba(14, 42, 67, .05);
}
.edl-progress .progress { background: #e6eef4; border-radius: 999px; }
.edl-progress .progress-bar { background: var(--hc-primary); transition: width .3s ease; }

.edl-section { margin-bottom: 1.5rem; }
.edl-titre {
    background: linear-gradient(120deg, var(--hc-navy) 0%, var(--hc-primary) 100%);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    padding: .8rem 1.25rem;
    border-radius: var(--hc-radius) var(--hc-radius) 0 0;
    margin: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .5rem;
}
.edl-corps {
    background: #fff;
    border: 1px solid var(--hc-card-border);
    border-top: 0;
    border-radius: 0 0 var(--hc-radius) var(--hc-radius);
    padding: 1.25rem;
}
.edl-compteur {
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 999px;
    padding: .15rem .7rem;
    font-size: .8rem;
    font-weight: 700;
    white-space: nowrap;
}
.edl-compteur.complet { background: var(--hc-accent); border-color: var(--hc-accent); }

/* Grille des emplacements photo */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: .85rem;
}
.photo-case {
    display: block;
    cursor: pointer;
    text-align: center;
    border: 2px dashed #cfdce6;
    border-radius: 12px;
    padding: .5rem;
    background: #fbfdfe;
    transition: border-color .15s ease, background .15s ease;
}
.photo-case:hover { border-color: var(--hc-primary); background: #f2f8fb; }
.photo-case.remplie { border-style: solid; border-color: var(--hc-accent); background: #f2fbf9; }
.photo-case.en-cours { opacity: .55; }
.photo-apercu {
    position: relative;
    aspect-ratio: 4 / 3;
    border-radius: 8px;
    background: #eef4f8;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: .4rem;
}
.photo-apercu img { width: 100%; height: 100%; object-fit: cover; }
.photo-icone { font-size: 1.8rem; color: #90a4b5; line-height: 1; }
.photo-num {
    width: 2rem; height: 2rem; border-radius: 50%;
    background: #dbe7ef; color: #5b7286; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}
.photo-case.remplie .photo-apercu::after {
    content: '✓';
    position: absolute; top: 4px; right: 4px;
    width: 22px; height: 22px; border-radius: 50%;
    background: var(--hc-accent); color: #fff;
    font-size: .8rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}
.photo-label { font-size: .76rem; color: #45596b; font-weight: 600; line-height: 1.2; display: block; }
.photo-case.remplie .photo-label { color: var(--hc-accent-dark); }
.photo-vignette {
    height: 74px; width: 98px; object-fit: cover;
    border-radius: 8px; border: 1px solid var(--hc-card-border);
}

/* ---------- Constat des dommages ---------- */
.dommages-depart {
    background: #f4f9fc; border: 1px solid #d8e6ef;
    border-radius: 10px; padding: .75rem .9rem;
}
.dommage-ref {
    display: block; width: 92px; text-decoration: none; text-align: center;
}
.dommage-ref img {
    width: 92px; height: 70px; object-fit: cover;
    border-radius: 8px; border: 1px solid #cfdce6;
}
.dommage-ref span {
    display: block; font-size: .68rem; color: #5b7286;
    font-weight: 600; line-height: 1.15; margin-top: .2rem;
}

.dommage-enregistre {
    display: flex; align-items: center; gap: .8rem;
    border: 1px solid #e0d3bd; background: #fdf9f2;
    border-left: 4px solid #ea780e;
    border-radius: 10px; padding: .6rem .8rem; margin-bottom: .6rem;
}
.dommage-enregistre img {
    width: 78px; height: 60px; object-fit: cover; border-radius: 8px;
}
.dommage-enregistre.retire { opacity: .45; text-decoration: line-through; }
.dommage-retirer {
    font-size: .78rem; color: #b03a2b; white-space: nowrap;
    display: flex; align-items: center; gap: .3rem; cursor: pointer;
}

.dommage-ligne {
    position: relative;
    display: flex; gap: 1rem; align-items: flex-start; flex-wrap: wrap;
    border: 1px solid var(--hc-card-border); border-left: 4px solid var(--hc-primary);
    border-radius: 10px; padding: .9rem 2.2rem .9rem .9rem; margin-bottom: .8rem;
    background: #fbfdfe;
}
.dommage-ligne .dommage-photo { width: 150px; flex: none; }
.dommage-ligne .dommage-champs { flex: 1 1 320px; min-width: 260px; }
.dommage-supprimer { position: absolute; top: .7rem; right: .7rem; }
@media (max-width: 576px) {
    .dommage-ligne .dommage-photo { width: 100%; }
}

.signature-faite {
    display: flex; align-items: center; gap: .6rem;
    background: #f2fbf9; border: 1px solid #bfe6df; border-radius: 10px; padding: .4rem .6rem;
}
.signature-faite img { max-height: 54px; }

/* La barre d'actions reste visible en bas ; cette réserve garantit que tout
   contenu du formulaire peut être amené au-dessus d'elle par simple défilement. */
#form-inspection { padding-bottom: 5rem; }
html { scroll-padding-bottom: 8rem; }

/* Barre d'actions collée en bas sur mobile */
.edl-actions {
    position: sticky; bottom: 0; z-index: 20;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(6px);
    border: 1px solid var(--hc-card-border);
    border-radius: var(--hc-radius);
    padding: .85rem 1.1rem;
    display: flex; gap: .75rem; justify-content: flex-end; flex-wrap: wrap;
    box-shadow: 0 -4px 18px rgba(14, 42, 67, .08);
}
@media (max-width: 576px) {
    .edl-actions { flex-direction: column-reverse; }
    .edl-actions .btn { width: 100%; }
    .photo-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
}

/* Constat de départ pas encore accessible */
.edl-verrouille {
    display: flex; gap: .9rem; align-items: flex-start;
    background: #f4f7fa; border: 1px dashed #b9cbd9;
    border-radius: 10px; padding: .9rem 1rem;
}
.edl-cadenas { font-size: 1.5rem; line-height: 1; }

/* ---------- Rapport d'état des lieux ---------- */
.rapport-galerie {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: .85rem;
}
.rapport-photo { text-align: center; }
.rapport-photo img {
    width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
    border-radius: 10px; border: 1px solid var(--hc-card-border);
}
.rapport-photo .lg { font-size: .76rem; color: #5b7286; font-weight: 600; margin-top: .3rem; display: block; }
.rapport-photo.absente .placeholder-vide {
    width: 100%; aspect-ratio: 4 / 3; border-radius: 10px;
    border: 2px dashed #d6e1ea; background: #f7fafc; color: #a3b6c5;
    display: flex; align-items: center; justify-content: center; font-size: .8rem;
}
.liste-dommages { list-style: none; padding: 0; margin: 0; }
.liste-dommages li {
    display: flex; gap: .8rem; align-items: center;
    padding: .55rem 0; border-bottom: 1px solid #eef3f7;
}
.liste-dommages li:last-child { border-bottom: 0; }
.liste-dommages img {
    width: 76px; height: 58px; object-fit: cover;
    border-radius: 8px; border: 1px solid var(--hc-card-border);
}

.fiche-ligne {
    display: flex; justify-content: space-between; gap: 1rem;
    padding: .5rem 0; border-bottom: 1px solid #eef3f7;
}
.fiche-ligne:last-child { border-bottom: 0; }
.fiche-ligne .lbl { color: #5b7286; font-size: .88rem; }
.fiche-ligne .val { font-weight: 600; text-align: right; }

/* ============================================================
   LIGNES DE DOSSIER (mes demandes, mes missions)
   Une ligne = une carte cliquable. Seules les villes sont affichées :
   une adresse complète occupe trois lignes au téléphone et noie la liste.
   ============================================================ */
.liste-dossiers { display: flex; flex-direction: column; gap: .6rem; }

.ligne-dossier {
    display: grid;
    /* Six colonnes pour six éléments : référence, véhicule, trajet, date,
       prix, chevron. Une de moins et le chevron passait à la ligne. */
    grid-template-columns: 9rem minmax(9rem, 1fr) minmax(11rem, 1.3fr) auto auto 1rem;
    align-items: center;
    gap: 1rem;
    background: #fff;
    border: 1px solid var(--hc-card-border);
    border-left: 4px solid #b9cbd9;
    border-radius: var(--hc-radius);
    padding: .85rem 1.1rem;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 1px 2px rgba(14, 42, 67, .05);
    transition: border-color .12s ease, box-shadow .12s ease, transform .12s ease;
}
.ligne-dossier:hover {
    border-left-color: var(--hc-primary);
    box-shadow: 0 6px 20px rgba(14, 42, 67, .12);
    transform: translateY(-1px);
    color: inherit;
}
.ligne-dossier.urgent { border-left-color: #ea780e; background: #fffdf9; }
.ligne-dossier.terminee { border-left-color: #178a4c; }
.ligne-dossier.attention { border-left-color: #d03545; background: #fffbfb; }

.ld-ref { font-weight: 700; color: var(--hc-navy); font-size: .9rem; }
.ld-ref .badge { display: block; margin-top: .3rem; font-size: .68rem; }

.ld-vehicule strong { display: block; line-height: 1.25; }
.ld-vehicule small { color: #7a8fa1; }

/* Trajet compact : Lyon → Paris */
.ld-trajet { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.ld-ville {
    font-weight: 600;
    color: #22323f;
    background: #f1f6fa;
    border-radius: 6px;
    padding: .15rem .5rem;
    white-space: nowrap;
}
.ld-fleche { color: var(--hc-accent); font-weight: 700; }
.ld-distance { color: #7a8fa1; font-size: .8rem; width: 100%; }

.ld-date { text-align: right; white-space: nowrap; font-size: .9rem; }
.ld-date small { display: block; color: #7a8fa1; font-size: .72rem; }
.ld-prix { text-align: right; font-weight: 700; white-space: nowrap; color: var(--hc-navy); }
.ld-chevron { color: #b9cbd9; font-size: 1.3rem; line-height: 1; }

/* En dessous de 900 px, la grille se replie en deux colonnes lisibles */
@media (max-width: 900px) {
    .ligne-dossier {
        grid-template-columns: 1fr auto;
        gap: .45rem .8rem;
        padding: .8rem .9rem;
    }
    .ld-ref { grid-column: 1; }
    .ld-ref .badge { display: inline-block; margin: 0 0 0 .4rem; }
    .ld-prix { grid-column: 2; grid-row: 1; }
    .ld-vehicule { grid-column: 1 / -1; }
    .ld-trajet { grid-column: 1 / -1; }
    .ld-date { grid-column: 1 / -1; text-align: left; color: #7a8fa1; font-size: .82rem; }
    .ld-date small { display: inline; }
    .ld-chevron { display: none; }
}

/* Groupes de missions : à venir, en cours, terminées */
.groupe-missions { margin-bottom: 1.8rem; }
.groupe-titre {
    display: flex; align-items: center; gap: .6rem;
    font-size: 1rem; font-weight: 700; color: var(--hc-navy);
    margin-bottom: .7rem;
}
.groupe-titre .compte {
    background: #e8eff5; color: #4c667a;
    border-radius: 999px; padding: .1rem .6rem; font-size: .78rem; font-weight: 700;
}
.groupe-titre.a-venir .compte { background: #fdf0e2; color: #b4590a; }
.groupe-titre.en-cours .compte { background: #fff4d6; color: #8a6100; }
.groupe-titre.terminees .compte { background: #e4f4ea; color: #146c43; }
.groupe-vide { color: #8aa0b2; font-size: .88rem; padding: .2rem 0 .6rem; }

/* ---------- Tuiles KPI (tableau de bord de gestion) ---------- */
.kpi-tile {
    background: #fff;
    border: 1px solid var(--hc-card-border);
    border-radius: var(--hc-radius);
    padding: 1rem 1.15rem;
    height: 100%;
    box-shadow: 0 1px 2px rgba(14, 42, 67, .05);
    border-left: 4px solid var(--hc-primary);
}
.kpi-tile .kpi-val { font-size: 1.9rem; font-weight: 800; color: var(--hc-navy); line-height: 1.15; }
.kpi-tile .kpi-lbl { font-size: .8rem; color: #5b7286; font-weight: 600; margin-top: .15rem; }
.kpi-tile.kpi-warn { border-left-color: #ea780e; background: #fff9f2; }
.kpi-tile.kpi-small { padding: .7rem 1rem; border-left-color: #b9cbd9; }
.kpi-tile.kpi-small .kpi-val { font-size: 1.3rem; }

/* Tableau imbriqué dans une card du dashboard */
.card .table-responsive { border: 0; box-shadow: none; border-radius: 0 0 var(--hc-radius) var(--hc-radius); }

/* ---------- Page Paramètres ---------- */
.param-menu .list-group-item {
    border-color: var(--hc-card-border);
    font-weight: 500;
    padding: .65rem 1rem;
}
.param-menu .list-group-item.active {
    background-color: var(--hc-primary);
    border-color: var(--hc-primary);
}
.form-control-color { width: 100%; height: 2.6rem; padding: .25rem; }

.apercu-identite { border: 1px solid var(--hc-card-border); border-radius: 12px; overflow: hidden; }
.apercu-barre {
    display: flex; align-items: center; gap: .6rem;
    padding: .8rem 1rem; color: #fff; font-weight: 700; font-size: 1.1rem;
}
.apercu-barre img { max-height: 34px; max-width: 150px; }
.apercu-legende {
    background: #f6fafc; padding: .35rem 1rem;
    font-size: .75rem; color: #5b7286; border-top: 1px solid var(--hc-card-border);
}
.logo-actuel { display: flex; align-items: center; gap: .8rem; }
.logo-actuel img {
    max-height: 60px; max-width: 200px;
    border: 1px solid var(--hc-card-border); border-radius: 8px;
    padding: .3rem; background: #fff;
}

/* Logo dans la barre de navigation */
.brand-logo { max-height: 38px; max-width: 170px; }

/* ============================================================
   TABLEAU DE BORD DE GESTION — deux filières
   ============================================================ */
.filiere-titre {
    font-size: .78rem; font-weight: 700; letter-spacing: .12em;
    text-transform: uppercase; margin-bottom: .8rem; padding-left: .7rem;
    border-left: 4px solid var(--hc-primary); color: var(--hc-navy);
}
.filiere-titre.filiere-convoyeur { border-left-color: var(--hc-accent); }

.g-ligne { display: flex; justify-content: space-between; align-items: flex-start; gap: .9rem; }
.g-ligne.g-risque { background: #fffaf7; border-left: 3px solid #d03545; }
.g-ligne.g-a-faire { background: #f6fbf8; border-left: 3px solid var(--hc-accent); }
.g-infos { min-width: 0; flex: 1; }
.g-tete { font-weight: 600; margin-bottom: .15rem; display: flex; flex-wrap: wrap;
          gap: .35rem; align-items: center; }
.g-tete .badge { font-weight: 600; font-size: .68rem; }
.g-detail { font-size: .84rem; color: #5b7286; line-height: 1.35; }

/* Répartition du prix : ce que paie le client, ce qui nous revient,
   ce que touche le convoyeur — visible sans ouvrir le dossier. */
.g-montants {
    display: flex; flex-wrap: wrap; gap: .3rem .5rem; margin-top: .35rem;
    font-size: .76rem;
}
.g-montants span {
    background: #f1f6fa; border-radius: 5px; padding: .1rem .45rem; color: #45596b;
}
.g-montants .commission { background: #eaf4ef; color: #146c43; font-weight: 600; }
.g-montants .convoyeur { background: #f3f0fa; color: #5b3fa8; }

.g-actions { display: flex; gap: .4rem; align-items: center; flex: none; }
@media (max-width: 575px) {
    .g-ligne { flex-direction: column; }
    .g-actions { width: 100%; }
    .g-actions .btn, .g-actions form { flex: 1; }
}

/* ---------- Footer ---------- */
.footer-heron { background: var(--hc-navy); color: rgba(255, 255, 255, .75); }
.footer-heron a { color: #7fd6cb; text-decoration: none; }
.footer-heron a:hover { color: #fff; }

/* ---------- Divers ---------- */
.alert { border-radius: 12px; }
.page-titre { font-weight: 800; color: var(--hc-navy); }

/* ---- Cloche de notification ---- */
.cloche { font-size: 1.15rem; line-height: 1; }
.cloche-pastille {
    position: absolute;
    top: .1rem;
    left: 1.1rem;
    font-size: .65rem;
    padding: .2em .45em;
}
.menu-notifications { width: min(23rem, 90vw); }
.notification-ligne {
    display: flex;
    gap: .55rem;
    align-items: flex-start;
    white-space: normal;      /* les messages tiennent sur plusieurs lignes */
    padding-top: .5rem;
    padding-bottom: .5rem;
}
.notification-ligne.non-lue { background-color: rgba(20, 96, 138, .07); font-weight: 500; }
.notification-puce {
    flex: 0 0 auto;
    width: .5rem;
    height: .5rem;
    margin-top: .45rem;
    border-radius: 50%;
    background: var(--hc-accent);
}
.notification-puce.puce-action { background: #f0a202; }
.notification-puce.puce-alerte { background: #d64545; }

/* ---- Vitrines client et convoyeur ---- */
.carte-argument { border-top: 3px solid var(--hc-accent); }
.carte-argument .argument-icone { font-size: 1.6rem; line-height: 1; margin-bottom: .5rem; }
.carte-usage { background: #f8fbfc; }
.accordion-button:not(.collapsed) {
    color: var(--hc-principal);
    background-color: rgba(20, 96, 138, .06);
    box-shadow: none;
}
.accordion-button:focus { box-shadow: none; border-color: rgba(20, 96, 138, .25); }

/* ============================================================
   VITRINES — respiration, gros titres, peu de texte
   ============================================================ */
.vitrine-hero {
    background: linear-gradient(160deg, #eef6f9 0%, #e4f1f0 55%, #f6fafb 100%);
    border-radius: 24px;
    padding: 3rem 1.5rem;
    margin-bottom: 4.5rem;
}
@media (min-width: 992px) {
    .vitrine-hero { padding: 4.5rem 4rem; }
}
.vitrine-hero h1 {
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -.02em;
    color: var(--hc-navy);
}
.vitrine-hero .accent { color: var(--hc-accent); }
.vitrine-hero .accroche {
    font-size: 1.1rem;
    color: #4a6377;
    max-width: 34rem;
}
.vitrine-illustration { width: 100%; height: auto; display: block; }

.section-vitrine { margin-bottom: 4.5rem; }
.section-vitrine > h2 {
    font-weight: 700;
    letter-spacing: -.01em;
    color: var(--hc-navy);
    margin-bottom: .35rem;
}
.section-vitrine > .sous-titre { color: #6b8092; margin-bottom: 2rem; }

/* Cartes de la vitrine : beaucoup de marge intérieure, peu de texte */
.carte-vitrine {
    background: #fff;
    border: 1px solid var(--hc-card-border);
    border-radius: 18px;
    padding: 2rem 1.75rem;
    height: 100%;
}
.carte-vitrine h3 { font-size: 1.02rem; font-weight: 600; margin: .9rem 0 .45rem; }
.carte-vitrine p { color: #6b8092; margin-bottom: 0; }
.carte-vitrine .picto {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 14px;
    background: rgba(22, 163, 148, .12);
    font-size: 1.4rem;
}
.carte-vitrine .picto.picto-bleu { background: rgba(20, 96, 138, .1); }

/* Points forts alignés sous le titre du hero */
.points-forts { display: grid; gap: 1.1rem; margin: 2rem 0; }
.point-fort { display: flex; gap: .85rem; align-items: flex-start; }
.point-fort .marque {
    flex: 0 0 auto;
    width: 2.2rem; height: 2.2rem;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(20, 96, 138, .1);
    font-size: 1.05rem;
}
.point-fort strong { display: block; color: var(--hc-navy); }
.point-fort span { color: #6b8092; font-size: .92rem; }

/* Bande d'étapes */
.etapes-vitrine { counter-reset: etape; }
.etape-vitrine { padding: 1.5rem 1.25rem; }
.etape-vitrine .rond {
    width: 2.6rem; height: 2.6rem;
    border-radius: 50%;
    background: var(--hc-primary);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
    margin-bottom: .9rem;
}
.etape-vitrine strong { display: block; color: var(--hc-navy); margin-bottom: .25rem; }
.etape-vitrine span { color: #6b8092; font-size: .9rem; }

/* Bloc simulateur mis en avant */
.bloc-simulateur {
    background: #fff;
    border: 1px solid var(--hc-card-border);
    border-radius: 24px;
    padding: 2.5rem;
}
@media (min-width: 992px) { .bloc-simulateur { padding: 3rem; } }

/* Appel à l'action de fin de page */
.cta-final {
    background: linear-gradient(135deg, var(--hc-navy) 0%, var(--hc-primary) 100%);
    color: #fff;
    border-radius: 24px;
    padding: 3rem 1.5rem;
    text-align: center;
}
.cta-final h2 { font-weight: 700; margin-bottom: .5rem; }
.cta-final p { color: rgba(255, 255, 255, .8); margin-bottom: 1.5rem; }

/* FAQ épurée */
.faq-vitrine .accordion-item {
    border: 1px solid var(--hc-card-border);
    border-radius: 14px !important;
    margin-bottom: .75rem;
    overflow: hidden;
}
.faq-vitrine .accordion-button { font-weight: 500; padding: 1.15rem 1.35rem; }
.faq-vitrine .accordion-body { color: #6b8092; padding-top: 0; }

/* ---- Icônes vectorielles (sprite core/img/icones.svg) ---- */
.ic {
    width: 1.45rem;
    height: 1.45rem;
    color: var(--hc-accent);
    display: block;
}
.picto-bleu .ic, .point-fort .ic { color: var(--hc-primary); }
.carte-vitrine .picto .ic { width: 1.6rem; height: 1.6rem; }
.point-fort .marque .ic { width: 1.2rem; height: 1.2rem; }

/* ---- Carte illustrée par une photo ---- */
.carte-visuelle {
    background: #fff;
    border: 1px solid var(--hc-card-border);
    border-radius: 18px;
    overflow: hidden;
    height: 100%;
}
.carte-visuelle img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}
.carte-visuelle .corps { padding: 1.5rem 1.75rem 1.75rem; }
.carte-visuelle h3 { font-size: 1.02rem; font-weight: 600; margin-bottom: .45rem; }
.carte-visuelle p { color: #6b8092; margin-bottom: 0; }

/* ---- Carte de suivi du convoyage ---- */
.carte-suivi {
    height: 420px;
    border-radius: var(--hc-radius) var(--hc-radius) 0 0;
    z-index: 0;                 /* sous les menus déroulants de la barre du haut */
}
.marqueur-vehicule {
    font-size: 1.6rem;
    line-height: 1;
    text-align: center;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .35));
}
.suivi-partage {
    display: flex;
    gap: .6rem;
    align-items: center;
    flex-wrap: wrap;
}
.pastille-suivi {
    width: .6rem;
    height: .6rem;
    border-radius: 50%;
    background: #b7c4cd;
    display: inline-block;
}
.pastille-suivi.active { background: #16a394; animation: pulsation 1.8s infinite; }
@keyframes pulsation {
    0%   { box-shadow: 0 0 0 0 rgba(22, 163, 148, .5); }
    70%  { box-shadow: 0 0 0 .5rem rgba(22, 163, 148, 0); }
    100% { box-shadow: 0 0 0 0 rgba(22, 163, 148, 0); }
}

/* ---- Application installée : bandeau de réseau ---- */
.bandeau-hors-ligne {
    background: #8a6d14;
    color: #fff;
    text-align: center;
    padding: .45rem 1rem;
    font-size: .9rem;
}
/* En mode application, l'encoche et la barre système ne doivent pas mordre */
@media (display-mode: standalone) {
    body { padding-top: env(safe-area-inset-top); }
    .footer-heron { padding-bottom: calc(1.5rem + env(safe-area-inset-bottom)); }
}
