/* ============================================================
   BOURSE DE L'IMMOBILIER — CSS Principal v2
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=DM+Sans:wght@300;400;500&display=swap');

:root {
  --gold:#B8860B; --gold-light:#D4A017; --navy:#0A1628; --navy-mid:#152238;
  --cream:#F8F5EF; --white:#fff;
  --gray-50:#f9fafb; --gray-100:#f3f4f6; --gray-200:#e5e7eb;
  --gray-400:#9ca3af; --gray-600:#6b7280; --gray-800:#1f2937;
  --green:#059669; --red:#dc2626; --orange:#d97706;
  --radius:8px; --radius-lg:12px;
  --shadow:0 1px 3px rgba(0,0,0,0.08); --shadow-md:0 4px 16px rgba(0,0,0,0.10);
}
*{margin:0;padding:0;box-sizing:border-box;}
html{scroll-behavior:smooth;}
body{font-family:'DM Sans',sans-serif;background:var(--cream);color:var(--gray-800);font-size:15px;line-height:1.6;}
img{max-width:100%;height:auto;}a{color:inherit;text-decoration:none;}button{cursor:pointer;font-family:inherit;}

/* BANNIÈRES */
.banner-pub{display:flex;align-items:center;justify-content:center;gap:12px;padding:10px 2rem;background:var(--navy-mid);border-bottom:2px solid var(--gold);}
.banner-pub img{max-height:60px;max-width:728px;object-fit:contain;}
.banner-tag{background:var(--gold);color:white;font-size:9px;font-weight:600;padding:2px 7px;border-radius:3px;text-transform:uppercase;letter-spacing:1px;flex-shrink:0;}
.footer-banner-pub{border-bottom:none;border-top:2px solid var(--gold);}

/* NAV */
.main-nav{background:var(--navy);position:sticky;top:0;z-index:100;}
.nav-inner{max-width:1200px;margin:0 auto;padding:0 2rem;display:flex;align-items:center;justify-content:space-between;height:64px;}
.nav-logo{display:flex;align-items:center;gap:10px;}
.logo-icon{width:36px;height:36px;background:var(--gold);border-radius:4px;display:flex;align-items:center;justify-content:center;}
.logo-icon svg{width:20px;height:20px;}
.logo-text{font-family:'Playfair Display',serif;color:white;font-size:16px;font-weight:700;line-height:1.1;}
.logo-text span{color:var(--gold-light);display:block;font-size:9px;font-weight:400;letter-spacing:2px;text-transform:uppercase;}
.nav-links{list-style:none;display:flex;gap:2rem;}
.nav-links a{color:rgba(255,255,255,0.75);font-size:13px;transition:color .2s;}
.nav-links a:hover{color:var(--gold-light);}
.nav-actions{display:flex;align-items:center;gap:10px;}
.btn-nav-login{color:rgba(255,255,255,0.75);font-size:13px;padding:6px 14px;border:1px solid rgba(255,255,255,0.2);border-radius:6px;transition:all .2s;}
.btn-nav-login:hover{border-color:var(--gold-light);color:var(--gold-light);}
.btn-nav-cta{background:var(--gold);color:white;font-size:13px;padding:7px 16px;border-radius:6px;font-weight:500;}
.btn-nav-cta:hover{background:var(--gold-light);}
.btn-nav-dashboard{color:var(--gold-light);font-size:13px;padding:6px 14px;border:1px solid var(--gold);border-radius:6px;}
.btn-nav-logout{color:rgba(255,255,255,0.5);font-size:12px;}

/* FLASH */
.flash{padding:12px 2rem;font-size:13px;display:flex;align-items:center;justify-content:space-between;}
.flash button{background:none;border:none;font-size:18px;cursor:pointer;opacity:.6;}
.flash-success{background:#dcfce7;color:#166534;}
.flash-danger{background:#fee2e2;color:#991b1b;}
.flash-warning{background:#fef3c7;color:#92400e;}

/* HERO */
.hero{background:var(--navy);padding:5rem 2rem 0;overflow:hidden;}
.hero-inner{max-width:1200px;margin:0 auto;display:grid;grid-template-columns:1fr 420px;gap:3rem;align-items:end;}
.hero-left{padding-bottom:3rem;}
.hero-badge{display:inline-flex;align-items:center;gap:6px;background:rgba(184,134,11,.15);border:1px solid rgba(184,134,11,.3);color:var(--gold-light);padding:5px 12px;border-radius:20px;font-size:11px;font-weight:500;letter-spacing:1px;text-transform:uppercase;margin-bottom:1.5rem;}
.hero h1{font-family:'Playfair Display',serif;color:white;font-size:2.8rem;font-weight:700;line-height:1.15;margin-bottom:1rem;}
.hero h1 em{color:var(--gold-light);font-style:normal;}
.hero p{color:rgba(255,255,255,.6);font-size:15px;line-height:1.7;margin-bottom:2rem;max-width:480px;}
.hero-stats{display:flex;gap:2rem;}
.hero-stat{border-left:2px solid var(--gold);padding-left:1rem;}
.hero-stat .stat-num{font-family:'Playfair Display',serif;color:white;font-size:1.5rem;font-weight:700;}
.hero-stat .stat-lbl{color:rgba(255,255,255,.45);font-size:11px;text-transform:uppercase;letter-spacing:1px;}
.hero-search{background:white;border-radius:12px 12px 0 0;padding:1.5rem;}
.hero-search h3{font-family:'Playfair Display',serif;font-size:1.1rem;color:var(--navy);margin-bottom:1rem;font-weight:600;}
.search-tabs{display:flex;gap:4px;background:var(--gray-100);padding:3px;border-radius:7px;margin-bottom:1rem;}
.stab{flex:1;padding:7px;text-align:center;font-size:12px;font-weight:500;border-radius:5px;cursor:pointer;color:var(--gray-600);border:none;background:none;transition:all .2s;}
.stab.active{background:var(--navy);color:white;}
.search-row{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:10px;}
.field{display:flex;flex-direction:column;gap:4px;}
.field label{font-size:10px;color:var(--gray-600);font-weight:500;text-transform:uppercase;letter-spacing:.5px;}
.field select,.field input{border:1px solid var(--gray-200);border-radius:6px;padding:8px 10px;font-size:13px;font-family:'DM Sans',sans-serif;color:var(--gray-800);}
.search-btn{width:100%;background:var(--gold);color:white;border:none;padding:11px;border-radius:6px;font-size:14px;font-weight:500;margin-top:4px;}
.search-btn:hover{background:var(--gold-light);}

/* SECTIONS */
.section-inner{max-width:1200px;margin:0 auto;padding:3rem 2rem;}
.section-vedette{background:white;border-bottom:1px solid var(--gray-200);}
.section-agences{background:var(--gray-100);border-top:1px solid var(--gray-200);}
.section-header{display:flex;align-items:flex-end;justify-content:space-between;margin-bottom:1.5rem;}
.section-header h2{font-family:'Playfair Display',serif;font-size:1.75rem;color:var(--navy);font-weight:700;}
.section-header h2 span{color:var(--gold);}
.see-all{font-size:13px;color:var(--gold);font-weight:500;border-bottom:1px solid var(--gold);padding-bottom:1px;}
.with-sidebar{display:grid;grid-template-columns:1fr 240px;gap:1.5rem;margin-top:1.25rem;}
.listing-banner{margin-bottom:1.25rem;padding:8px 0;}

/* CARDS ANNONCES */
.annonces-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:1.25rem;}
.annonce-card{background:white;border-radius:var(--radius-lg);overflow:hidden;border:1px solid var(--gray-200);transition:transform .2s,box-shadow .2s;}
.annonce-card:hover{transform:translateY(-3px);box-shadow:var(--shadow-md);}
.card-img{height:200px;position:relative;overflow:hidden;background:var(--gray-100);}
.card-img img{width:100%;height:100%;object-fit:cover;transition:transform .3s;}
.annonce-card:hover .card-img img{transform:scale(1.04);}
.card-img-placeholder{width:100%;height:100%;display:flex;align-items:center;justify-content:center;font-size:48px;}
.badge{display:inline-block;padding:3px 9px;border-radius:4px;font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.5px;}
.badge-boost{position:absolute;top:10px;left:10px;background:var(--gold);color:white;}
.badge-active{background:#dcfce7;color:#166534;}
.badge-en_attente{background:#fef3c7;color:#92400e;}
.badge-expiree,.badge-rejetee{background:#fee2e2;color:#991b1b;}
.badge-suspendue{background:var(--gray-200);color:var(--gray-600);}
.badge-standard{background:var(--gray-100);color:var(--gray-600);}
.badge-forfait{background:#dbeafe;color:#1e40af;}
.card-agency{position:absolute;bottom:8px;right:8px;background:rgba(0,0,0,.6);border-radius:4px;padding:3px 8px;display:flex;align-items:center;gap:5px;}
.agency-logo-small{width:16px;height:16px;border-radius:2px;object-fit:contain;}
.card-agency span{color:white;font-size:10px;font-weight:500;}
.card-body{padding:1rem;}
.card-price{font-family:'Playfair Display',serif;font-size:1.15rem;font-weight:700;color:var(--navy);margin-bottom:4px;}
.card-title{font-size:13px;font-weight:500;margin-bottom:6px;line-height:1.4;}
.card-title a:hover{color:var(--gold);}
.card-loc{font-size:11px;color:var(--gray-600);margin-bottom:8px;}
.card-features{display:flex;gap:10px;flex-wrap:wrap;}
.card-features span{font-size:11px;color:var(--gray-600);}

/* SIDEBAR PUB */
.sidebar-pub{display:flex;flex-direction:column;gap:1rem;}
.sidebar-banner-card{background:white;border:1px solid var(--gray-200);border-radius:var(--radius-lg);padding:1rem;text-align:center;}
.sidebar-banner-card img{width:100%;border-radius:6px;margin:8px 0;}
.sidebar-banner-card p{font-size:11px;color:var(--gray-600);}
.sidebar-cta{background:var(--navy);border-radius:var(--radius-lg);padding:1.25rem;}
.sidebar-cta h4{font-family:'Playfair Display',serif;color:white;font-size:14px;margin-bottom:6px;}
.sidebar-cta p{color:rgba(255,255,255,.6);font-size:12px;margin-bottom:12px;}
.sidebar-cta strong{color:var(--gold-light);}
.sidebar-cta-btn{display:block;background:var(--gold);color:white;text-align:center;padding:8px;border-radius:6px;font-size:12px;font-weight:500;}

/* AGENCES */
.agences-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:1rem;}
.agence-card{background:white;border:1px solid var(--gray-200);border-radius:var(--radius-lg);padding:1.25rem;text-align:center;transition:border-color .2s;}
.agence-card:hover{border-color:var(--gold);}
.agence-av{width:52px;height:52px;border-radius:8px;margin:0 auto 10px;display:flex;align-items:center;justify-content:center;font-size:18px;font-weight:700;color:white;overflow:hidden;}
.agence-av img{width:100%;height:100%;object-fit:contain;}
.agence-card h4{font-size:13px;font-weight:500;color:var(--navy);margin-bottom:2px;}
.agence-card p{font-size:11px;color:var(--gray-600);}
.agence-count{display:inline-block;margin-top:8px;background:var(--gray-100);border-radius:10px;padding:2px 10px;font-size:10px;color:var(--gray-600);font-weight:500;}

/* FOOTER */
.main-footer{background:var(--navy);padding:3rem 2rem 1.5rem;}
.footer-inner{max-width:1200px;margin:0 auto;}
.footer-grid{display:grid;grid-template-columns:2fr 1fr 1fr 1fr;gap:2rem;margin-bottom:2rem;}
.footer-logo{font-family:'Playfair Display',serif;color:white;font-size:16px;font-weight:700;}
.footer-logo span{display:block;color:var(--gold-light);font-size:9px;letter-spacing:2px;text-transform:uppercase;margin-top:2px;font-weight:400;}
.footer-brand p{color:rgba(255,255,255,.45);font-size:12px;line-height:1.7;margin-top:10px;}
.footer-col h5{color:white;font-size:11px;font-weight:500;text-transform:uppercase;letter-spacing:1px;margin-bottom:10px;}
.footer-col ul{list-style:none;}
.footer-col ul li{margin-bottom:7px;}
.footer-col ul li a{color:rgba(255,255,255,.45);font-size:12px;transition:color .2s;}
.footer-col ul li a:hover{color:var(--gold-light);}
.footer-bottom{border-top:1px solid rgba(255,255,255,.08);padding-top:1.5rem;display:flex;justify-content:space-between;align-items:center;}
.footer-bottom p{font-size:11px;color:rgba(255,255,255,.3);}
.footer-bottom strong{color:var(--gold-light);}

/* FORMULAIRES */
.page-form{max-width:1200px;margin:0 auto;padding:3rem 2rem;}
.page-form-wide{max-width:800px;}
.form-card{max-width:480px;margin:0 auto;background:white;border-radius:var(--radius-lg);padding:2rem;border:1px solid var(--gray-200);}
.form-card h1{font-family:'Playfair Display',serif;font-size:1.5rem;color:var(--navy);margin-bottom:.5rem;}
.form-subtitle{font-size:13px;color:var(--gray-600);margin-bottom:1.5rem;}
.form-group{display:flex;flex-direction:column;gap:5px;margin-bottom:14px;}
.form-group label{font-size:11px;color:var(--gray-600);font-weight:500;text-transform:uppercase;letter-spacing:.5px;}
.form-group label small{font-size:10px;text-transform:none;letter-spacing:0;color:var(--gray-400);}
.form-group input,.form-group select,.form-group textarea{border:1px solid var(--gray-200);border-radius:var(--radius);padding:9px 12px;font-size:14px;font-family:'DM Sans',sans-serif;color:var(--gray-800);transition:border-color .2s;}
.form-group input:focus,.form-group select:focus,.form-group textarea:focus{outline:none;border-color:var(--gold);}
.form-group textarea{resize:vertical;min-height:100px;}
.form-row{display:grid;grid-template-columns:1fr 1fr;gap:12px;}
.form-section{background:white;border:1px solid var(--gray-200);border-radius:var(--radius-lg);padding:1.5rem;margin-bottom:1.25rem;}
.form-section h3{font-size:15px;font-weight:500;color:var(--navy);margin-bottom:1.25rem;padding-bottom:.75rem;border-bottom:1px solid var(--gray-200);}
.btn-primary{background:var(--navy);color:white;border:none;padding:10px 20px;border-radius:var(--radius);font-size:13px;font-weight:500;transition:background .2s;}
.btn-primary:hover{background:var(--navy-mid);}
.btn-full{width:100%;padding:12px;}
.btn-large{padding:12px 28px;font-size:14px;}
.btn-gold{background:var(--gold);color:white;border:none;padding:10px 20px;border-radius:var(--radius);font-size:13px;font-weight:500;}
.form-footer{text-align:center;font-size:12px;color:var(--gray-600);margin-top:1rem;}
.form-footer a{color:var(--gold);}
.form-submit-bar{background:white;border:1px solid var(--gray-200);border-radius:var(--radius-lg);padding:1.25rem;display:flex;align-items:center;justify-content:space-between;}
.total-display{font-size:14px;color:var(--gray-600);}
.total-display strong{font-family:'Playfair Display',serif;font-size:20px;color:var(--gold);}

/* FORFAITS */
.forfait-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;}
.forfait-card{position:relative;}
.forfait-card input[type=radio]{position:absolute;opacity:0;width:0;}
.fc-body{border:2px solid var(--gray-200);border-radius:var(--radius);padding:12px;cursor:pointer;transition:border-color .15s;}
.forfait-card input:checked+.fc-body{border-color:var(--gold);}
.fc-name{font-size:12px;font-weight:500;color:var(--gray-800);margin-bottom:4px;}
.fc-price{font-family:'Playfair Display',serif;font-size:16px;font-weight:700;color:var(--gold);margin:3px 0;}
.fc-detail{font-size:10px;color:var(--gray-600);}

/* PHOTOS UPLOAD */
.photos-preview{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px;}
.photo-thumb{position:relative;width:80px;height:80px;border-radius:6px;overflow:hidden;border:1px solid var(--gray-200);}
.photo-thumb img{width:100%;height:100%;object-fit:cover;}
.photo-thumb span{position:absolute;bottom:0;left:0;right:0;background:var(--gold);color:white;font-size:9px;text-align:center;padding:2px;}

/* PAIEMENT METHODS */
.paiement-methods{display:flex;gap:12px;flex-wrap:wrap;}
.pay-method{display:flex;align-items:center;gap:8px;border:2px solid var(--gray-200);border-radius:var(--radius);padding:10px 16px;cursor:pointer;transition:border-color .15s;font-size:13px;}
.pay-method:has(input:checked){border-color:var(--gold);}
.pay-method img{height:24px;object-fit:contain;}

/* ALERTS */
.alert{padding:12px 16px;border-radius:var(--radius);font-size:13px;margin-bottom:1rem;line-height:1.5;}
.alert a{font-weight:500;text-decoration:underline;}
.alert-danger,.alert-error{background:#fee2e2;color:#991b1b;border:1px solid #fca5a5;}
.alert-success{background:#dcfce7;color:#166534;border:1px solid #86efac;}
.alert-warning{background:#fef3c7;color:#92400e;border:1px solid #fcd34d;}
.alert-info{background:#dbeafe;color:#1e40af;border:1px solid #93c5fd;}

/* DASHBOARD AGENCE */
.dashboard-layout{display:grid;grid-template-columns:240px 1fr;min-height:calc(100vh - 64px);}
.dashboard-sidebar{background:var(--navy);display:flex;flex-direction:column;}
.ds-agency{padding:1.25rem;border-bottom:1px solid rgba(255,255,255,.08);display:flex;align-items:center;gap:10px;}
.ds-logo{width:40px;height:40px;border-radius:6px;object-fit:contain;background:white;padding:2px;}
.ds-avatar{width:40px;height:40px;border-radius:6px;background:var(--gold);display:flex;align-items:center;justify-content:center;font-size:14px;font-weight:700;color:white;flex-shrink:0;}
.ds-name{color:white;font-size:12px;font-weight:500;}
.ds-status{font-size:10px;margin-top:2px;}
.ds-status.active{color:#22c55e;}
.ds-status.inactive{color:var(--gray-400);}
.ds-nav{padding:.75rem 0;flex:1;}
.ds-link{display:flex;align-items:center;justify-content:space-between;padding:9px 1.25rem;color:rgba(255,255,255,.65);font-size:12px;border-left:2px solid transparent;transition:background .15s;}
.ds-link:hover{background:rgba(255,255,255,.05);color:white;}
.ds-link.active{background:rgba(184,134,11,.12);border-left-color:var(--gold);color:white;}
.ds-badge{background:var(--gold);color:white;font-size:9px;padding:1px 6px;border-radius:8px;}
.ds-logout{color:rgba(255,255,255,.35);margin-top:1rem;border-top:1px solid rgba(255,255,255,.07);padding-top:1rem;}
.ds-credits{padding:1rem 1.25rem;border-top:1px solid rgba(255,255,255,.08);}
.ds-credits-label{color:rgba(255,255,255,.45);font-size:10px;margin-bottom:3px;}
.ds-credits-val{font-family:'Playfair Display',serif;color:var(--gold-light);font-size:16px;font-weight:700;}
.ds-credits-btn{display:block;margin-top:8px;background:var(--gold);color:white;text-align:center;padding:7px;border-radius:5px;font-size:11px;font-weight:500;}
.dashboard-main{padding:1.5rem;background:var(--gray-50);}
.dash-topbar{display:flex;align-items:center;justify-content:space-between;margin-bottom:1.5rem;}
.dash-topbar h1{font-size:18px;font-weight:500;}
.dash-topbar p{font-size:12px;color:var(--gray-600);margin-top:2px;}
.dash-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-bottom:1.25rem;}
.dstat{background:white;border:1px solid var(--gray-200);border-radius:var(--radius-lg);padding:1rem;}
.dstat-l{font-size:11px;color:var(--gray-600);margin-bottom:5px;text-transform:uppercase;letter-spacing:.5px;}
.dstat-v{font-size:22px;font-weight:500;font-family:'Playfair Display',serif;}
.dash-grid{display:grid;grid-template-columns:1fr 300px;gap:1.25rem;}
.dash-card{background:white;border:1px solid var(--gray-200);border-radius:var(--radius-lg);overflow:hidden;}
.dash-card-head{padding:.9rem 1.25rem;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--gray-200);}
.dash-card-head h3{font-size:14px;font-weight:500;}
.dash-card-head a{font-size:12px;color:var(--gold);}
.dash-table{width:100%;border-collapse:collapse;}
.dash-table th{font-size:10px;color:var(--gray-600);text-transform:uppercase;letter-spacing:.5px;padding:7px 1rem;text-align:left;background:var(--gray-50);border-bottom:1px solid var(--gray-200);}
.dash-table td{padding:9px 1rem;font-size:12px;border-bottom:1px solid var(--gray-100);vertical-align:middle;}
.dash-table tr:last-child td{border-bottom:none;}
.at-title{font-size:12px;font-weight:500;}
.at-sub{font-size:10px;color:var(--gray-600);margin-top:1px;}
.expiry-urgent{color:var(--red);font-weight:500;}
.expiry-soon{color:var(--orange);font-weight:500;}
.expiry-ok{color:var(--green);}
.pay-row{display:flex;align-items:center;justify-content:space-between;padding:10px 1.25rem;border-bottom:1px solid var(--gray-100);font-size:12px;}
.pay-row:last-child{border-bottom:none;}
.pay-label{font-weight:500;}
.pay-date{font-size:10px;color:var(--gray-600);margin-top:1px;}
.pay-amount{font-weight:500;margin-right:6px;}
.btn-xs{padding:4px 10px;border-radius:5px;font-size:10px;font-weight:500;border:1px solid var(--gray-200);background:none;color:var(--gray-800);transition:background .15s;}
.btn-xs:hover{background:var(--gray-100);}
.btn-xs.btn-green{border-color:var(--green);color:var(--green);}
.btn-xs.btn-red{border-color:var(--red);color:var(--red);}

/* CATALOGUE */
.page-catalogue{max-width:1200px;margin:0 auto;padding:2rem;}
.catalogue-header{margin-bottom:1.5rem;}
.catalogue-header h1{font-family:'Playfair Display',serif;font-size:1.75rem;color:var(--navy);}
.catalogue-header p{font-size:13px;color:var(--gray-600);margin-top:4px;}
.catalogue-layout{display:grid;grid-template-columns:260px 1fr;gap:1.5rem;}
.filter-panel{background:white;border:1px solid var(--gray-200);border-radius:var(--radius-lg);padding:1.25rem;height:fit-content;position:sticky;top:80px;}
.filter-panel h3{font-size:14px;font-weight:500;margin-bottom:1rem;padding-bottom:.75rem;border-bottom:1px solid var(--gray-200);}
.filter-group{margin-bottom:1.25rem;}
.filter-group label{display:block;font-size:11px;color:var(--gray-600);text-transform:uppercase;letter-spacing:.5px;margin-bottom:6px;}
.filter-group select,.filter-group input{width:100%;border:1px solid var(--gray-200);border-radius:var(--radius);padding:8px 10px;font-size:13px;font-family:'DM Sans',sans-serif;}
.filter-btn{width:100%;background:var(--navy);color:white;border:none;padding:10px;border-radius:var(--radius);font-size:13px;font-weight:500;margin-top:.5rem;}
.filter-reset{width:100%;background:none;border:1px solid var(--gray-200);color:var(--gray-600);padding:8px;border-radius:var(--radius);font-size:12px;margin-top:6px;}
.results-bar{display:flex;align-items:center;justify-content:space-between;margin-bottom:1rem;}
.results-count{font-size:13px;color:var(--gray-600);}
.sort-select{border:1px solid var(--gray-200);border-radius:var(--radius);padding:6px 10px;font-size:12px;font-family:'DM Sans',sans-serif;}
.catalogue-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:1.25rem;}
.pagination{display:flex;justify-content:center;gap:6px;margin-top:2rem;flex-wrap:wrap;}
.pag-btn{padding:7px 14px;border:1px solid var(--gray-200);border-radius:var(--radius);font-size:13px;background:white;color:var(--gray-800);}
.pag-btn.active{background:var(--navy);color:white;border-color:var(--navy);}
.pag-btn:hover:not(.active){background:var(--gray-100);}

/* FICHE ANNONCE */
.annonce-detail{max-width:1200px;margin:0 auto;padding:2rem;}
.annonce-detail-layout{display:grid;grid-template-columns:1fr 340px;gap:2rem;}
.gallery-main{width:100%;height:420px;border-radius:var(--radius-lg);overflow:hidden;background:var(--gray-100);margin-bottom:8px;}
.gallery-main img{width:100%;height:100%;object-fit:cover;}
.gallery-thumbs{display:flex;gap:8px;overflow-x:auto;padding-bottom:4px;}
.gallery-thumb{width:80px;height:60px;border-radius:6px;overflow:hidden;cursor:pointer;border:2px solid transparent;flex-shrink:0;}
.gallery-thumb.active{border-color:var(--gold);}
.gallery-thumb img{width:100%;height:100%;object-fit:cover;}
.annonce-info{margin-top:1.5rem;}
.annonce-info h1{font-family:'Playfair Display',serif;font-size:1.6rem;color:var(--navy);margin-bottom:.75rem;}
.annonce-price{font-family:'Playfair Display',serif;font-size:1.8rem;font-weight:700;color:var(--gold);margin-bottom:1rem;}
.annonce-meta{display:flex;flex-wrap:wrap;gap:1.5rem;padding:1rem 0;border-top:1px solid var(--gray-200);border-bottom:1px solid var(--gray-200);margin-bottom:1.25rem;}
.annonce-meta-item .lbl{font-size:10px;color:var(--gray-600);text-transform:uppercase;letter-spacing:.5px;}
.annonce-meta-item .val{font-size:14px;font-weight:500;margin-top:2px;}
.annonce-desc h3{font-size:15px;font-weight:500;margin-bottom:.75rem;}
.annonce-desc p{font-size:14px;color:var(--gray-600);line-height:1.7;white-space:pre-line;}
.contact-card{background:white;border:1px solid var(--gray-200);border-radius:var(--radius-lg);padding:1.25rem;margin-bottom:1rem;position:sticky;top:80px;}
.contact-card h3{font-size:14px;font-weight:500;margin-bottom:1rem;}
.contact-agency{display:flex;align-items:center;gap:10px;padding:10px 0;border-bottom:1px solid var(--gray-100);margin-bottom:10px;}
.ag-logo{width:44px;height:44px;border-radius:6px;object-fit:contain;border:1px solid var(--gray-200);}
.ag-name{font-size:13px;font-weight:500;}
.ag-city{font-size:11px;color:var(--gray-600);}
.btn-whatsapp{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;background:#25D366;color:white;border:none;padding:11px;border-radius:var(--radius);font-size:13px;font-weight:500;margin-bottom:8px;}
.btn-contact{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;background:var(--navy);color:white;border:none;padding:11px;border-radius:var(--radius);font-size:13px;font-weight:500;}
.contact-form{margin-top:12px;display:none;}
.contact-form.open{display:block;}
.contact-form textarea{width:100%;border:1px solid var(--gray-200);border-radius:var(--radius);padding:9px;font-size:13px;font-family:'DM Sans',sans-serif;resize:none;margin-bottom:8px;}
.contact-form input{width:100%;border:1px solid var(--gray-200);border-radius:var(--radius);padding:9px;font-size:13px;font-family:'DM Sans',sans-serif;margin-bottom:8px;}
.contact-form button{width:100%;background:var(--gold);color:white;border:none;padding:10px;border-radius:var(--radius);font-size:13px;font-weight:500;}

/* PAGE PAIEMENT */
.paiement-page{max-width:560px;margin:3rem auto;padding:0 2rem;}
.paiement-card{background:white;border:1px solid var(--gray-200);border-radius:var(--radius-lg);overflow:hidden;}
.paiement-header{background:var(--navy);padding:1.5rem;text-align:center;}
.paiement-header h2{font-family:'Playfair Display',serif;color:white;font-size:1.3rem;}
.paiement-header .amount{font-family:'Playfair Display',serif;color:var(--gold-light);font-size:2rem;font-weight:700;margin-top:6px;}
.paiement-body{padding:1.5rem;}
.paiement-recap{background:var(--gray-50);border-radius:var(--radius);padding:1rem;margin-bottom:1.5rem;font-size:13px;}
.recap-row{display:flex;justify-content:space-between;padding:4px 0;border-bottom:1px solid var(--gray-200);}
.recap-row:last-child{border-bottom:none;font-weight:500;}
.method-choice h4{font-size:13px;font-weight:500;margin-bottom:10px;}
.method-btn{display:flex;align-items:center;gap:12px;width:100%;border:2px solid var(--gray-200);border-radius:var(--radius);padding:12px 16px;margin-bottom:8px;background:white;font-size:13px;transition:border-color .15s;cursor:pointer;}
.method-btn.selected{border-color:var(--gold);}
.method-btn img{height:28px;}
.pay-now-btn{width:100%;background:var(--gold);color:white;border:none;padding:13px;border-radius:var(--radius);font-size:14px;font-weight:500;margin-top:1rem;}
.pay-secure{text-align:center;font-size:11px;color:var(--gray-400);margin-top:10px;}

/* ADMIN CSS */
.admin-layout{display:grid;grid-template-columns:220px 1fr;min-height:100vh;}
.admin-sidebar{background:var(--navy);}
.as-logo{padding:1.25rem;border-bottom:1px solid rgba(255,255,255,.08);}
.as-logo span{font-family:'Playfair Display',serif;color:white;font-size:13px;font-weight:700;display:block;}
.as-logo small{color:var(--gold-light);font-size:9px;letter-spacing:2px;text-transform:uppercase;}
.as-user{padding:1rem 1.25rem;border-bottom:1px solid rgba(255,255,255,.08);display:flex;align-items:center;gap:10px;}
.as-av{width:34px;height:34px;border-radius:6px;display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:700;color:white;flex-shrink:0;background:#7C3AED;}
.as-name{color:white;font-size:12px;font-weight:500;}
.as-nav{padding:.75rem 0;}
.as-link{display:flex;align-items:center;justify-content:space-between;padding:9px 1.25rem;color:rgba(255,255,255,.65);font-size:12px;border-left:2px solid transparent;transition:background .15s;}
.as-link:hover{background:rgba(255,255,255,.05);color:white;}
.as-link.active{background:rgba(184,134,11,.12);border-left-color:var(--gold);color:white;}
.as-badge{background:#ef4444;color:white;font-size:9px;padding:1px 5px;border-radius:6px;}
.as-logout{color:rgba(255,255,255,.3);margin-top:8px;}
.admin-content{padding:1.5rem;background:var(--gray-50);}
.admin-topbar{display:flex;align-items:center;justify-content:space-between;margin-bottom:1.5rem;}
.admin-topbar h1{font-size:18px;font-weight:500;}
.admin-card{background:white;border:1px solid var(--gray-200);border-radius:var(--radius-lg);overflow:hidden;margin-bottom:1.25rem;}
.admin-card-head{padding:.9rem 1.25rem;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--gray-200);}
.admin-card-head h3{font-size:14px;font-weight:500;}
.admin-table{width:100%;border-collapse:collapse;}
.admin-table th{font-size:10px;color:var(--gray-600);text-transform:uppercase;letter-spacing:.5px;padding:7px 1rem;text-align:left;background:var(--gray-50);border-bottom:1px solid var(--gray-200);}
.admin-table td{padding:10px 1rem;font-size:12px;border-bottom:1px solid var(--gray-100);vertical-align:middle;}
.admin-table tr:last-child td{border-bottom:none;}
.admin-table tr:hover td{background:var(--gray-50);}
.thumb-mini{width:48px;height:36px;object-fit:cover;border-radius:4px;margin-top:4px;display:block;}
.filtre-tabs{display:flex;gap:4px;margin-bottom:1.25rem;flex-wrap:wrap;}
.ftab{padding:6px 14px;border-radius:6px;font-size:12px;border:1px solid var(--gray-200);background:white;color:var(--gray-600);}
.ftab.on{background:var(--navy);color:white;border-color:var(--navy);}
.ftab span{font-size:10px;opacity:.7;}
.roles-stats{display:grid;grid-template-columns:repeat(5,1fr);gap:10px;margin-bottom:1.5rem;}
.role-stat{background:white;border:1px solid var(--gray-200);border-radius:var(--radius-lg);padding:1rem;text-align:center;}
.rs-count{font-family:'Playfair Display',serif;font-size:24px;font-weight:700;}
.rs-label{font-size:11px;color:var(--gray-600);margin-top:3px;}
.role-superadmin .rs-count{color:#5b21b6;}
.role-moderateur .rs-count{color:#1e40af;}
.role-commercial .rs-count{color:#92400e;}
.role-support .rs-count{color:#166534;}
.role-comptable .rs-count{color:#9d174d;}
.role-pill{display:inline-flex;padding:2px 9px;border-radius:4px;font-size:10px;font-weight:500;}
.r-superadmin{background:#ede9fe;color:#5b21b6;}
.r-moderateur{background:#dbeafe;color:#1e40af;}
.r-commercial{background:#fef3c7;color:#92400e;}
.r-support{background:#dcfce7;color:#166534;}
.r-comptable{background:#fce7f3;color:#9d174d;}
.user-cell{display:flex;align-items:center;gap:8px;}
.u-av{width:32px;height:32px;border-radius:6px;display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:700;color:white;flex-shrink:0;}
.u-name{font-size:12px;font-weight:500;}
.u-email{font-size:10px;color:var(--gray-600);margin-top:1px;}
.perm-grid{display:flex;flex-wrap:wrap;gap:3px;}
.perm-tag{font-size:9px;padding:2px 7px;border-radius:3px;}
.perm-tag.on{background:#dcfce7;color:#166534;}
.perm-tag.off{background:#fee2e2;color:#991b1b;}
.status-dot{width:7px;height:7px;border-radius:50%;display:inline-block;margin-right:4px;}
.status-dot.active{background:#22c55e;}
.status-dot.inactive{background:var(--gray-400);}
.rights-table td,.rights-table th{text-align:center;}
.rights-table td:first-child,.rights-table th:first-child{text-align:left;}
.section-label{font-size:9px;color:var(--gray-600);text-transform:uppercase;letter-spacing:1px;background:var(--gray-50)!important;font-weight:600;}
.modal-overlay{position:fixed;inset:0;background:rgba(10,22,40,.55);display:flex;align-items:center;justify-content:center;z-index:1000;padding:1rem;}
.modal-box{background:white;border-radius:var(--radius-lg);width:100%;max-width:480px;padding:1.5rem;border:1px solid var(--gray-200);}
.modal-box h3{font-size:15px;font-weight:500;margin-bottom:1rem;}
.modal-footer{display:flex;justify-content:flex-end;gap:8px;margin-top:1rem;}
.text-muted{font-size:10px;color:var(--gray-400);font-style:italic;}
.stats-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-bottom:1.5rem;}
.stat-card{background:white;border:1px solid var(--gray-200);border-radius:var(--radius-lg);padding:1rem;}
.stat-card .s-label{font-size:11px;color:var(--gray-600);margin-bottom:5px;text-transform:uppercase;letter-spacing:.5px;}
.stat-card .s-val{font-size:20px;font-weight:500;font-family:'Playfair Display',serif;}
.stat-card .s-sub{font-size:10px;margin-top:3px;color:var(--gray-600);}

/* RESPONSIVE */
@media(max-width:900px){
  .hero-inner,.footer-grid,.catalogue-layout,.annonce-detail-layout,.with-sidebar,.dash-grid,.dashboard-layout,.admin-layout{grid-template-columns:1fr;}
  .hero-search{border-radius:var(--radius-lg);}
  .annonces-grid,.catalogue-grid{grid-template-columns:repeat(2,1fr);}
  .agences-grid{grid-template-columns:repeat(2,1fr);}
  .forfait-grid{grid-template-columns:1fr 1fr;}
  .nav-links{display:none;}
  .dash-stats,.roles-stats,.stats-grid{grid-template-columns:repeat(2,1fr);}
}
@media(max-width:600px){
  .annonces-grid,.catalogue-grid,.agences-grid,.forfait-grid{grid-template-columns:1fr;}
  .form-row,.search-row{grid-template-columns:1fr;}
  .hero h1{font-size:2rem;}
}
