@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

* { box-sizing: border-box; }
body { background-color: #F8FAFC; color: #334155; font-family: 'Inter', sans-serif; margin: 0; padding: 40px; }
.container { max-width: 1300px; margin: 0 auto; }

header { text-align: center; margin-bottom: 50px; }
header h1 { font-size: 32px; font-weight: 800; color: #0F172A; margin: 0; letter-spacing: -0.5px; }
header p { color: #64748B; margin-top: 10px; font-size: 16px; }

/* AJOUT POUR LE LOGO */
.logo {
    max-height: 90px; /* Ajustez cette valeur pour grossir/réduire le logo */
    width: auto;
    margin-bottom: 25px;
    display: inline-block;
}

/* BARRE DE FILTRES */
.filter-bar {
    background: white; padding: 20px; border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03); margin-bottom: 40px;
    display: flex; gap: 20px; flex-wrap: wrap; align-items: center; border: 1px solid #E2E8F0;
}
.filter-group { flex-grow: 1; min-width: 180px; }
.filter-group label { font-size: 11px; text-transform: uppercase; color: #94A3B8; margin-bottom: 6px; display: block; font-weight: 700; }
.filter-select {
    width: 100%; padding: 12px; border: 1px solid #CBD5E1;
    border-radius: 8px; background-color: #F8FAFC; color: #0F172A; font-weight: 600; cursor: pointer;
}
.reset-btn { background: none; border: none; color: #64748B; cursor: pointer; font-size: 13px; text-decoration: underline; }

/* GRILLE */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 30px; }

/* CARTE */
.card {
    background: white; border-radius: 20px; overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.04); border: 1px solid #E2E8F0;
    display: flex; flex-direction: column; transition: transform 0.2s;
}
.card:hover { transform: translateY(-5px); box-shadow: 0 20px 50px rgba(0,0,0,0.08); }

.card-img { height: 220px; background-size: cover; background-position: center; position: relative; }
.badges { position: absolute; top: 15px; left: 15px; display: flex; gap: 8px; }
.tag { padding: 6px 10px; border-radius: 6px; font-size: 10px; font-weight: 700; text-transform: uppercase; color: white; }
.tag-type { background: rgba(15, 23, 42, 0.9); }
.tag-city { background: rgba(59, 130, 246, 0.9); }

.card-body { padding: 25px; flex-grow: 1; display: flex; flex-direction: column; }
h2 { font-size: 18px; font-weight: 700; margin: 0 0 5px 0; color: #0F172A; }
.address-line { font-size: 13px; color: #64748B; margin-bottom: 20px; font-weight: 500; }

/* PRIX ET RENDEMENT */
.financials {
    display: flex; justify-content: space-between; align-items: flex-end;
    background: #F1F5F9; padding: 15px; border-radius: 12px; margin-bottom: 20px;
}
.fin-col h4 { margin: 0 0 4px 0; font-size: 10px; color: #64748B; text-transform: uppercase; }
.fin-col .val { font-size: 18px; font-weight: 800; color: #0F172A; }
.fin-col .yield { color: #166534; }

/* GRILLE CARACTERISTIQUES */
.specs-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px;
    margin-bottom: 20px; font-size: 13px;
}
.spec-row { display: flex; justify-content: space-between; border-bottom: 1px dashed #E2E8F0; padding-bottom: 4px; }
.spec-row span { color: #64748B; }
.spec-row strong { color: #334155; font-weight: 600; }

.desc { font-size: 13px; color: #475569; line-height: 1.5; margin-bottom: 25px; 
        display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.btn-main {
    background: #0F172A; color: white; border: none; padding: 16px; width: 100%;
    border-radius: 10px; font-weight: 700; cursor: pointer; transition: 0.2s; margin-top: auto;
}
.btn-main:hover { background: #334155; }

/* MODAL */
#modalBackdrop {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.6); backdrop-filter: blur(4px); z-index: 1000;
}
#modalContent {
    position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
    background: white; width: 90%; max-width: 480px; padding: 40px;
    border-radius: 24px; box-shadow: 0 25px 50px rgba(0,0,0,0.25);
}
.form-group { margin-bottom: 15px; }
label { display: block; font-size: 12px; font-weight: 700; color: #475569; margin-bottom: 6px; }
input, select { width: 100%; padding: 14px; border: 1px solid #CBD5E1; border-radius: 8px; font-family: inherit; }
.close-modal { position: absolute; top: 20px; right: 20px; cursor: pointer; font-size: 24px; color: #94A3B8; }
#successMsg { display: none; text-align: center; }

/* --- NOUVEAUTÉS : BOUTONS ET STATUT VENDU --- */
.card-buttons { display: flex; flex-direction: column; gap: 10px; margin-top: auto; }

.btn-sec {
    background: transparent; color: #0F172A; border: 2px solid #0F172A; padding: 14px; width: 100%;
    border-radius: 10px; font-weight: 700; cursor: pointer; transition: 0.2s; text-align: center;
}
.btn-sec:hover { background: #0F172A; color: white; }

.badge-vendu {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(-15deg);
    background: #EF4444; color: white; padding: 10px 30px; font-size: 28px; font-weight: 900;
    border-radius: 10px; border: 4px solid white; box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    letter-spacing: 2px; z-index: 10; text-transform: uppercase;
}

.card.is-vendu .card-img { opacity: 0.8; filter: grayscale(60%); }
.card.is-vendu .financials { opacity: 0.5; }

.alert-success {
    background: #DCFCE7; color: #166534; padding: 20px; border-radius: 10px; text-align: center;
    border: 1px solid #10B981; margin-bottom: 30px; font-weight: 600;
}
/* --- ONGLETS PRINCIPAUX --- */
.main-tabs { display: flex; gap: 15px; margin-bottom: 30px; border-bottom: 2px solid #E2E8F0; padding-bottom: 15px; }
.tab-btn { background: none; border: none; font-size: 18px; font-weight: 700; color: #64748B; cursor: pointer; padding: 10px 20px; transition: 0.3s; border-radius: 10px; }
.tab-btn.active { background: #0F172A; color: white; }
.tab-btn:hover:not(.active) { color: #0F172A; background: #F1F5F9; }
.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeIn 0.4s; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* --- FORMULAIRE CHASSE (AVANCÉ) --- */
.form-chasse { background: white; padding: 40px; border-radius: 20px; box-shadow: 0 10px 40px rgba(0,0,0,0.03); }
.form-section-title { font-size: 14px; text-transform: uppercase; color: #C5A021; margin: 30px 0 15px 0; border-bottom: 1px solid #F1F5F9; padding-bottom: 5px; }

/* --- BARRE DE PROGRESSION (ESPACE CLIENT) --- */
.stepper { display: flex; justify-content: space-between; margin: 40px 0; position: relative; }
.stepper::before { content: ''; position: absolute; top: 15px; left: 0; width: 100%; height: 3px; background: #E2E8F0; z-index: 1; }
.step { position: relative; z-index: 2; text-align: center; width: 14%; }
.step-circle { width: 30px; height: 30px; background: white; border: 3px solid #E2E8F0; border-radius: 50%; margin: 0 auto 10px auto; display: flex; align-items: center; justify-content: center; font-weight: bold; color: #94A3B8; font-size: 12px; transition: 0.3s; }
.step.active .step-circle { border-color: #10B981; background: #10B981; color: white; }
.step.completed .step-circle { border-color: #10B981; background: white; color: #10B981; }
.step-label { font-size: 11px; font-weight: 600; color: #64748B; }
.step.active .step-label { color: #0F172A; font-weight: 800; }

/* --- CHAT COLLABORATIF --- */
.chat-container { background: white; border-radius: 20px; border: 1px solid #E2E8F0; display: flex; flex-direction: column; height: 600px; overflow: hidden; box-shadow: 0 10px 40px rgba(0,0,0,0.03); }
.chat-messages { flex-grow: 1; padding: 20px; overflow-y: auto; background: #F8FAFC; display: flex; flex-direction: column; gap: 15px; }
.msg { max-width: 75%; padding: 15px; border-radius: 15px; font-size: 14px; line-height: 1.5; position: relative; }
.msg-admin { background: #0F172A; color: white; align-self: flex-start; border-bottom-left-radius: 0; }
.msg-client { background: #C5A021; color: white; align-self: flex-end; border-bottom-right-radius: 0; }
.msg-meta { font-size: 10px; opacity: 0.7; margin-bottom: 5px; display: block; }
.msg-doc { display: inline-block; margin-top: 10px; padding: 10px 15px; background: rgba(255,255,255,0.2); border-radius: 8px; color: white; text-decoration: none; font-weight: bold; font-size: 12px; }
.msg-doc:hover { background: rgba(255,255,255,0.3); }
.chat-input { padding: 20px; background: white; border-top: 1px solid #E2E8F0; display: flex; gap: 10px; align-items: center; }
.chat-input textarea { flex-grow: 1; padding: 12px; border: 1px solid #CBD5E1; border-radius: 10px; resize: none; height: 50px; font-family: inherit; }
.chat-input input[type="file"] { display: none; }
.file-label { cursor: pointer; color: #64748B; font-size: 24px; padding: 0 10px; transition: 0.2s; }
.file-label:hover { color: #C5A021; }