:root {
    --bleu: #0B2342;
    --or: #C9963A;
    --blanc: #F5F3EE;
    --fond: #F5F3EE;
    --titre: #0B2342;
    --bord: #C9963A;
    --text: #0B2342;
    --panel-bg: #ffffff;
    --accent: #f9f6f0;
    --danger: #c0392b;
    --muted: #8A8880;
    --focus: #C9963A;
    --radius: 10px;
    --shadow: 0 4px 10px rgba(11,35,66,0.08);
}
* { box-sizing: border-box; }
body {
    margin: 0; font-family: 'DM Sans', system-ui, sans-serif;
    background: var(--fond); color: var(--text);
    line-height: 1.5; -webkit-font-smoothing: antialiased;
}

/* NAV */
.sim-nav {
    background: var(--bleu); padding: 0.8rem 5%;
    display: flex; align-items: center; justify-content: space-between;
}
.sim-nav a.retour {
    color: rgba(255,255,255,0.75); text-decoration: none;
    font-family: 'DM Sans', sans-serif; font-size: 0.88rem; transition: color 0.2s;
}
.sim-nav a.retour:hover { color: var(--or); }
.sim-nav a.retour::before { content: '← '; }
.sim-nav .logo { font-family: 'Arial Black', sans-serif; font-size: 1.2rem; font-weight: 800; color: #fff; text-decoration: none; }
.sim-nav .logo span { color: var(--or); }
.sim-footer { background: var(--bleu); padding: 1rem 5%; text-align: center; margin-top: 3rem; }
.sim-footer a { color: rgba(255,255,255,0.6); text-decoration: none; font-family: 'DM Sans', sans-serif; font-size: 0.85rem; }
.sim-footer a:hover { color: var(--or); }

header { background: var(--blanc); padding: 1.6rem 1rem; text-align: center; }
h1 {
    margin: 0 auto; font-size: clamp(1.7rem, 2.8vw, 2.4rem);
    color: var(--titre); letter-spacing: 1px; display: block;
    border-bottom: 2px solid var(--or); padding-bottom: .3em;
    max-width: 1250px; width: 100%; text-align: center;
    font-family: 'Josefin Sans', sans-serif;
}
h2 { font-size: 1.3rem; margin-top: 0; color: var(--titre); font-family: 'Josefin Sans', sans-serif; }
h3 { margin: 0 0 .5rem; font-size: 1rem; color: var(--titre); }
main { max-width: 1300px; margin: 1.5rem auto 3rem; padding: 0 1rem; }
form { margin-bottom: 2rem; }
.grid.two { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.panel {
    background: var(--panel-bg); padding: 1.2rem 1.2rem 1.6rem;
    border: 2px solid var(--or); border-radius: var(--radius);
    box-shadow: var(--shadow); display: flex; flex-direction: column; gap: .8rem;
}
.panel p { margin: 0 0 .5rem; font-size: .9rem; color: var(--muted); }
#liste-biens .item, #liste-dettes .item {
    display: grid; gap: .6rem .9rem; align-items: end;
    background: #fdf9f4; padding: .7rem .7rem 1rem;
    border: 1px solid var(--or); border-radius: 8px; margin-bottom: .6rem; position: relative;
}
#liste-biens .item { grid-template-columns: 1fr 1fr 54px; }
#liste-dettes .item { grid-template-columns: 1fr 1fr 54px; }
.item label { display: flex; flex-direction: column; font-size: .65rem; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); gap: .3rem; }
.item input[type="text"], .item select { padding: .6rem; border: 1px solid rgba(201,150,58,0.4); border-radius: 6px; font-size: .9rem; background: #fff; }
.item input:focus, .item select:focus, input:focus, select:focus { outline: 2px solid var(--or); outline-offset: 1px; }
.btn {
    appearance: none; border: 2px solid var(--or); background: transparent;
    color: var(--titre); padding: .65rem 1rem; font-size: .9rem; border-radius: 50px;
    cursor: pointer; font-weight: 600; display: inline-flex; align-items: center; gap: .4rem;
    transition: background .25s, color .25s;
}
.btn.primary { background: var(--or); color: #fff; border-color: var(--or); }
.btn.primary:hover { background: var(--bleu); border-color: var(--bleu); }
.btn.secondary { background: #fff; }
.btn:hover { background: var(--bleu); color: #fff; border-color: var(--bleu); }
.remove-btn { background: #fff; border: 2px solid var(--danger); color: var(--danger); width: 40px; height: 40px; border-radius: 50%; font-size: 1.2rem; display: flex; justify-content: center; align-items: center; padding: 0; }
.remove-btn:hover { background: var(--danger); color: #fff; }
label { display: flex; flex-direction: column; gap: .4rem; font-size: .8rem; font-weight: 600; color: var(--muted); }
input[type="text"], select { padding: .7rem .75rem; border: 2px solid rgba(201,150,58,0.3); border-radius: 8px; background: #fff; font-size: .95rem; }
.alert { padding: .9rem 1rem; border-radius: 8px; margin-bottom: 1rem; font-size: .9rem; }
.alert-danger { background: #ffe9e6; border: 2px solid #ff9d92; color: #8a231b; }
.cta-wrapper { margin-top: 1rem; display: flex; gap: .8rem; flex-wrap: wrap; }
.resultats { margin-top: 2rem; background: var(--panel-bg); padding: 1.3rem 1.4rem 2rem; border: 2px solid var(--or); border-radius: var(--radius); box-shadow: var(--shadow); }
.cards { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin-bottom: 1.2rem; }
.card { background: #fdf9f4; border: 2px solid var(--or); border-radius: 14px; padding: .9rem .9rem 1rem; display: flex; flex-direction: column; gap: .3rem; }
.card.accent { background: var(--bleu); color: #fff; border-color: var(--bleu); }
.card.accent h3 { color: rgba(255,255,255,0.8); }
.card.accent .big { color: var(--or); }
.card .big { font-size: 1.2rem; font-weight: 700; margin: 0; color: var(--bleu); }
.card .small { font-size: .7rem; margin: 0; opacity: .8; }
.details-table summary { cursor: pointer; font-weight: 600; color: var(--titre); margin-bottom: .6rem; }
table { width: 100%; border-collapse: collapse; font-size: .85rem; background: #fff; }
thead { background: #f9f6f0; }
th, td { padding: .55rem .6rem; border: 1px solid rgba(201,150,58,0.2); text-align: left; }
th { color: var(--bleu); font-weight: 600; }
.disclaimer { font-size: .75rem; line-height: 1.3; color: var(--muted); margin-top: 1rem; background: #f9f6f0; padding: .7rem .8rem; border-left: 4px solid var(--or); border-radius: 6px; }
footer { text-align: center; padding: 2rem 1rem; font-size: .75rem; color: var(--muted); }
@media (max-width: 680px) {
    #liste-biens .item, #liste-dettes .item { grid-template-columns: 1fr 1fr; padding-right: 3.2rem; }
    #liste-biens .item .remove-btn, #liste-dettes .item .remove-btn { position: absolute; top: 6px; right: 6px; width: 36px; height: 36px; }
}