/* IUA Conseil & Strategies — Cartographie des Compétences */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --black: #1A1A1A; --dark: #444; --mid: #888; --light: #CCC;
  --bg: #F4F4F4; --white: #FFF; --red: #C0392B;
  --green: #1a6b3a; --green-bg: #eaf5ee; --border: #e0e0e0;
  --teal: #036C70; --teal-light: #E4F1F1; --teal-dark: #025357;
  --blue: #1a56db; --blue-bg: #e8f0fe;
  --amber: #92400e; --amber-bg: #fff8e1;
  --purple: #5b21b6; --purple-bg: #ede9fe;
}

body { font-family: Arial, Helvetica, sans-serif; background: var(--bg); color: var(--black); font-size: 14px; line-height: 1.6; }

/* HEADER */
.site-header { background: var(--black); color: var(--white); padding: 0 32px; display: flex; align-items: stretch; min-height: 64px; border-bottom: 1px solid #333; }
.header-logo { display: flex; align-items: center; gap: 14px; padding: 14px 0; }
.logo-pillar { width: 3px; height: 38px; background: var(--white); flex-shrink: 0; }
.logo-name { font-family: Georgia, serif; font-size: 22px; font-weight: 700; letter-spacing: 2px; line-height: 1; }
.logo-divider { width: 1px; background: #555; margin: 0 14px; align-self: stretch; }
.logo-module { font-size: 10px; letter-spacing: 2.5px; color: var(--light); text-transform: uppercase; align-self: center; }
.header-tagline { margin-left: auto; font-size: 9px; letter-spacing: 2px; color: #666; text-transform: uppercase; align-self: center; display: none; }
@media(min-width:600px) { .header-tagline { display: block; } }

/* HERO */
.hero { background: var(--white); border-bottom: 1px solid var(--border); padding: 40px 32px 32px; text-align: center; }
.hero-eyebrow { font-size: 10px; letter-spacing: 3px; color: var(--mid); text-transform: uppercase; margin-bottom: 12px; }
.hero h1 { font-family: Georgia, serif; font-size: clamp(22px, 4vw, 34px); font-weight: 700; line-height: 1.25; margin-bottom: 14px; max-width: 640px; margin-left: auto; margin-right: auto; }
.hero-sub { font-size: 14px; color: var(--dark); max-width: 560px; margin: 0 auto 24px; line-height: 1.7; }
.hero-badges { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 8px; }
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; padding: 5px 12px; border-radius: 20px; font-weight: 500; }
.badge-dark { background: var(--black); color: var(--white); }
.badge-outline { background: transparent; color: var(--dark); border: 1px solid var(--light); }
.badge-green { background: var(--green-bg); color: var(--green); border: 1px solid #b3dfc3; }

/* TABS / NAV */
.tabs-scroll {
  background: var(--white); border-bottom: 1px solid var(--border);
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.tabs-scroll::-webkit-scrollbar { height: 4px; }
.tabs-scroll::-webkit-scrollbar-thumb { background: var(--light); border-radius: 2px; }
.tabs-wrapper {
  padding: 0 16px; display: flex; min-width: min-content;
  position: sticky; top: 0; z-index: 100;
}
.tab-btn { padding: 14px 16px; font-size: 13px; background: none; border: none; border-bottom: 2px solid transparent; cursor: pointer; color: var(--mid); font-weight: 500; transition: all .15s; display: flex; align-items: center; gap: 6px; white-space: nowrap; text-decoration: none; flex-shrink: 0; }
.tab-btn .tab-ico { font-size: 14px; line-height: 1; }
.tab-btn .tab-txt { font-size: 12px; }
.tab-btn.active { color: var(--black); border-bottom-color: var(--black); }
.tab-btn:hover:not(.active) { color: var(--dark); background: var(--bg); }
.tab-btn.tab-logout { color: var(--red); margin-left: auto; }
.tab-btn.tab-logout.active { border-bottom-color: var(--red); color: var(--red); }

/* LAYOUT */
.main { max-width: 860px; margin: 0 auto; padding: 32px 20px 64px; }
.main-wide { max-width: 1100px; }
.page { display: none; }
.page.active { display: block; }

/* ABOUT */
.about-section { background: var(--white); border: 1px solid var(--border); border-radius: 8px; padding: 28px 32px; margin-bottom: 20px; }
.about-section h2 { font-family: Georgia, serif; font-size: 18px; font-weight: 700; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 8px; }
.about-section h2 .section-num { font-family: Arial, sans-serif; font-size: 10px; font-weight: 700; letter-spacing: 2px; color: var(--mid); text-transform: uppercase; }
.about-section p { color: var(--dark); margin-bottom: 10px; font-size: 13.5px; line-height: 1.75; }
.about-section p:last-child { margin-bottom: 0; }
.services-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-top: 14px; }
.service-card { background: var(--bg); border: 1px solid var(--border); border-radius: 6px; padding: 14px 16px; }
.service-card .s-num { font-size: 10px; letter-spacing: 2px; color: var(--mid); font-weight: 700; margin-bottom: 4px; }
.service-card .s-title { font-size: 13px; font-weight: 700; margin-bottom: 5px; }
.service-card .s-desc { font-size: 11.5px; color: var(--dark); line-height: 1.55; }
.legal-box { background: var(--bg); border-left: 3px solid var(--black); padding: 14px 18px; margin-top: 12px; font-size: 12px; color: var(--dark); line-height: 1.65; }
.legal-box strong { color: var(--black); }
.warning-box { background: #fff8e1; border-left: 3px solid #f59e0b; padding: 12px 16px; margin-top: 12px; font-size: 12px; color: #7c4f00; line-height: 1.65; }
.green-box { background: var(--green-bg); border-left: 3px solid var(--green); padding: 12px 16px; margin-top: 12px; font-size: 12px; color: #134e2a; line-height: 1.65; }

/* FORM */
.form-card { background: var(--white); border: 1px solid var(--border); border-radius: 8px; padding: 28px 32px; margin-bottom: 16px; }
.form-section-title { font-size: 13px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; padding-bottom: 10px; border-bottom: 1px solid var(--border); margin-bottom: 20px; display: flex; align-items: center; gap: 8px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-full { grid-column: 1 / -1; }
@media(max-width:540px) { .form-grid { grid-template-columns: 1fr; } .form-full { grid-column: 1; } }
.form-group { display: flex; flex-direction: column; gap: 5px; }
label.field-label { font-size: 11.5px; font-weight: 700; color: var(--dark); letter-spacing: .3px; text-transform: uppercase; }
.req { color: var(--red); margin-left: 2px; }
.field-hint { font-size: 10.5px; color: var(--mid); }

input[type=text], input[type=email], input[type=tel], input[type=password], select, textarea {
  font-family: Arial, sans-serif; font-size: 13px; padding: 9px 12px; border: 1px solid var(--light);
  border-radius: 5px; background: var(--white); color: var(--black); width: 100%; transition: border-color .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--black); box-shadow: 0 0 0 3px rgba(26,26,26,.06); }
textarea { resize: vertical; min-height: 72px; }

.range-wrap { display: flex; align-items: center; gap: 10px; }
.range-wrap input[type=range] { flex: 1; accent-color: var(--black); }
.range-disp { font-size: 13px; font-weight: 700; min-width: 56px; text-align: right; }

.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px; margin-top: 4px; }
.check-grid.small { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.check-item { display: flex; align-items: center; gap: 7px; font-size: 12.5px; padding: 7px 10px; border: 1px solid var(--border); border-radius: 5px; cursor: pointer; background: var(--bg); transition: all .1s; color: var(--dark); }
.check-item:hover { border-color: var(--black); background: var(--white); }
.check-item input { width: auto; padding: 0; border: none; background: transparent; accent-color: var(--black); }

.prog-track { height: 5px; background: var(--border); border-radius: 3px; margin-top: 6px; overflow: hidden; }
.prog-fill { height: 100%; background: var(--black); border-radius: 3px; transition: width .3s ease; }
.niveau-desc { font-size: 11px; color: var(--mid); margin-top: 3px; font-style: italic; }

.btn-row { display: flex; gap: 10px; justify-content: flex-end; margin-top: 24px; flex-wrap: wrap; }
.btn { font-family: Arial, sans-serif; font-size: 13px; font-weight: 700; padding: 10px 22px; border-radius: 5px; cursor: pointer; border: none; transition: all .15s; letter-spacing: .3px; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.btn-primary { background: var(--black); color: var(--white); }
.btn-primary:hover { background: #333; }
.btn-ghost { background: transparent; color: var(--dark); border: 1px solid var(--light); }
.btn-ghost:hover { background: var(--bg); }
.btn-danger { background: var(--red); color: var(--white); font-size: 11px; padding: 6px 12px; }

.alert { padding: 14px 18px; border-radius: 6px; font-size: 13px; margin-bottom: 20px; display: flex; align-items: flex-start; gap: 10px; font-weight: 500; }
.alert-ok { background: var(--green-bg); color: var(--green); border: 1px solid #b3dfc3; }
.alert-err { background: #fef2f2; color: var(--red); border: 1px solid #fecaca; }

/* ADMIN */
.lock-screen { min-height: 440px; display: flex; align-items: center; justify-content: center; }
.lock-card { background: var(--white); border: 1px solid var(--border); border-radius: 8px; padding: 36px 40px; width: 360px; text-align: center; }
.lock-icon { font-size: 36px; color: var(--mid); margin-bottom: 12px; }
.lock-card h3 { font-family: Georgia, serif; font-size: 18px; margin-bottom: 6px; }
.lock-card p { font-size: 12px; color: var(--mid); margin-bottom: 20px; }

.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 24px; }
@media(max-width:600px) { .stats-row { grid-template-columns: 1fr 1fr; } }
.stat-box { background: var(--white); border: 1px solid var(--border); border-radius: 7px; padding: 14px 16px; }
.stat-box .sl { font-size: 10px; letter-spacing: 1.5px; color: var(--mid); text-transform: uppercase; margin-bottom: 4px; }
.stat-box .sv { font-size: 28px; font-weight: 700; line-height: 1; }
.stat-box .ss { font-size: 10.5px; color: var(--mid); margin-top: 3px; }

.filter-row { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; align-items: center; }
.filter-row input, .filter-row select { width: auto; font-size: 12px; padding: 7px 10px; flex: 1; min-width: 120px; }

.profiles-wrap { background: var(--white); border: 1px solid var(--border); border-radius: 8px; overflow-x: auto; }
.profiles-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.profiles-table th { background: var(--bg); text-align: left; padding: 9px 12px; font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--mid); border-bottom: 1px solid var(--border); }
.profiles-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.profiles-table tr:last-child td { border-bottom: none; }
.profiles-table tr:hover td { background: var(--bg); }

.pill { display: inline-block; font-size: 10px; font-weight: 700; padding: 3px 9px; border-radius: 12px; letter-spacing: .5px; text-transform: uppercase; }
.pill-iua { background: #e8f0fe; color: #1a56db; }
.pill-ext { background: #fff8e1; color: #92400e; }
.pill-expert { background: #eaf5ee; color: var(--green); }
.pill-senior { background: #ede9fe; color: #5b21b6; }
.pill-confirme { background: #e8f0fe; color: #1e40af; }
.pill-junior { background: var(--bg); color: var(--mid); }

.detail-panel { background: var(--white); border: 1px solid var(--border); border-radius: 8px; padding: 24px 28px; margin-bottom: 16px; }
.detail-header { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--black); color: var(--white); display: flex; align-items: center; justify-content: center; font-family: Georgia, serif; font-size: 16px; font-weight: 700; flex-shrink: 0; }
.detail-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media(max-width:600px) { .detail-grid { grid-template-columns: 1fr 1fr; } }
.di .dl { font-size: 10px; letter-spacing: 1px; color: var(--mid); text-transform: uppercase; margin-bottom: 2px; }
.di .dv { font-size: 13px; font-weight: 700; }
.di.full { grid-column: 1 / -1; }
.di.full .dv { font-weight: 400; white-space: pre-wrap; }

/* Charts dashboard */
.charts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 24px; }
@media(max-width:900px) { .charts-grid { grid-template-columns: 1fr; } }
.chart-panel { background: var(--white); border: 1px solid var(--border); border-radius: 8px; padding: 16px 18px; }
.chart-title { font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--mid); margin-bottom: 12px; }
.bar-row { display: grid; grid-template-columns: 1fr 2fr 28px; gap: 8px; align-items: center; margin-bottom: 7px; font-size: 11px; }
.bar-label { color: var(--dark); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { height: 8px; background: var(--bg); border-radius: 4px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--black); border-radius: 4px; min-width: 2px; }
.bar-fill-alt { background: #5b21b6; }
.bar-fill-green { background: var(--green); }
.bar-val { font-weight: 700; text-align: right; color: var(--mid); }

.results-meta { font-size: 12px; color: var(--mid); margin-bottom: 12px; }

.pagination { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 20px; flex-wrap: wrap; }
.page-num {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 34px; height: 34px; border-radius: 5px; font-size: 12px; font-weight: 700;
  text-decoration: none; color: var(--dark); border: 1px solid var(--border); background: var(--white);
}
.page-num.active { background: var(--black); color: var(--white); border-color: var(--black); }
.page-num:hover:not(.active) { background: var(--bg); }

.filter-advanced { margin-bottom: 8px; }

/* Annuaire experts — cartes */
.expert-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; margin-bottom: 20px; }
.expert-card {
  background: var(--white); border: 1px solid var(--border); border-radius: 8px;
  padding: 18px 20px; display: flex; flex-direction: column; gap: 10px;
  transition: box-shadow .15s;
}
.expert-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.08); }
.expert-card-head { display: flex; align-items: center; gap: 12px; }
.expert-name { font-family: Georgia, serif; font-size: 16px; font-weight: 700; }
.expert-role { font-size: 12px; color: var(--dark); }
.match-score {
  margin-left: auto; font-size: 11px; font-weight: 700; color: var(--green);
  background: var(--green-bg); padding: 4px 10px; border-radius: 12px; white-space: nowrap;
}
.expert-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.expert-domains { font-size: 12px; color: var(--dark); line-height: 1.4; }
.expert-meta { display: flex; flex-wrap: wrap; gap: 8px; font-size: 10.5px; color: var(--mid); }
.expert-meta span { background: var(--bg); padding: 3px 8px; border-radius: 4px; }
.expert-snippet { font-size: 12px; color: var(--dark); line-height: 1.55; flex: 1; }
.expert-footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 8px; border-top: 1px solid var(--border); }
.expert-tarif { font-size: 11px; font-weight: 700; color: var(--black); }
.expert-actions { display: flex; gap: 6px; }

/* FOOTER */
.site-footer { background: var(--black); text-align: center; padding: 20px 32px; font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; color: #555; }
.site-footer span { color: #444; margin: 0 8px; }

/* Honeypot anti-spam : champ invisible pour les humains */
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

/* ═══ DASHBOARD ADMIN AMÉLIORÉ ═══ */
.dash-body { background: #ECECEC; }

.dash-topbar {
  background: var(--white); border-bottom: 1px solid var(--border);
  padding: 20px 32px; display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
.dash-title { font-family: Georgia, serif; font-size: 22px; font-weight: 700; margin: 0; }
.dash-subtitle { font-size: 12px; color: var(--mid); margin: 4px 0 0; text-transform: capitalize; }
.dash-topbar-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.dash-main { padding-top: 24px; }

/* KPI cards */
.kpi-grid {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 16px;
}
@media(max-width:1100px) { .kpi-grid { grid-template-columns: repeat(3, 1fr); } }
@media(max-width:560px)  { .kpi-grid { grid-template-columns: repeat(2, 1fr); } }

.kpi-card {
  background: var(--white); border: 1px solid var(--border); border-radius: 10px;
  padding: 16px 18px; display: flex; align-items: flex-start; gap: 12px;
  text-decoration: none; color: inherit; transition: box-shadow .15s, transform .15s;
  border-top: 3px solid var(--border);
}
a.kpi-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.08); transform: translateY(-1px); }
.kpi-total { border-top-color: var(--black); }
.kpi-iua   { border-top-color: var(--blue); }
.kpi-ext   { border-top-color: var(--amber); }
.kpi-dispo { border-top-color: var(--green); }
.kpi-month { border-top-color: var(--teal); }
.kpi-fdfp  { border-top-color: var(--purple); }
.kpi-icon { font-size: 22px; line-height: 1; opacity: .85; }
.kpi-val { font-size: 26px; font-weight: 700; line-height: 1.1; }
.kpi-lbl { font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: var(--mid); margin-top: 2px; }
.kpi-sub { font-size: 10px; color: var(--mid); margin-top: 4px; }

/* Quick filters */
.quick-filters {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-bottom: 20px; padding: 0 2px;
}
.qf-label { font-size: 11px; font-weight: 700; color: var(--mid); text-transform: uppercase; letter-spacing: .5px; }
.qf-chip {
  font-size: 11.5px; font-weight: 600; padding: 5px 14px; border-radius: 20px;
  background: var(--white); border: 1px solid var(--border); color: var(--dark);
  text-decoration: none; transition: all .12s;
}
.qf-chip:hover { border-color: var(--teal); color: var(--teal); background: var(--teal-light); }
.qf-chip.active { background: var(--black); color: var(--white); border-color: var(--black); }

/* Layout 2 colonnes */
.dash-layout { display: grid; grid-template-columns: 1fr 280px; gap: 20px; align-items: start; }
@media(max-width:960px) { .dash-layout { grid-template-columns: 1fr; } .dash-sidebar { order: -1; } }
.dash-primary { min-width: 0; }

/* Section charts */
.dash-section-head {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px;
}
.dash-section-head h2 { font-family: Georgia, serif; font-size: 16px; font-weight: 700; margin: 0; }
.btn-text {
  background: none; border: none; font-size: 11px; color: var(--teal); cursor: pointer;
  font-weight: 600; text-decoration: underline; padding: 4px 0;
}
.charts-section.collapsed { display: none; }
.charts-grid-4 { grid-template-columns: repeat(4, 1fr); }
@media(max-width:1100px) { .charts-grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media(max-width:560px)  { .charts-grid-4 { grid-template-columns: 1fr; } }

.bar-fill-teal { background: var(--teal); }
.chart-empty { font-size: 12px; color: var(--mid); padding: 8px 0; }

/* Donut chart CSS */
.donut-wrap { position: relative; width: 100px; height: 100px; margin: 8px auto 12px; }
.donut {
  width: 100%; height: 100%; border-radius: 50%;
  background: conic-gradient(var(--blue) 0 calc(var(--pct) * 1%), var(--amber-bg) calc(var(--pct) * 1%) 100%);
}
.donut-center {
  position: absolute; inset: 18%; background: var(--white); border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 10px; color: var(--mid);
}
.donut-center strong { font-size: 18px; color: var(--black); line-height: 1; }
.donut-legend { display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: var(--dark); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.dot-iua { background: var(--blue); }
.dot-ext { background: #f59e0b; }

/* Filter card */
.filter-card {
  background: var(--white); border: 1px solid var(--border); border-radius: 10px;
  padding: 16px 18px; margin-bottom: 16px;
}
.filter-form { display: flex; flex-direction: column; gap: 12px; }
.filter-search {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--light); border-radius: 8px; padding: 0 12px; background: var(--bg);
}
.filter-search:focus-within { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(3,108,112,.08); }
.search-icon { font-size: 14px; opacity: .5; }
.filter-search input {
  border: none; background: transparent; flex: 1; padding: 10px 0; font-size: 13px;
  box-shadow: none;
}
.filter-search input:focus { outline: none; box-shadow: none; border: none; }
.filter-selects { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
@media(max-width:700px) { .filter-selects { grid-template-columns: 1fr 1fr; } }
.filter-actions { display: flex; gap: 8px; }
.filter-badge {
  display: inline-block; font-size: 9px; font-weight: 700; text-transform: uppercase;
  background: var(--teal-light); color: var(--teal); padding: 2px 8px; border-radius: 10px;
  vertical-align: middle; margin-left: 4px;
}
.list-header { margin-bottom: 10px; }

/* Table améliorée */
.profiles-enhanced { border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.04); }
.profiles-table thead { position: sticky; top: 52px; z-index: 10; }
.profiles-table tr.row-active td { background: var(--teal-light) !important; }
.cell-expert { display: flex; align-items: center; gap: 10px; }
.cell-expert strong { display: block; font-size: 12.5px; }
.cell-email { display: block; font-size: 10px; color: var(--mid); margin-top: 1px; }
.cell-domains { font-size: 11px; max-width: 150px; color: var(--dark); }
.cell-dispo { font-size: 11px; color: var(--dark); max-width: 120px; }
.cell-date { font-size: 11px; color: var(--mid); white-space: nowrap; }
.cell-actions { white-space: nowrap; display: flex; gap: 4px; align-items: center; }
.cell-actions form { display: inline; }
.btn-xs { font-size: 10px !important; padding: 4px 8px !important; }
.avatar-sm { width: 32px; height: 32px; font-size: 11px; }
.avatar-lg { width: 56px; height: 56px; font-size: 18px; }

.empty-state { text-align: center; padding: 48px 24px; }
.empty-icon { font-size: 32px; margin-bottom: 10px; opacity: .5; }
.empty-state p { color: var(--mid); margin-bottom: 16px; font-size: 13px; }

/* Detail panel enhanced */
.detail-panel-enhanced { border-radius: 10px; border-left: 4px solid var(--teal); scroll-margin-top: 80px; }
.detail-head-text { flex: 1; min-width: 0; }
.detail-name { font-family: Georgia, serif; font-size: 18px; font-weight: 700; }
.detail-role { font-size: 13px; color: var(--dark); margin-top: 2px; }
.detail-meta-row { font-size: 11px; color: var(--mid); margin-top: 6px; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.detail-link { color: var(--teal); text-decoration: none; font-weight: 600; }
.detail-link:hover { text-decoration: underline; }
.detail-tags { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.detail-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; align-items: flex-start; }
.domain-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.domain-tag {
  font-size: 11px; padding: 4px 10px; border-radius: 4px;
  background: var(--teal-light); color: var(--teal-dark); font-weight: 500;
}

/* Sidebar */
.dash-sidebar { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 68px; }
.sidebar-card {
  background: var(--white); border: 1px solid var(--border); border-radius: 10px;
  padding: 16px 18px;
}
.sidebar-title {
  font-size: 10px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--mid); margin-bottom: 12px; display: flex; justify-content: space-between; align-items: center;
}
.sidebar-link { font-size: 10px; color: var(--teal); text-decoration: none; letter-spacing: 0; text-transform: none; }
.sidebar-link:hover { text-decoration: underline; }
.sidebar-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 6px; margin: 0 -6px;
  border-radius: 6px; text-decoration: none; color: inherit; transition: background .1s;
}
.sidebar-item:hover { background: var(--bg); }
.si-name { font-size: 12.5px; font-weight: 700; }
.si-meta { font-size: 10px; color: var(--mid); margin-top: 1px; }
.sidebar-empty { font-size: 12px; color: var(--mid); }
.sidebar-audit {
  display: grid; grid-template-columns: auto 1fr auto; gap: 6px 8px; align-items: center;
  padding: 6px 0; border-bottom: 1px solid var(--bg); font-size: 11px;
}
.sidebar-audit:last-child { border-bottom: none; }
.sa-text { color: var(--dark); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sa-time { font-size: 10px; color: var(--mid); white-space: nowrap; }
.shortcut-btn {
  display: block; font-size: 12px; padding: 9px 12px; margin-bottom: 6px;
  background: var(--bg); border-radius: 6px; text-decoration: none; color: var(--dark);
  font-weight: 600; transition: background .1s;
}
.shortcut-btn:last-child { margin-bottom: 0; }
.shortcut-btn:hover { background: var(--teal-light); color: var(--teal-dark); }

@media(max-width:960px) {
  .dash-sidebar { position: static; display: grid; grid-template-columns: 1fr; }
  .detail-header { flex-wrap: wrap; }
  .detail-actions { margin-left: 0; width: 100%; margin-top: 10px; }
}

/* ═══ RESPONSIVE ADMIN (mobile & tablette) ═══ */

@media (max-width: 768px) {
  .site-header { padding: 0 16px; min-height: 56px; }
  .logo-name { font-size: 18px; }
  .logo-module { font-size: 8px; letter-spacing: 1.5px; max-width: 120px; line-height: 1.3; }
  .header-tagline { display: none; }

  .main, .main-wide { padding: 20px 14px 48px; }
  .dash-topbar { padding: 16px; flex-direction: column; align-items: stretch; }
  .dash-title { font-size: 19px; }
  .dash-topbar-actions { width: 100%; }
  .dash-topbar-actions .btn { flex: 1; justify-content: center; font-size: 12px; padding: 9px 12px; min-width: 0; }

  .kpi-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .kpi-card { padding: 12px 14px; gap: 10px; }
  .kpi-val { font-size: 22px; }
  .kpi-icon { font-size: 18px; }

  .quick-filters { gap: 6px; margin-bottom: 16px; }
  .qf-label { width: 100%; margin-bottom: 2px; }
  .qf-chip { font-size: 11px; padding: 5px 11px; }

  .filter-card { padding: 14px; }
  .filter-selects { grid-template-columns: 1fr; }
  .filter-actions { flex-direction: column; }
  .filter-actions .btn { width: 100%; justify-content: center; }

  .detail-panel { padding: 18px 16px; }
  .detail-panel-enhanced { border-left-width: 3px; scroll-margin-top: 60px; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-name { font-size: 16px; }
  .detail-actions .btn { flex: 1; justify-content: center; min-width: calc(50% - 4px); }

  .charts-grid, .charts-grid-4 { grid-template-columns: 1fr; }
  .bar-row { grid-template-columns: minmax(70px, 1fr) 2fr 24px; font-size: 10px; }

  .about-section { padding: 20px 18px; }
  .form-card { padding: 20px 18px; }
  .filter-row { flex-direction: column; align-items: stretch; }
  .filter-row input, .filter-row select { width: 100%; min-width: 0; }
  .filter-advanced .btn { width: 100%; justify-content: center; }

  .expert-grid { grid-template-columns: 1fr; }
  .lock-card { width: 100%; max-width: 360px; padding: 28px 24px; margin: 0 14px; }

  /* Tableau → cartes empilées */
  .profiles-wrap { overflow-x: visible; background: transparent; border: none; box-shadow: none; }
  .profiles-enhanced { box-shadow: none; background: transparent; }

  .profiles-table.responsive-table thead { display: none; }
  .profiles-table.responsive-table tbody tr {
    display: block; background: var(--white);
    border: 1px solid var(--border); border-radius: 10px;
    padding: 12px 14px; margin-bottom: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
  }
  .profiles-table.responsive-table tbody tr.row-active {
    border-color: var(--teal); box-shadow: 0 0 0 2px var(--teal-light);
  }
  .profiles-table.responsive-table tbody tr:hover td { background: transparent; }
  .profiles-table.responsive-table td {
    display: flex; justify-content: space-between; align-items: center;
    gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--bg);
    text-align: right; font-size: 12px;
  }
  .profiles-table.responsive-table td:last-child { border-bottom: none; padding-top: 10px; }
  .profiles-table.responsive-table td::before {
    content: attr(data-label);
    font-weight: 700; font-size: 9px; letter-spacing: .8px;
    text-transform: uppercase; color: var(--mid);
    text-align: left; flex-shrink: 0;
  }
  .profiles-table.responsive-table td[data-label="Expert"] {
    flex-direction: column; align-items: stretch; text-align: left; border-bottom: 1px solid var(--border);
    padding-bottom: 10px; margin-bottom: 4px;
  }
  .profiles-table.responsive-table td[data-label="Expert"]::before { margin-bottom: 6px; }
  .profiles-table.responsive-table td[data-label="Expert"] .cell-expert { width: 100%; }
  .profiles-table.responsive-table td.cell-actions {
    justify-content: flex-end; flex-wrap: wrap;
  }
  .profiles-table.responsive-table td.cell-actions::before { display: none; }
  .profiles-table.responsive-table td[data-label="Détails"] {
    flex-direction: column; align-items: stretch; text-align: left;
  }
  .profiles-table.responsive-table td[data-label="Détails"]::before { margin-bottom: 4px; }

  .cell-domains, .cell-dispo { max-width: none; text-align: right; }
  .cell-actions { justify-content: flex-end; }
  .btn-xs { padding: 6px 12px !important; font-size: 11px !important; }

  .pagination { gap: 6px; }
  .pagination .btn { font-size: 11px; padding: 8px 12px; }

  .site-footer { padding: 16px; font-size: 9px; letter-spacing: 1px; }
  .site-footer span { display: block; margin: 4px 0; }
}

@media (max-width: 480px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .kpi-card { flex-direction: row; align-items: center; }

  .tab-btn { padding: 12px 12px; }
  .tab-btn .tab-txt { font-size: 11px; }

  .dash-topbar-actions { flex-direction: column; }
  .dash-topbar-actions .btn { width: 100%; }

  .domain-tags { gap: 4px; }
  .domain-tag { font-size: 10px; }

  .sidebar-audit { grid-template-columns: 1fr; gap: 2px; }
  .sa-time { grid-column: 1; }
}

/* ─── Admin questions du formulaire ─── */
.q-section-block {
  background: var(--white); border: 1px solid var(--border);
  border-radius: 12px; margin-bottom: 20px; overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.q-section-block.q-section-off { opacity: .65; }
.q-section-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 16px; padding: 16px 20px; background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.q-section-head h3 { margin: 0 0 4px; font-size: 15px; color: var(--ink); }
.q-section-title-wrap { flex: 1; min-width: 0; }
.q-section-rename { margin: 0; }
.q-rename-label { font-size: 9px; margin-bottom: 4px; display: block; }
.q-rename-row { display: flex; gap: 8px; align-items: center; max-width: 480px; }
.q-rename-input {
  flex: 1; font-size: 15px; font-weight: 700; color: var(--ink);
  padding: 6px 10px; border: 1px solid var(--border); border-radius: 6px;
  background: var(--white);
}
.q-rename-input:focus { border-color: var(--teal); outline: none; box-shadow: 0 0 0 2px var(--teal-light); }
.q-section-meta { font-size: 11px; color: var(--mid); display: block; margin-top: 6px; }
.q-section-actions { display: flex; gap: 8px; flex-shrink: 0; flex-wrap: wrap; }
.q-admin-table .field-code {
  font-family: ui-monospace, Consolas, monospace; font-size: 11px;
  background: var(--bg); padding: 2px 6px; border-radius: 4px; color: var(--dark);
}
.q-admin-table tr.row-off td { opacity: .55; }
.q-admin-table .cell-actions { white-space: nowrap; }

@media (max-width: 768px) {
  .q-section-head { flex-direction: column; }
  .q-section-actions { width: 100%; }
}
