/* ==========================================================================
   Espace client Mon Extension Bois — thème
   ========================================================================== */

@font-face {
    font-family: 'Bradleys Pen';
    src: url('bradleys%20Pen.ttf');
}

:root {
    /* Charte Mon Extension Bois — couleurs principales et nuances (75 / 50 / 25 / 10 %) */
    --brand: #92ad41;
    --brand-600: #7f9837;
    --brand-700: #66792c;
    --brand-75: #adc170;
    --brand-50p: #c8d6a0;
    --brand-100: #e4eacf;
    --brand-50: #f4f7ec;
    --accent: #e59974;
    --accent-75: #ebb397;
    --accent-50p: #f2ccb9;
    --accent-100: #f8e5dc;
    --accent-50: #fcf5f1;
    --brown: #42332d;
    --brown-75: #716661;
    --brown-50: #a09996;
    --brown-25: #d0ccca;
    --brown-10: #ecebea;
    --grey: #424242;
    --grey-75: #717171;
    --rust: #933f1d;
    --rust-25: #e4cfc6;
    --rust-10: #f4ece8;

    --ink: var(--brown);
    --text: var(--grey);
    --muted: var(--grey-75);
    --border: #e9e5e3;
    --bg: #f5f5f5;
    --surface: #ffffff;
    --surface-2: #f7f5f4;
    --danger: var(--rust);
    --warning: var(--accent);
    --radius: 16px;
    --radius-sm: 10px;
    --shadow-sm: 0 1px 2px rgba(66, 51, 45, .05), 0 1px 3px rgba(66, 51, 45, .07);
    --shadow-md: 0 12px 32px -14px rgba(66, 51, 45, .28);
    --sidebar-w: 268px;
    --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-weight: 400;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--brand-700);
}

a:hover {
    color: var(--brand-600);
}

/* --------------------------------------------------------------------------
   Shell : sidebar + zone principale
   -------------------------------------------------------------------------- */

.app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-w);
    background: var(--ink);
    color: rgba(255, 255, 255, .82);
    display: flex;
    flex-direction: column;
    padding: 22px 16px;
    z-index: 1035;
    overflow-y: auto;
    transition: transform 250ms ease;
}

.app-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 6px 12px 24px;
    color: #fff;
    text-decoration: none;
}

.app-brand:hover {
    color: #fff;
}

.app-brand-logo {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border-radius: 12px;
    background: var(--brand);
    display: grid;
    place-items: center;
    font-size: 18px;
    color: #fff;
}

.app-brand-img {
    display: block;
    width: 150px;
    height: auto;
}

.app-brand .app-brand-sub {
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .1);
    color: var(--brown-25);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.app-brand-name {
    display: block;
    font-weight: 700;
    font-size: 15px;
    line-height: 1.2;
}

.app-brand-sub {
    display: block;
    font-size: 12px;
    color: var(--brown-25);
    font-weight: 500;
}

.app-nav-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--brown-50);
    font-weight: 600;
    padding: 0 12px;
    margin: 8px 0 8px;
}

.app-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.app-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    margin-bottom: 2px;
    border-radius: var(--radius-sm);
    color: rgba(255, 255, 255, .82);
    text-decoration: none;
    font-weight: 500;
    font-size: 14.5px;
    transition: background 150ms ease, color 150ms ease;
}

.app-nav a i {
    width: 20px;
    text-align: center;
    font-size: 15px;
    color: var(--brown-50);
    transition: color 150ms ease;
}

.app-nav a:hover {
    background: rgba(255, 255, 255, .06);
    color: #fff;
}

.app-nav a.active {
    background: var(--brand);
    color: #fff;
}

.app-nav a.active i,
.app-nav a:hover i {
    color: #fff;
}

.app-help {
    margin-top: auto;
    padding: 16px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(255, 255, 255, .07);
}

.app-help-title {
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
}

.app-help p {
    font-size: 12.5px;
    color: var(--brown-25);
    margin-bottom: 12px;
}

.app-help-actions {
    display: flex;
    gap: 8px;
}

.app-help-actions a {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .08);
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
}

.app-help-actions a:hover {
    background: var(--brand);
    color: #fff;
}

.app-logout {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin-top: 12px;
    padding: 10px 12px;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: rgba(255, 255, 255, .82);
    font-weight: 500;
    font-size: 14.5px;
    text-align: left;
}

.app-logout i {
    width: 20px;
    text-align: center;
}

.app-logout:hover {
    background: rgba(229, 153, 116, .18);
    color: var(--accent-75);
}

.app-main {
    margin-left: var(--sidebar-w);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-topbar {
    position: sticky;
    top: 0;
    z-index: 1020;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 32px;
    background: rgba(245, 245, 245, .88);
    backdrop-filter: saturate(160%) blur(10px);
    -webkit-backdrop-filter: saturate(160%) blur(10px);
    border-bottom: 1px solid transparent;
}

.app-topbar.scrolled {
    border-bottom-color: var(--border);
}

.app-burger {
    display: none;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--ink);
    font-size: 17px;
}

.app-title {
    min-width: 0;
    flex: 1;
}

.app-title h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -.02em;
    line-height: 1.2;
}

.app-title p {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.icon-btn {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    display: inline-grid;
    place-items: center;
    font-size: 16px;
    text-decoration: none;
    transition: border-color 150ms ease, color 150ms ease;
}

.icon-btn:hover {
    border-color: var(--brand);
    color: var(--brand-700);
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 14px 5px 5px;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--border);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent-100);
    color: var(--rust);
    display: grid;
    place-items: center;
    font-size: 12.5px;
    font-weight: 700;
}

.user-name {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ink);
    max-width: 180px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-content {
    flex: 1;
    width: 100%;
    max-width: 1320px;
    padding: 8px 32px 48px;
}

.app-overlay {
    display: none;
}

#notif:not(:empty) {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 4px solid var(--brand);
    box-shadow: var(--shadow-sm);
    color: var(--ink);
    font-weight: 500;
    font-size: 14px;
}

#notif:not(:empty)::before {
    color: var(--brand-700);
    content: "\f05a";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
}

@media (max-width: 991.98px) {
    .app-sidebar {
        transform: translateX(-100%);
        box-shadow: none;
    }

    body.nav-open .app-sidebar {
        transform: none;
        box-shadow: 0 0 60px rgba(0, 0, 0, .3);
    }

    body.nav-open {
        overflow: hidden;
    }

    .app-overlay {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1032;
        background: rgba(66, 51, 45, .5);
        opacity: 0;
        pointer-events: none;
        transition: opacity 250ms ease;
    }

    body.nav-open .app-overlay {
        opacity: 1;
        pointer-events: auto;
    }

    .app-main {
        margin-left: 0;
    }

    .app-burger {
        display: inline-grid;
        place-items: center;
    }

    .app-topbar {
        padding: 14px 20px;
    }

    .app-content {
        padding: 8px 20px 40px;
    }
}

@media (max-width: 575.98px) {
    .app-topbar {
        padding: 12px 16px;
        gap: 12px;
    }

    .app-title h1 {
        font-size: 19px;
    }

    .app-title p,
    .user-name {
        display: none;
    }

    .user-chip {
        padding: 4px;
    }

    .app-content {
        padding: 4px 16px 32px;
    }
}

/* --------------------------------------------------------------------------
   Composants génériques
   -------------------------------------------------------------------------- */

.card-ui {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 24px;
}

.card-ui+.card-ui {
    margin-top: 24px;
}

.card-ui-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.card-ui-title {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -.01em;
}

.card-ui-sub {
    margin: 2px 0 0;
    font-size: 13.5px;
    color: var(--muted);
}

.section-icon.accent,
.stat-card .section-icon,
.support-strip .section-icon {
    background: var(--accent-100);
    color: var(--accent);
}

.section-icon {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border-radius: 12px;
    background: var(--brand-50);
    color: var(--brand-700);
    display: inline-grid;
    place-items: center;
    font-size: 16px;
}

.btn {
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    padding: 9px 18px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 8px;
}

.default_btn,
.btn-brand {
    background-color: var(--brand) !important;
    border: 1px solid var(--brand) !important;
    color: #fff !important;
    transition: background-color 150ms ease, box-shadow 150ms ease;
}

.default_btn:hover,
.default_btn:focus,
.btn-brand:hover,
.btn-brand:focus {
    background-color: var(--brand-600) !important;
    border-color: var(--brand-600) !important;
    color: #fff !important;
    box-shadow: 0 6px 16px -6px rgba(146, 173, 65, .7);
}

.btn-ghost {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
}

.btn-ghost:hover {
    border-color: var(--brand);
    color: var(--brand-700);
}

.form-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}

.form-control,
.form-select {
    border-radius: 10px;
    border: 1px solid var(--brown-25);
    padding: 10px 14px;
    font-size: 14.5px;
    color: var(--ink);
    background-color: #fff;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--brand) !important;
    box-shadow: 0 0 0 4px rgba(146, 173, 65, .18) !important;
}

.form-control:disabled,
.form-control[readonly] {
    background-color: var(--brown-10);
    color: var(--muted);
}

.field-icon {
    position: relative;
}

.field-icon>i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--brown-25);
    font-size: 14px;
    pointer-events: none;
}

.field-icon>.form-control {
    padding-left: 40px;
}

input.modified {
    font-weight: 600;
    background-color: var(--brand-50);
    border-color: var(--brand);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

@media (max-width: 575.98px) {
    .form-actions .btn {
        width: 100%;
    }
}

.badge-soft {
    display: inline-flex;
    white-space: nowrap;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    background: var(--brand-50);
    color: var(--brand-700);
}

.badge-soft.warning {
    background: var(--accent-100);
    color: var(--rust);
}

.badge-soft.neutral {
    background: var(--brown-10);
    color: var(--muted);
}

.print {
    display: flex !important;
}

.noprint {
    display: none !important;
}

/* --------------------------------------------------------------------------
   Bandeau admin (recherche / client chargé)
   -------------------------------------------------------------------------- */

.admin-bar {
    align-items: center;
    flex-wrap: wrap;
    gap: 12px 20px;
    margin: 0 0 24px;
    padding: 14px 18px;
    border-radius: var(--radius);
    background: var(--brown-10);
    border: 1px solid var(--brown-25);
}

.admin-bar-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--rust);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.admin-bar .search-input {
    position: relative;
    flex: 1;
    min-width: 220px;
}

.admin-bar .admin-bar-btn {
    flex: 0 0 auto;
}

.admin-client {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 28px;
    flex: 1;
    min-width: 0;
    font-size: 13px;
}

.admin-client b {
    color: var(--ink);
    font-weight: 600;
}

.search-input .autocomplete {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    z-index: 1050;
    margin: 0;
    padding: 0;
    opacity: 0;
    pointer-events: none;
    max-height: 280px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
}

.search-input.active .autocomplete:not(:empty) {
    padding: 6px;
    opacity: 1;
    pointer-events: auto;
}

.autocomplete li {
    list-style: none;
    padding: 8px 12px;
    display: none;
    width: 100%;
    cursor: pointer;
    border-radius: 6px;
    font-size: 14px;
}

.search-input.active .autocomplete li {
    display: block;
}

.autocomplete li:hover {
    background: var(--brand-50);
}

/* --------------------------------------------------------------------------
   Accueil
   -------------------------------------------------------------------------- */

.dash-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.dash-hero {
    grid-column: span 2;
    position: relative;
    display: flex;
    overflow: hidden;
    min-height: 260px;
    border-radius: var(--radius);
    background: linear-gradient(120deg, var(--brown) 0%, var(--brown) 35%, var(--brand-700) 100%);
    color: #fff;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    transition: transform 200ms ease, box-shadow 200ms ease;
}

.dash-hero:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 40px -18px rgba(66, 51, 45, .5);
}

.dash-hero-text {
    position: relative;
    z-index: 2;
    flex: 1 1 55%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 28px;
}

.eyebrow {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #fff;
    margin-bottom: 10px;
}

.dash-hero h2 {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -.02em;
    margin: 0 0 8px;
}

.dash-hero p {
    color: rgba(255, 255, 255, .78);
    font-size: 14.5px;
    margin: 0 0 20px;
    max-width: 320px;
}

.dash-hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    align-self: flex-start;
    padding: 10px 16px;
    border-radius: 10px;
    background: #fff;
    color: var(--ink);
    font-weight: 600;
    font-size: 14px;
}

.dash-hero::before {
    content: "";
    position: absolute;
    right: -80px;
    bottom: -120px;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(229, 153, 116, .22) 0%, rgba(229, 153, 116, 0) 70%);
    pointer-events: none;
}

.dash-hero-media {
    position: relative;
    flex: 1 1 45%;
    display: grid;
    place-items: center;
    padding: 16px;
}

.dash-hero-media img {
    position: relative;
    z-index: 1;
    width: 100%;
    max-height: 230px;
    object-fit: contain;
    filter: drop-shadow(0 18px 24px rgba(0, 0, 0, .35));
}

.dash-hero-media img:not([src]),
.dash-hero-media img[src=""] {
    display: none;
}

.dash-hero-media .placeholder-icon {
    position: absolute;
    font-size: 96px;
    color: rgba(255, 255, 255, .12);
}

.tile {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 22px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}

.tile:hover {
    transform: translateY(-3px);
    border-color: var(--brand-100);
    box-shadow: var(--shadow-md);
}

.tile-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: var(--brand-50);
    color: var(--brand-700);
    display: grid;
    place-items: center;
    font-size: 20px;
    margin-bottom: 14px;
    transition: background 200ms ease, color 200ms ease;
}

.tile:hover .tile-icon {
    background: var(--brand);
    color: #fff;
}

.tile>div {
    margin-top: auto;
}

.tile-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--ink);
    margin: 0;
}

.tile-desc {
    font-size: 13.5px;
    color: var(--muted);
    margin: 0;
    line-height: 1.45;
}

.tile-arrow {
    position: absolute;
    top: 22px;
    right: 22px;
    color: var(--brown-50);
    font-size: 14px;
    transition: transform 200ms ease, color 200ms ease;
}

.tile:hover .tile-arrow {
    color: var(--brand);
    transform: translateX(3px);
}

.support-strip {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px 24px;
    margin-top: 24px;
    padding: 20px 24px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.support-strip-text {
    flex: 1;
    min-width: 220px;
}

.support-strip-text strong {
    display: block;
    color: var(--ink);
    font-size: 15.5px;
}

.support-strip-text span {
    color: var(--muted);
    font-size: 13.5px;
}

.support-strip-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

@media (max-width: 1199.98px) {
    .dash-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .dash-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .dash-hero {
        grid-column: auto;
        flex-direction: column-reverse;
        min-height: 0;
    }

    .dash-hero-media {
        padding: 20px 20px 0;
        min-height: 60px;
    }

    .dash-hero-media img {
        max-height: 170px;
    }

    .dash-hero-media .placeholder-icon {
        display: none;
    }

    .dash-hero-text {
        padding: 20px;
    }

    .dash-hero h2 {
        font-size: 22px;
    }

    .tile {
        flex-direction: row;
        align-items: center;
        gap: 14px;
        padding: 14px 44px 14px 14px;
    }

    .tile-icon {
        width: 44px;
        height: 44px;
        flex: 0 0 44px;
        margin: 0;
        font-size: 18px;
    }

    .tile-arrow {
        top: 50%;
        right: 18px;
        transform: translateY(-50%);
    }

    .tile:hover .tile-arrow {
        transform: translate(3px, -50%);
    }

    .support-strip {
        padding: 18px;
    }

    .support-strip-actions,
    .support-strip-actions .btn {
        width: 100%;
    }
}

/* --------------------------------------------------------------------------
   Mon projet
   -------------------------------------------------------------------------- */

.project-photo {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 320px;
    border-radius: 12px;
    background: radial-gradient(circle at 50% 40%, #ffffff 0%, var(--brand-50) 100%);
    overflow: hidden;
}

.project-photo img {
    position: relative;
    z-index: 1;
    width: 100%;
    max-height: 460px;
    object-fit: contain;
    padding: 20px;
}

.project-photo img:not([src]),
.project-photo img[src=""] {
    display: none;
}

.project-photo .placeholder-icon {
    position: absolute;
    font-size: 80px;
    color: var(--brown-25);
}

.photo-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 16px;
}

.spec-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.spec {
    display: flex;
    gap: 14px;
    padding: 16px;
    border-radius: 12px;
    background: var(--surface-2);
    border: 1px solid var(--border);
}

.spec-body {
    flex: 1;
    min-width: 0;
}

.spec-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--muted);
    margin-bottom: 4px;
}

.spec-body>div:last-child {
    padding: 0 !important;
    color: var(--ink);
    font-weight: 500;
    font-size: 15px;
    line-height: 1.55;
    word-wrap: break-word;
}

.spec-body textarea {
    min-height: 90px;
    font-size: 14px;
}

.timeline-img {
    display: block;
    width: 100%;
    max-width: 1100px;
    height: auto;
    margin: 0 auto;
}

@media (max-width: 767.98px) {
    .timeline-img {
        max-width: 420px;
    }
}

/* --------------------------------------------------------------------------
   Factures
   -------------------------------------------------------------------------- */

.stat-card {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding: 20px 24px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.stat-card:empty {
    display: none;
}

.stat-card .section-icon {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
    font-size: 18px;
}

.stat-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .05em;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -.02em;
    line-height: 1.2;
}

.stat-card .admin-amount {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 6px;
}

.stat-card .admin-amount .montant {
    flex: 0 1 220px;
    width: auto;
}

/* --------------------------------------------------------------------------
   Devis : bandeau financement
   -------------------------------------------------------------------------- */

.promo-banner {
    position: relative;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px 24px;
    margin-bottom: 24px;
    padding: 24px 28px;
    border-radius: var(--radius);
    overflow: hidden;
    background: linear-gradient(120deg, var(--accent-50) 0%, #ffffff 70%);
    border: 1px solid var(--accent-100);
}

.promo-banner::after {
    content: "";
    position: absolute;
    right: -60px;
    top: -60px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: var(--accent-100);
    opacity: .7;
    pointer-events: none;
}

.promo-banner .section-icon {
    width: 52px;
    height: 52px;
    flex-basis: 52px;
    background: var(--accent);
    color: #fff;
    font-size: 20px;
}

.promo-text {
    flex: 1;
    min-width: 220px;
    position: relative;
    z-index: 1;
}

.promo-text strong {
    display: block;
    font-size: 17px;
    color: var(--ink);
    letter-spacing: -.01em;
}

.promo-text span {
    font-size: 14px;
    color: var(--muted);
}

.promo-actions {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

@media (max-width: 575.98px) {
    .promo-banner {
        padding: 20px;
    }

    .promo-actions,
    .promo-actions .btn {
        width: 100%;
    }
}

/* --------------------------------------------------------------------------
   Documents : onglets
   -------------------------------------------------------------------------- */

.tabs-pills {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    margin: 0 0 20px;
    padding: 5px;
    list-style: none;
    border: 1px solid var(--border) !important;
    border-radius: 14px;
    background: var(--surface);
    width: fit-content;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
}

.tabs-pills::-webkit-scrollbar {
    display: none;
}

.tabs-pills .nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    padding: 9px 16px;
    border: 0 !important;
    border-radius: 10px !important;
    color: var(--muted) !important;
    font-size: 14px;
    font-weight: 600;
    background: transparent;
    cursor: pointer;
}

.tabs-pills .nav-link:hover {
    color: var(--ink) !important;
    background: var(--surface-2);
}

.tabs-pills .nav-link.active {
    background: var(--ink) !important;
    color: #fff !important;
}

/* --------------------------------------------------------------------------
   Financement
   -------------------------------------------------------------------------- */

#oldDemandes:not(:empty) {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0 0 20px;
    padding: 14px 16px;
    border-radius: 12px;
    background: var(--brand-50);
    border: 1px solid var(--brand-100);
    font-size: 13.5px;
    color: var(--text);
}

#oldDemandes u {
    text-decoration: none;
}

#oldDemandes b {
    font-weight: 600;
}

.steps {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: step;
}

.steps li {
    position: relative;
    padding: 0 0 18px 44px;
    font-size: 14px;
    color: var(--muted);
}

.steps li strong {
    display: block;
    color: var(--ink);
    font-size: 14.5px;
}

.steps li::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--accent-100);
    color: var(--rust);
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 13px;
}

/* --------------------------------------------------------------------------
   SAV
   -------------------------------------------------------------------------- */

.sav-hero {
    display: flex;
    align-items: center;
    gap: 32px;
}

.sav-avatar {
    width: 168px;
    height: 168px;
    flex: 0 0 168px;
    border-radius: 50%;
    object-fit: cover;
    border: 6px solid var(--brand-50);
    box-shadow: var(--shadow-md);
}

.sav-hero h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -.02em;
    margin: 6px 0 12px;
}

.sav-hero p {
    color: var(--muted);
    line-height: 1.6;
}

.contact-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
    margin-top: 24px;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--ink);
    text-decoration: none;
    min-width: 0;
    transition: border-color 150ms ease, background 150ms ease;
}

.contact-card:hover {
    border-color: var(--brand);
    background: var(--brand-50);
    color: var(--ink);
}

.contact-card small {
    display: block;
    color: var(--muted);
    font-size: 12px;
}

.contact-card>div>span {
    display: block;
    font-weight: 600;
    font-size: 14.5px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.contact-card>div {
    min-width: 0;
}

@media (max-width: 767.98px) {
    .sav-hero {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }

    .sav-avatar {
        width: 128px;
        height: 128px;
        flex-basis: 128px;
    }
}

/* --------------------------------------------------------------------------
   Modales
   -------------------------------------------------------------------------- */

.modal-content {
    border: 0;
    border-radius: var(--radius);
    box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .35);
}

.modal-header {
    border-bottom: 1px solid var(--border);
    padding: 16px 20px;
}

.modal-title {
    font-weight: 700;
    font-size: 16px !important;
    color: var(--ink);
}

.modal-footer {
    border-top: 1px solid var(--border);
}

#modalMail .modal-dialog {
    max-width: min(80vw, 1100px) !important;
}

#typeMail {
    margin-bottom: 20px;
}

@media (max-width: 767.98px) {
    #modalMail .modal-dialog {
        max-width: none !important;
    }
}

/* --------------------------------------------------------------------------
   Héritage (pages non refondues : mara, *_new, *_old)
   -------------------------------------------------------------------------- */

.mainTitle {
    font-size: 26px;
    font-weight: 700;
    color: var(--ink);
}

.subTitle {
    font-size: 18px;
}

.greenBradley {
    color: var(--brand);
    font-family: 'Bradleys Pen', sans-serif;
    font-size: 40px;
}

hr.green {
    margin: 5px auto 15px !important;
    color: var(--brand);
    height: 2px !important;
    opacity: 1;
    width: 90%;
}

span.iconTop {
    color: #00000099;
    margin-left: 10px;
    font-size: 25px;
}

span.iconTop a,
span.iconTop a:visited {
    color: #00000099;
}

.imgmara img {
    border: 10px solid var(--brand);
    width: 100%;
}

.descriptifClient {
    font-size: 12px;
    width: 50%;
}

.input-group-prepend span {
    width: 40px;
    background-color: var(--brand);
    color: white;
    border: 0 !important;
}

.input-group-text {
    color: white !important;
}

#changePhotoBtn {
    min-width: 150px;
    text-align: center;
    white-space: nowrap;
}

.btn-close-x {
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 26px;
    line-height: 1;
    opacity: 1;
}

.btn-close-x:hover {
    color: var(--ink);
}

@media (max-width: 575.98px) {
    .tile>div {
        margin-top: 0;
    }
}

.stat-card>div:last-child {
    flex: 1;
    min-width: 0;
}

#modalMail .modal-footer {
    flex-wrap: wrap;
    gap: 8px;
}

@media (max-width: 767.98px) {
    #modalMail .modal-footer .btn {
        width: 100% !important;
        margin: 0;
    }
}

/* --------------------------------------------------------------------------
   Accents orange (couleur secondaire de la marque)
   Vert = actions / navigation ; orange = accents et icônes d'information
   -------------------------------------------------------------------------- */

.section-icon {
    background: var(--accent-100);
    color: var(--rust);
}

/* Titre de page souligné d'un trait orange */
.app-title h1 {
    position: relative;
    display: inline-block;
    padding-bottom: 6px;
}

.app-title h1::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 36px;
    height: 3px;
    border-radius: 3px;
    background: var(--accent);
}

/* Menu latéral */
.app-help-actions a:hover {
    background: var(--accent);
}

.app-nav a:not(.active):hover i {
    color: var(--accent-75);
}

/* Accueil */
.eyebrow::before {
    content: "";
    display: inline-block;
    width: 18px;
    height: 2px;
    margin-right: 8px;
    vertical-align: middle;
    background: var(--accent);
}

.dash-hero-cta {
    background: var(--accent);
    color: #fff;
}

.tile:hover {
    border-color: var(--accent-100);
}

.tile:hover .tile-arrow {
    color: var(--accent);
}

/* Boutons secondaires, liens d'icône */
.btn-ghost:hover,
.icon-btn:hover {
    border-color: var(--accent);
    color: var(--rust);
}

.contact-card:hover {
    border-color: var(--accent);
    background: var(--accent-50);
}

#notif:not(:empty) {
    border-left-color: var(--accent);
}

#notif:not(:empty)::before {
    color: var(--accent);
}

/* Carte « ajouter une pièce » (admin) */
.file-man-box.addFile:hover .addFile-icon {
    background: var(--accent);
}

/* --------------------------------------------------------------------------
   Pied de page et pages légales
   -------------------------------------------------------------------------- */

.app-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 20px;
    padding: 20px 32px 28px;
    max-width: 1320px;
    font-size: 13px;
    color: var(--muted);
}

.app-footer a {
    color: var(--muted);
    text-decoration: none;
}

.app-footer a:hover {
    color: var(--rust);
    text-decoration: underline;
}

@media (max-width: 991.98px) {
    .app-footer {
        padding: 16px 20px 24px;
    }
}

.form-legal {
    margin: 20px 0 0;
    font-size: 12.5px;
    color: var(--muted);
    line-height: 1.5;
}

.legal-page {
    max-width: 920px;
    margin: 0 auto;
    padding: 24px 16px 0;
}

.legal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.legal-logo img {
    display: block;
    width: 140px;
    height: auto;
}

.legal-content {
    padding: 36px 40px;
    line-height: 1.65;
}

.legal-content h1 {
    margin: 0 0 6px;
    font-size: 28px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -.02em;
}

.legal-updated {
    margin-bottom: 28px;
    font-size: 13.5px;
    color: var(--muted);
}

.legal-content h2 {
    margin: 32px 0 12px;
    padding-left: 12px;
    border-left: 3px solid var(--accent);
    font-size: 17px;
    font-weight: 700;
    color: var(--ink);
}

.legal-content ul {
    padding-left: 20px;
}

.legal-content li {
    margin-bottom: 6px;
}

.legal-content b {
    font-weight: 600;
    color: var(--ink);
}

.legal-table {
    width: 100%;
    min-width: 560px;
    border-collapse: collapse;
    font-size: 13.5px;
}

.legal-table th,
.legal-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

.legal-table th {
    background: var(--surface-2);
    color: var(--ink);
    font-weight: 600;
}

mark.todo {
    padding: 1px 6px;
    border-radius: 4px;
    background: var(--accent-100);
    color: var(--rust);
    font-weight: 600;
}

.legal-page .app-footer {
    justify-content: center;
    padding: 24px 0 32px;
}

@media (max-width: 575.98px) {
    .legal-content {
        padding: 24px 20px;
    }

    .legal-content h1 {
        font-size: 23px;
    }
}

/* Mention obligatoire crédit (art. L312-8 : caractères plus grands que les autres informations de financement) */
.credit-mention {
    margin: 6px 0 0;
    font-size: 13px;
    font-weight: 400;
    font-style: italic;
    color: var(--muted);
    line-height: 1.45;
}

.steps+.credit-mention {
    margin: 0 0 18px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.app-content>.legal-content {
    max-width: 920px;
}

.legal-content>h2:first-child {
    margin-top: 0;
}
