/* Espace Mairie — v2 Full Redesign */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

.em-wrap{display:flex;min-height:100vh;background:#f4f3f1;font-family:'Inter',-apple-system,BlinkMacSystemFont,sans-serif;-webkit-font-smoothing:antialiased}
.em-wrap *{box-sizing:border-box}

/* Sidebar */
.em-sidebar{width:240px;background:linear-gradient(180deg,#0a1e3d,#071428);display:flex;flex-direction:column;position:fixed;top:0;left:0;bottom:0;z-index:1000;border-right:1px solid rgba(255,255,255,.04)}
.em-sidebar-brand{padding:20px 16px;border-bottom:1px solid rgba(255,255,255,.06);display:flex;align-items:center;gap:10px}
.em-brand-icon{width:34px;height:34px;background:linear-gradient(135deg,#e27d60,#c4633a);color:white;border-radius:8px;display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:800;flex-shrink:0;box-shadow:0 2px 8px rgba(226,125,96,.25)}
.em-brand-name{display:block;color:white;font-size:13px;font-weight:700}
.em-brand-sub{display:block;color:rgba(255,255,255,.3);font-size:9px;text-transform:uppercase;letter-spacing:.8px;margin-top:1px}
.em-nav{flex:1;padding:10px 8px;overflow-y:auto}
.em-nav-item{display:flex;align-items:center;gap:10px;padding:9px 12px;border-radius:7px;color:rgba(255,255,255,.45);font-size:13px;font-weight:500;text-decoration:none !important;transition:all .12s;margin-bottom:1px}
.em-nav-item:hover{background:rgba(255,255,255,.05);color:rgba(255,255,255,.85)}
.em-nav-active{background:rgba(226,125,96,.12) !important;color:#e27d60 !important;font-weight:600}
.em-nav-item svg{flex-shrink:0;opacity:.5;width:17px;height:17px}
.em-nav-active svg{opacity:1}
.em-sidebar-footer{padding:12px 16px;border-top:1px solid rgba(255,255,255,.06);display:flex;align-items:center;justify-content:space-between}
.em-user{display:flex;align-items:center;gap:8px;min-width:0}
.em-user-avatar{width:30px;height:30px;background:linear-gradient(135deg,#e27d60,#c4633a);color:white;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:10px;font-weight:700;flex-shrink:0}
.em-user-name{display:block;color:rgba(255,255,255,.75);font-size:11px;font-weight:600;line-height:1.3}
.em-user-role{display:block;color:rgba(255,255,255,.25);font-size:9px;text-transform:uppercase;letter-spacing:.5px}
.em-logout{color:rgba(255,255,255,.25);transition:color .12s;display:flex}
.em-logout:hover{color:#e27d60}

/* Content */
.em-content{margin-left:240px;flex:1;padding:24px 28px 40px;min-width:0}

/* Page Header */
.em-page-header{margin-bottom:20px}
.em-page-header h1{font-size:20px;font-weight:800;color:#0a1e3d;margin:0 0 3px}
.em-page-header p{color:#8a8f98;font-size:12px;margin:0}

/* Stats */
.em-stats-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:10px;margin-bottom:20px}
.em-stat{background:white;border:1px solid #eae8e5;border-radius:10px;padding:16px;display:flex;align-items:center;gap:12px;transition:box-shadow .15s}
.em-stat:hover{box-shadow:0 2px 12px rgba(0,0,0,.04)}
.em-stat-icon{width:38px;height:38px;background:#f5f4f2;border-radius:9px;display:flex;align-items:center;justify-content:center;color:#8a8f98;flex-shrink:0}
.em-stat-terra .em-stat-icon{background:rgba(226,125,96,.08);color:#e27d60}
.em-stat-blue .em-stat-icon{background:rgba(0,51,102,.06);color:#003366}
.em-stat-green .em-stat-icon{background:rgba(34,139,34,.06);color:#228b22}
.em-stat-num{font-size:22px;font-weight:800;color:#0a1e3d;line-height:1}
.em-stat-label{font-size:10px;color:#8a8f98;margin-top:2px;text-transform:uppercase;letter-spacing:.3px}
.em-stat-detail{font-size:10px;color:#aaa;margin-top:3px}

/* Cards */
.em-grid-2{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:16px}
.em-grid-3{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-bottom:16px}
.em-card{background:white;border:1px solid #eae8e5;border-radius:10px;padding:18px;transition:box-shadow .12s}
.em-card:hover{box-shadow:0 2px 12px rgba(0,0,0,.04)}
.em-card h3{font-size:13px;font-weight:700;color:#0a1e3d;margin:0 0 12px}
.em-card-link{display:inline-flex;align-items:center;gap:4px;margin-top:10px;font-size:11px;color:#e27d60;font-weight:600;text-decoration:none !important}
.em-card-link:hover{text-decoration:underline !important}
.em-empty{color:#aaa;font-size:12px;font-style:italic}

/* List */
.em-list-item{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 0;border-bottom:1px solid #f0efed}
.em-list-item:last-child{border-bottom:none}
.em-list-main{min-width:0}
.em-list-main strong{display:block;font-size:12px;color:#0a1e3d}
.em-list-main span{display:block;font-size:10px;color:#8a8f98;margin-top:1px}
.em-badge{display:inline-flex;align-items:center;padding:2px 9px;border-radius:20px;font-size:9px;font-weight:700;text-transform:capitalize;letter-spacing:.2px}
.em-badge-green{background:#e8f5e9;color:#1b7a1b}
.em-badge-orange{background:#fff3e0;color:#d84315}
.em-badge-red{background:#fce4ec;color:#c62828}

/* Mini stats */
.em-mini-stat{background:white;border:1px solid #eae8e5;border-radius:9px;padding:14px;text-align:center;transition:box-shadow .12s}
.em-mini-stat:hover{box-shadow:0 2px 12px rgba(0,0,0,.04)}
.em-ms-num{display:block;font-size:22px;font-weight:800;color:#e27d60;line-height:1}
.em-ms-label{display:block;font-size:10px;color:#8a8f98;margin-top:4px}

/* === MODULE VIEWS OVERRIDE === */
.em-module-wrap{font-family:'Inter',-apple-system,sans-serif}
.em-module-wrap .nxv-gestionnaire-wrap{display:block !important}
.em-module-wrap .nxv-sidebar,.em-module-wrap .nxv-gestionnaire-wrapper .nxv-sidebar,.em-module-wrap .nxv-gestionnaire-wrapper aside{display:none !important}
.em-module-wrap .nxv-main-content{margin:0 !important;padding:0 !important;max-width:100% !important}
.em-module-wrap .nxv-gestionnaire-wrapper main{margin:0 !important;padding:0 !important}

/* Override module page headers */
.em-module-wrap .nxv-page-header{margin-bottom:18px}
.em-module-wrap .nxv-page-header h1{font-size:18px;font-weight:800;color:#0a1e3d}
.em-module-wrap .nxv-page-header p{font-size:12px;color:#8a8f98}

/* Override module stats */
.em-module-wrap .nxv-signalement-stats,.em-module-wrap .nxv-agenda-stats,.em-module-wrap .nxv-stats-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:8px;margin-bottom:16px}
.em-module-wrap .nxv-signalement-stat,.em-module-wrap .nxv-agenda-stat-card,.em-module-wrap .nxv-stat-card{background:white;border:1px solid #eae8e5;border-radius:9px;padding:14px;text-align:center}
.em-module-wrap .nxv-signalement-stat-number,.em-module-wrap .nxv-agenda-stat-value,.em-module-wrap .nxv-stat-number{font-size:22px;font-weight:800;color:#0a1e3d;display:block}
.em-module-wrap .nxv-signalement-stat-label,.em-module-wrap .nxv-agenda-stat-label,.em-module-wrap .nxv-stat-label{font-size:10px;color:#8a8f98;text-transform:uppercase;letter-spacing:.3px;margin-top:2px;display:block}

/* Override module tables */
.em-module-wrap .nxv-signalement-table-wrap,.em-module-wrap .nxv-agenda-table-wrap,.em-module-wrap table{border-radius:9px;overflow:hidden;border:1px solid #eae8e5}
.em-module-wrap table{width:100%;border-collapse:collapse;font-size:12px}
.em-module-wrap th{text-align:left;padding:9px 12px;background:#fafaf8;font-weight:600;color:#8a8f98;font-size:10px;text-transform:uppercase;letter-spacing:.4px;border-bottom:1px solid #eae8e5}
.em-module-wrap td{padding:9px 12px;border-bottom:1px solid #f2f1ef;vertical-align:middle}
.em-module-wrap tr:last-child td{border-bottom:none}
.em-module-wrap tr:hover td{background:#fdfcfb}

/* Override module toolbar/pills */
.em-module-wrap .nxv-signalement-toolbar,.em-module-wrap .nxv-agenda-toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:14px;flex-wrap:wrap}
.em-module-wrap .nxv-signalement-pills{display:flex;gap:4px}
.em-module-wrap .nxv-signalement-pill{padding:6px 14px;border-radius:20px;border:1.5px solid #eae8e5;background:white;font-size:11px;font-weight:600;color:#8a8f98;cursor:pointer;transition:all .12s;font-family:inherit}
.em-module-wrap .nxv-signalement-pill:hover{border-color:#003366;color:#003366}
.em-module-wrap .nxv-signalement-pill.active{background:#0a1e3d;color:white;border-color:#0a1e3d}

/* Override selects/inputs */
.em-module-wrap select,.em-module-wrap input[type=text],.em-module-wrap input[type=email],.em-module-wrap input[type=number],.em-module-wrap input[type=date],.em-module-wrap input[type=datetime-local],.em-module-wrap textarea{padding:8px 11px;border:1.5px solid #ddd;border-radius:7px;font-size:12px;font-family:inherit;outline:none;transition:border .12s,box-shadow .12s;background:white}
.em-module-wrap select:focus,.em-module-wrap input:focus,.em-module-wrap textarea:focus{border-color:#003366;box-shadow:0 0 0 3px rgba(0,51,102,.06)}

/* Override buttons */
.em-module-wrap .nxv-btn-primary,.em-module-wrap .nxv-form-submit,.em-module-wrap button[type=submit]{background:linear-gradient(135deg,#003366,#0a1e3d) !important;color:white !important;border:none !important;padding:9px 18px !important;border-radius:7px !important;font-size:12px !important;font-weight:600 !important;cursor:pointer;font-family:inherit;transition:all .12s !important;box-shadow:0 2px 8px rgba(0,51,102,.12)}
.em-module-wrap .nxv-btn-primary:hover,.em-module-wrap button[type=submit]:hover{box-shadow:0 4px 16px rgba(0,51,102,.2) !important;transform:translateY(-1px)}
.em-module-wrap .nxv-btn-outline{background:white !important;color:#003366 !important;border:1.5px solid #d8d5d2 !important;padding:7px 14px !important;border-radius:7px !important;font-size:11px !important;font-weight:600 !important;cursor:pointer;font-family:inherit}
.em-module-wrap .nxv-btn-outline:hover{border-color:#003366 !important;background:#f8f7f5 !important}
.em-module-wrap .nxv-btn-danger{background:#c4633a !important;color:white !important;border:none !important}

/* Override modals */
.em-module-wrap .nxv-modal-overlay{backdrop-filter:blur(4px)}
.em-module-wrap .nxv-modal{border-radius:12px !important;box-shadow:0 24px 64px rgba(0,0,0,.15) !important}
.em-module-wrap .nxv-modal-header{border-bottom:1px solid #eae8e5 !important;padding:16px 20px !important}
.em-module-wrap .nxv-modal-header h2{font-size:15px !important;font-weight:700 !important;color:#0a1e3d !important}

/* Override cards in modules */
.em-module-wrap .nxv-consultation-admin-card,.em-module-wrap .dc-consult-card{background:white !important;border:1px solid #eae8e5 !important;border-radius:9px !important;padding:16px !important;margin-bottom:8px !important}

/* Badge overrides */
.em-module-wrap .nxv-badge,.em-module-wrap .dc-consult-status-badge{display:inline-flex;align-items:center;padding:2px 9px;border-radius:20px;font-size:9px;font-weight:700}
.em-module-wrap .nxv-badge-green,.em-module-wrap .dc-consult-status-badge.ouvert{background:#e8f5e9 !important;color:#1b7a1b !important}
.em-module-wrap .dc-consult-status-badge.ferme{background:#f3f4f6 !important;color:#6b7280 !important}

/* Export button */
.em-module-wrap .nxv-btn-sm{padding:5px 10px !important;font-size:10px !important;border-radius:6px !important}

/* Toggle buttons */
.em-module-wrap .dc-agenda-toggle-btn{padding:4px 12px;border-radius:20px;font-size:10px;font-weight:600;border:none;cursor:pointer;font-family:inherit}
.em-module-wrap .dc-agenda-toggle-btn.open{background:#e8f5e9;color:#1b7a1b}
.em-module-wrap .dc-agenda-toggle-btn.closed{background:#fff3e0;color:#d84315}

/* Action buttons inline */
.em-module-wrap .dc-agenda-btn-detail,.em-module-wrap .dc-agenda-btn-edit,.em-module-wrap .dc-agenda-btn-delete{background:none;border:1px solid #eae8e5;border-radius:6px;padding:5px 7px;cursor:pointer;color:#8a8f98;transition:all .12s}
.em-module-wrap .dc-agenda-btn-edit:hover{border-color:#e27d60;color:#e27d60}
.em-module-wrap .dc-agenda-btn-delete:hover{border-color:#c4633a;color:#c4633a}

/* Section styling for concertation/enquete */
.em-module-wrap .dc-tabs button{padding:7px 16px;border:1.5px solid #eae8e5;border-radius:7px;background:white;font-size:11px;font-weight:600;color:#8a8f98;cursor:pointer;font-family:inherit;transition:all .12s}
.em-module-wrap .dc-tabs button.active{background:#0a1e3d;color:white;border-color:#0a1e3d}
.em-module-wrap .dc-btn-sm{padding:5px 10px;border-radius:5px;font-size:10px;font-weight:600;border:1px solid #eae8e5;background:white;cursor:pointer;font-family:inherit}
.em-module-wrap .dc-btn-danger{color:#c4633a !important;border-color:#c4633a !important}

/* Responsive */
@media(max-width:1024px){.em-sidebar{width:210px}.em-content{margin-left:210px;padding:18px}.em-grid-2{grid-template-columns:1fr}.em-grid-3{grid-template-columns:1fr 1fr}}
@media(max-width:768px){.em-sidebar{display:none}.em-content{margin-left:0;padding:16px}}
