/* =========================================================================
   CEM – Suivi des crédits : feuille de style de l'application
   ========================================================================= */
:root {
    --cem: #e50006;
    --cem-dark: #b80005;
    --cem-soft: #fde6e7;
    --app-bg: #f4f5f7;
    --app-border: #e4e6ea;
    --app-text: #1f2328;
    --app-muted: #6b7280;
    --sidebar-w: 260px;
    --bs-font-sans-serif: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
    background: var(--app-bg);
    color: var(--app-text);
    font-family: var(--bs-font-sans-serif);
    font-size: .95rem;
}

.min-w-0 { min-width: 0; }

/* ---------- Structure ---------- */
.app-shell { display: flex; min-height: 100vh; }

.app-sidebar {
    background: #fff;
    border-right: 1px solid var(--app-border);
}
@media (min-width: 992px) {
    .app-sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: var(--sidebar-w);
        z-index: 1030;
    }
    .app-main { margin-left: var(--sidebar-w); }
}
.app-sidebar-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 1.25rem 1rem;
    overflow-y: auto;
}
.app-brand { display: block; text-align: center; margin-bottom: 1.25rem; }
.app-brand img { max-width: 170px; height: auto; }

.app-nav .nav-link {
    color: var(--app-text);
    border-radius: .5rem;
    padding: .6rem .8rem;
    margin-bottom: .15rem;
    display: flex;
    align-items: center;
    gap: .65rem;
    font-weight: 500;
}
.app-nav .nav-link i { color: var(--app-muted); }
.app-nav .nav-link:hover { background: var(--app-bg); }
.app-nav .nav-link.active { background: var(--cem-soft); color: var(--cem); }
.app-nav .nav-link.active i { color: var(--cem); }

.app-user { border-top: 1px solid var(--app-border); padding-top: 1rem; margin-top: 1.5rem; }
.app-avatar {
    flex: 0 0 auto;
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--cem);
    color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 700;
}

.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.app-topbar {
    position: sticky; top: 0; z-index: 1020;
    display: flex; align-items: center; gap: .75rem;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--app-border);
    padding: .85rem 1.5rem;
}
.app-title { font-size: 1.3rem; font-weight: 700; margin: 0; }
.app-subtitle { color: var(--app-muted); font-size: .85rem; }
.app-content { padding: 1.5rem; }
@media (max-width: 575.98px) {
    .app-content { padding: 1rem; }
    .app-topbar { padding: .75rem 1rem; }
}

/* ---------- Boutons ---------- */
.btn-cem {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--cem);
    --bs-btn-border-color: var(--cem);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--cem-dark);
    --bs-btn-hover-border-color: var(--cem-dark);
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--cem-dark);
    --bs-btn-active-border-color: var(--cem-dark);
    --bs-btn-disabled-bg: var(--cem);
    --bs-btn-disabled-border-color: var(--cem);
}
.btn-outline-cem {
    --bs-btn-color: var(--cem);
    --bs-btn-border-color: var(--cem);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--cem);
    --bs-btn-hover-border-color: var(--cem);
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--cem-dark);
    --bs-btn-active-border-color: var(--cem-dark);
}
.btn-icon { width: 34px; height: 34px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }

/* ---------- Cartes ---------- */
.card {
    border: 1px solid var(--app-border);
    border-radius: .75rem;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}
.card-header {
    background: #fff;
    border-bottom: 1px solid var(--app-border);
    font-weight: 600;
    border-radius: .75rem .75rem 0 0 !important;
}

.stat-card { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.25rem; }
.stat-icon {
    flex: 0 0 auto;
    width: 46px; height: 46px;
    border-radius: .65rem;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.15rem;
    background: var(--cem-soft); color: var(--cem);
}
.stat-icon.blue { background: #e8f0fe; color: #1a56db; }
.stat-icon.amber { background: #fff4e0; color: #b45309; }
.stat-icon.green { background: #e7f6ec; color: #15803d; }
.stat-label { color: var(--app-muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; }
.stat-value { font-size: 1.45rem; font-weight: 700; line-height: 1.2; }

/* ---------- Tableaux ---------- */
.table-app { margin: 0; }
.table-app > thead th {
    background: #fafafa;
    color: var(--app-muted);
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .03em;
    font-weight: 600;
    white-space: nowrap;
    border-bottom-width: 1px;
}
.table-app > :not(caption) > * > * { padding: .7rem .9rem; vertical-align: middle; }
.table-app tbody tr:last-child td { border-bottom: 0; }

/* ---------- Fiche client ---------- */
.client-card .client-name { font-weight: 700; font-size: 1.05rem; }
.client-card .client-meta { color: var(--app-muted); font-size: .85rem; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: .3rem 1rem; margin: 0; font-size: .9rem; }
.kv dt { color: var(--app-muted); font-weight: 500; }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.amount-big { font-size: 1.35rem; font-weight: 700; color: var(--cem); }

.progress-cem { height: 8px; background: #eef0f3; }
.progress-cem .progress-bar { background: var(--cem); }

.badge-soft { font-weight: 600; padding: .4em .65em; border-radius: 999px; }
.badge-soft.red { background: var(--cem-soft); color: var(--cem); }
.badge-soft.green { background: #e7f6ec; color: #15803d; }
.badge-soft.amber { background: #fff4e0; color: #b45309; }
.badge-soft.blue { background: #e8f0fe; color: #1a56db; }
.badge-soft.gray { background: #eef0f3; color: #4b5563; }

/* ---------- Formulaires ---------- */
.form-section-title {
    font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
    color: var(--cem);
    margin: 0 0 .75rem;
}
.form-label { font-weight: 500; font-size: .875rem; margin-bottom: .3rem; }
.form-label .req { color: var(--cem); }
.form-control:focus, .form-select:focus {
    border-color: #f27a7e;
    box-shadow: 0 0 0 .2rem rgba(229, 0, 6, .15);
}

.choice-card {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.choice-card:hover { transform: translateY(-3px); border-color: var(--cem); box-shadow: 0 8px 24px rgba(16, 24, 40, .08); color: inherit; }
.choice-card img { max-height: 70px; width: auto; }

.empty-state { text-align: center; padding: 3rem 1rem; color: var(--app-muted); }
.empty-state i { font-size: 2.2rem; margin-bottom: .75rem; opacity: .5; }

.pagination { --bs-pagination-active-bg: var(--cem); --bs-pagination-active-border-color: var(--cem); --bs-pagination-color: var(--cem); margin: 0; }

/* Logo : le fond blanc de l'image se fond dans le fond de la page */
.logo { mix-blend-mode: multiply; }

/* =========================================================================
   Surcharges du thème Bootstrap local (bootstrap.min.css personnalisé :
   coins carrés, secondaire jaune, primaire bleu marine, menu transparent)
   ========================================================================= */
:root {
    --bs-primary: var(--cem);
    --bs-primary-rgb: 229, 0, 6;
    --bs-secondary: #6b7280;
    --bs-secondary-rgb: 107, 114, 128;
    --bs-link-color: var(--cem);
    --bs-link-hover-color: var(--cem-dark);
    --bs-border-radius: .5rem;
    --bs-border-radius-sm: .375rem;
    --bs-border-radius-lg: .75rem;
}
.btn { --bs-btn-border-radius: .5rem; }
.btn-sm { --bs-btn-border-radius: .375rem; }
.btn-lg { --bs-btn-border-radius: .65rem; }
.form-control, .form-select, .input-group-text { border-radius: var(--bs-border-radius); }
.form-control-sm, .form-select-sm { border-radius: var(--bs-border-radius-sm); }
.card { --bs-card-border-radius: .75rem; --bs-card-inner-border-radius: calc(.75rem - 1px); flex: initial; }
.modal { --bs-modal-border-radius: .75rem; }
.alert { --bs-alert-border-radius: .65rem; }
.progress { --bs-progress-border-radius: 999px; }
.pagination { --bs-pagination-border-radius: .5rem; }
.list-group { --bs-list-group-border-radius: 0; }
.badge { --bs-badge-border-radius: .375rem; }

.btn-outline-secondary {
    --bs-btn-color: #4b5563;
    --bs-btn-border-color: #d1d5db;
    --bs-btn-hover-color: #1f2328;
    --bs-btn-hover-bg: #f3f4f6;
    --bs-btn-hover-border-color: #c4c8cf;
    --bs-btn-active-color: #1f2328;
    --bs-btn-active-bg: #e5e7eb;
    --bs-btn-active-border-color: #c4c8cf;
}
.btn-light {
    --bs-btn-bg: #f3f4f6;
    --bs-btn-border-color: #f3f4f6;
    --bs-btn-hover-bg: #e5e7eb;
    --bs-btn-hover-border-color: #e5e7eb;
}

/* Menu latéral : fond blanc (le thème force "transparent") */
.app-sidebar.offcanvas-lg { background-color: #fff !important; }
@media (min-width: 992px) {
    .app-sidebar.offcanvas-lg { border-right: 1px solid var(--app-border) !important; }
}

/* Cartes d'indicateurs : icône à gauche, texte à droite */
.card.stat-card { flex-direction: row; align-items: center; justify-content: flex-start; text-align: left; }

/* Barres de recherche dans les en-têtes de cartes : sur une seule ligne */
.card-header form.d-flex { flex-wrap: nowrap; }
.card-header form.d-flex .form-control { width: auto; flex: 1 1 240px; }
@media (max-width: 575.98px) {
    .card-header form.d-flex { flex-wrap: wrap; width: 100%; }
}

/* Textes secondaires : gris neutre (le thème les teinte en bleu) */
.text-muted, .form-text { color: var(--app-muted) !important; }
.input-group-text { background: #f8f9fa; border-color: var(--bs-border-color); }

/* Choix du rôle sous forme de cartes */
.role-option {
    display: flex; gap: .85rem; align-items: flex-start;
    padding: 1rem; cursor: pointer;
    border: 1px solid var(--app-border); border-radius: .65rem;
    transition: border-color .15s ease, background-color .15s ease;
}
.role-option:hover { border-color: #f27a7e; }
.role-option .form-check-input { margin-top: .2rem; flex: 0 0 auto; }
.role-option .form-check-input:checked { background-color: var(--cem); border-color: var(--cem); }
.role-option:has(input:checked) { border-color: var(--cem); background: var(--cem-soft); }
.role-body { display: flex; flex-direction: column; gap: .2rem; }
.role-title { font-weight: 600; }
.role-desc { color: var(--app-muted); font-size: .85rem; }

/* ---------- Photo d'identité ---------- */
.photo-bloc { flex: 0 0 150px; width: 150px; margin: 0 auto; }
.photo-cadre {
    width: 150px; height: 180px; border-radius: .65rem; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    background: #f3f4f6; border: 1px dashed #cfd3da; color: #c3c8d0; font-size: 3.5rem;
}
.photo-cadre img { width: 100%; height: 100%; object-fit: cover; }
.photo-cadre.est-invalide { border-color: var(--bs-danger); }
.photo-cadre.est-retiree img { opacity: .3; filter: grayscale(1); }

.avatar-client {
    flex: 0 0 38px; width: 38px; height: 38px; border-radius: 50%; overflow: hidden;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--cem-soft); color: var(--cem-dark); font-weight: 600; font-size: .8rem;
}
.avatar-client img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Pièces jointes ---------- */
.zone-depot {
    display: flex; align-items: center; justify-content: center; gap: .75rem; flex-wrap: wrap;
    padding: 1.4rem 1rem; text-align: center; cursor: pointer; margin: 0;
    border: 2px dashed #cfd3da; border-radius: .65rem; background: #fafafa; color: var(--app-muted);
    transition: border-color .15s ease, background-color .15s ease;
}
.zone-depot i { font-size: 1.6rem; color: var(--cem); }
.zone-depot:hover, .zone-depot.survol { border-color: var(--cem); background: var(--cem-soft); }
.pieces-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: .75rem; }
.pieces-grille:empty { display: none; }
.piece-carte { border: 1px solid var(--app-border); border-radius: .55rem; padding: .45rem; background: #fff; min-width: 0; }
.piece-carte.nouvelle { border-color: #9bd7b8; }
.piece-carte.est-retiree { opacity: .45; border-style: dashed; }
.piece-carte.est-retiree .piece-nom { text-decoration: line-through; }
.piece-vignette {
    display: flex; align-items: center; justify-content: center; height: 90px; border-radius: .4rem;
    overflow: hidden; background: #f3f4f6; color: #9aa1ab; font-size: 2.2rem; text-decoration: none;
}
.piece-vignette img { width: 100%; height: 100%; object-fit: cover; }
.piece-vignette .fa-file-pdf { color: #d93025; }
.piece-vignette .fa-file-word { color: #2b579a; }
.piece-nom { font-size: .8rem; font-weight: 500; margin-top: .35rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.piece-retirer {
    border: 0; background: transparent; color: var(--app-muted); cursor: pointer;
    padding: .1rem .3rem; border-radius: .3rem; line-height: 1;
}
.piece-retirer:hover, .piece-carte.est-retiree .piece-retirer { color: var(--bs-danger); background: #fdecec; }
.piece-lien {
    display: inline-flex; align-items: center; max-width: 240px; padding: .3rem .6rem; font-size: .85rem;
    border: 1px solid var(--app-border); border-radius: 2rem; background: #fff; color: inherit; text-decoration: none;
}
.piece-lien span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.piece-lien:hover { border-color: var(--cem); color: var(--cem-dark); }

/* ---------- Historique des actions ---------- */
.app-avatar-sm { width: 26px; height: 26px; font-size: .75rem; flex: 0 0 26px; }
.journal-table td { vertical-align: top; }
.journal-jour td {
    background: #f6f7f9 !important; font-size: .75rem; font-weight: 700; letter-spacing: .04em;
    text-transform: uppercase; color: var(--app-muted); padding-top: .45rem; padding-bottom: .45rem;
}
.journal-details { border-left: 3px solid var(--cem-soft); padding: .25rem 0 .25rem .75rem; font-size: .85rem; }
.journal-modif { display: grid; grid-template-columns: minmax(120px, 200px) 1fr; gap: .75rem; padding: .15rem 0; }
.journal-modif del { color: #9aa1ab; }
@media (max-width: 575.98px) { .journal-modif { grid-template-columns: 1fr; gap: 0; } }


/* ---------- Galerie (détails client) et visionneuse ---------- */
.galerie { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .75rem; max-width: 1100px; }
.galerie-item {
    position: relative; display: flex; align-items: center; justify-content: center;
    height: 140px; border-radius: .55rem; overflow: hidden; text-decoration: none;
    background: #fff; border: 1px solid var(--app-border); color: var(--app-muted);
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.galerie-item:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0, 0, 0, .12); border-color: var(--cem); }
.galerie-item img { width: 100%; height: 100%; object-fit: cover; }
.galerie-portrait { border: 2px solid var(--cem); }
.galerie-portrait img { object-position: top; }
.galerie-fichier i { font-size: 2.6rem; margin-bottom: 1.2rem; }
.galerie-fichier .fa-file-pdf { color: #d93025; }
.galerie-fichier .fa-file-word { color: #2b579a; }
.galerie-legende {
    position: absolute; left: 0; right: 0; bottom: 0; padding: .3rem .5rem;
    font-size: .75rem; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, .7));
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left;
}
.galerie-fichier .galerie-legende { color: #374151; background: #f3f4f6; }
.galerie-modal { background: #111; color: #fff; }
.galerie-modal .modal-header { padding: .75rem 1rem; }
#galerieImage { max-width: 100%; max-height: 78vh; object-fit: contain; cursor: pointer; }
.galerie-nav {
    position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%;
    border: 0; background: rgba(255, 255, 255, .15); color: #fff; font-size: 1.1rem;
}
.galerie-nav:hover { background: var(--cem); }
.galerie-nav.prec { left: 12px; }
.galerie-nav.suiv { right: 12px; }

.avatar-zoom { cursor: zoom-in; transition: transform .15s ease, box-shadow .15s ease; }
.avatar-zoom:hover { transform: scale(1.15); box-shadow: 0 0 0 2px var(--cem); }


/* ---------- Page de connexion ---------- */
.auth-page { background: #f4f5f7; min-height: 100vh; }
.auth-shell { display: flex; min-height: 100vh; }
.auth-brand {
    flex: 0 0 44%; max-width: 620px; position: relative; overflow: hidden;
    display: flex; flex-direction: column; justify-content: space-between;
    padding: 3rem 3.5rem; color: #fff;
    background: linear-gradient(150deg, var(--cem) 0%, var(--cem-dark) 70%, #8f0004 100%);
}
.auth-brand::before, .auth-brand::after {
    content: ""; position: absolute; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .12);
}
.auth-brand::before { width: 520px; height: 520px; right: -220px; top: -160px; }
.auth-brand::after { width: 380px; height: 380px; left: -160px; bottom: -140px; border-color: rgba(255, 255, 255, .08); }
.auth-brand-inner { position: relative; z-index: 1; margin: auto 0; }
.auth-logo-card {
    display: inline-block; background: #fff; border-radius: 1rem; padding: 1rem 1.4rem;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .18); margin-bottom: 2.25rem;
}
.auth-logo-card img { max-width: 240px; display: block; }
.auth-brand-title { font-size: 2.1rem; font-weight: 800; margin: 0; letter-spacing: -.01em; }
.auth-brand-sub { opacity: .85; font-size: 1.05rem; margin: .25rem 0 2rem; }
.auth-points { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.auth-points li { display: flex; gap: .9rem; align-items: center; font-size: .98rem; }
.auth-points i {
    flex: 0 0 38px; width: 38px; height: 38px; border-radius: 10px; display: inline-flex;
    align-items: center; justify-content: center; background: rgba(255, 255, 255, .16);
}
.auth-brand-foot { position: relative; z-index: 1; font-size: .8rem; opacity: .7; margin: 2rem 0 0; }
.auth-main { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2rem 1.25rem; }
.auth-form {
    width: 100%; max-width: 430px; background: #fff; border-radius: 1rem; padding: 2.5rem 2.25rem;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 12px 32px rgba(16, 24, 40, .08);
}
.auth-logo-mobile { display: none; text-align: center; margin-bottom: 1.5rem; }
.auth-logo-mobile img { max-width: 190px; }
.auth-title { font-size: 1.6rem; font-weight: 800; margin-bottom: .25rem; }
.auth-subtitle { color: var(--app-muted); margin-bottom: 1.75rem; }
.auth-input .input-group-text { background: #f8f9fa; color: #9aa1ab; border-right: 0; font-size: 1rem; }
.auth-input .form-control { border-left: 0; font-size: 1rem; }
.auth-input .form-control:focus { box-shadow: none; }
.auth-input:focus-within .input-group-text,
.auth-input:focus-within .form-control,
.auth-input:focus-within .btn-voir { border-color: var(--cem); }
.auth-input:focus-within { box-shadow: 0 0 0 .2rem rgba(229, 0, 6, .15); border-radius: var(--bs-border-radius-lg); }
.auth-input .btn-voir { border: 1px solid var(--bs-border-color); border-left: 0; background: #fff; color: #9aa1ab; }
.auth-input .btn-voir:hover { color: var(--cem); }
.auth-input .form-control.is-invalid ~ .btn-voir,
.auth-input .form-control.is-invalid { border-color: var(--bs-danger); }
.auth-page .form-check-input:checked { background-color: var(--cem); border-color: var(--cem); }
.auth-note {
    display: flex; gap: .75rem; align-items: flex-start; padding: .85rem 1rem; border-radius: .65rem;
    background: var(--cem-soft); color: #5b1517; font-size: .87rem;
}
.auth-note i { color: var(--cem); margin-top: .15rem; }
.auth-help { color: var(--app-muted); font-size: .8rem; margin: 1.5rem 0 0; }
@media (max-width: 991.98px) {
    .auth-brand { display: none; }
    .auth-logo-mobile { display: block; }
}
@media (max-width: 575.98px) {
    .auth-form { padding: 2rem 1.35rem; box-shadow: none; background: transparent; }
    .auth-page { background: #fff; }
}

.auth-lien { color: var(--cem); font-weight: 500; text-decoration: none; white-space: nowrap; }
.auth-lien:hover { color: var(--cem-dark); text-decoration: underline; }
.auth-page .form-check-label { white-space: nowrap; }
.auth-input .form-control:focus { border-color: var(--cem); }

.app-user-lien { color: inherit; text-decoration: none; border-radius: .5rem; padding: .25rem; margin: -.25rem; }
.app-user-lien:hover { background: var(--cem-soft); }

/* Liste des crédits : nom du client sur une ligne */
.table-app td .fw-semibold { white-space: nowrap; }

@media (min-width: 1600px) { .texte-xl { display: inline !important; } }


/* ---------- Recouvrement : cloche, menu, liste à relancer ---------- */
.cloche { position: relative; width: 40px; height: 40px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.cloche-badge {
    position: absolute; top: -4px; right: -4px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px;
    background: var(--cem); color: #fff; font-size: .68rem; font-weight: 700; line-height: 19px; text-align: center;
    box-shadow: 0 0 0 2px #fff;
}
.cloche-menu { width: 300px; padding: .4rem 0; border: 1px solid var(--app-border); border-radius: .75rem; }
.cloche-entete { padding: .4rem 1rem .6rem; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--app-muted); }
.cloche-ligne { display: flex; align-items: center; gap: .7rem; padding: .55rem 1rem; }
.cloche-icone { width: 30px; height: 30px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-size: .85rem; }
.cloche-icone.red { background: var(--cem-soft); color: var(--cem); }
.cloche-icone.amber { background: #fff4e0; color: #b45309; }
.cloche-icone.blue { background: #e8f0fe; color: #1a56db; }
.cloche-icone.gray { background: #eef0f3; color: #9aa1ab; }
.nav-badge { margin-left: auto; background: var(--cem); color: #fff; border-radius: 10px; font-size: .72rem; font-weight: 700; padding: .1rem .5rem; }
.app-nav .nav-link { display: flex; align-items: center; }

.relance-onglets { display: flex; gap: .5rem; flex-wrap: wrap; }
.relance-onglet {
    display: inline-flex; align-items: center; gap: .55rem; padding: .6rem 1rem; border-radius: .65rem;
    background: #fff; border: 1px solid var(--app-border); color: inherit; text-decoration: none; font-weight: 500;
}
.relance-onglet:hover { border-color: #f27a7e; color: inherit; }
.relance-onglet.actif { border-color: var(--cem); background: var(--cem-soft); color: var(--cem-dark); font-weight: 600; }
.relance-onglet i { color: var(--app-muted); }
.relance-onglet.actif i { color: var(--cem); }
tr.relance-faite td { background: #f6fbf8; }
.tel-lien {
    display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; text-decoration: none; color: #15803d;
    background: #e7f6ec; border-radius: 2rem; padding: .2rem .7rem; white-space: nowrap;
}
.tel-lien:hover { background: #d3efdd; color: #166534; }

.relance-types { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.relance-type { margin: 0; cursor: pointer; }
.relance-type input { position: absolute; opacity: 0; pointer-events: none; }
.relance-type span {
    display: flex; align-items: center; gap: .5rem; padding: .6rem .75rem; border-radius: .6rem;
    border: 1px solid var(--app-border); font-size: .88rem; transition: border-color .15s, background-color .15s;
}
.relance-type span i { color: var(--app-muted); width: 1.1rem; text-align: center; }
.relance-type:hover span { border-color: #f27a7e; }
.relance-type input:checked + span { border-color: var(--cem); background: var(--cem-soft); font-weight: 600; }
.relance-type input:checked + span i { color: var(--cem); }
.relance-type input:focus-visible + span { box-shadow: 0 0 0 .2rem rgba(229, 0, 6, .2); }
.relance-histo { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .7rem; padding: .45rem 0; border-bottom: 1px dashed var(--app-border); }
.relance-histo:last-of-type { border-bottom: 0; }

.resume-jour {
    display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; padding: 1rem 1.25rem; border-radius: .85rem;
    background: linear-gradient(100deg, #fff 0%, var(--cem-soft) 100%); border: 1px solid #f6c3c5;
}
.resume-icone {
    width: 44px; height: 44px; border-radius: 12px; background: var(--cem); color: #fff;
    display: inline-flex; align-items: center; justify-content: center; font-size: 1.15rem; flex: 0 0 44px;
}
.resume-chiffres { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; margin-top: .2rem; }
.resume-chiffres a { color: inherit; text-decoration: none; }
.resume-chiffres a:hover { color: var(--cem); text-decoration: underline; }
.resume-chiffres b { color: var(--cem); }

.relance-table td, .relance-table th { padding-left: .6rem; padding-right: .6rem; }
