/* ============================================================
   Répertoire Agents CFFP — style.css
   ============================================================ */

.rac-wrap { font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif; color:#1E2A3B; max-width:1200px; margin:0 auto; padding:1rem 0; }
.rac-wrap *,.rac-wrap *::before,.rac-wrap *::after { box-sizing:border-box; }

/* ── BARRE DE FILTRES ── */
.rac-filterbar {
  display:flex; flex-wrap:wrap; align-items:center; gap:8px;
  padding:14px 16px; background:#fff;
  border:1px solid #DDE3ED; border-radius:10px;
  margin-bottom:16px; box-shadow:0 2px 8px rgba(0,0,0,.04);
}

.rac-input {
  flex:1; min-width:170px; padding:8px 14px;
  border:1px solid #DDE3ED; border-radius:7px;
  font-size:.875rem; color:#1E2A3B; outline:none;
  transition:border-color .2s;
}
.rac-input:focus { border-color:#1A5FA8; }
.rac-input::placeholder { color:#94A3B8; }

.rac-select {
  padding:8px 12px; border:1px solid #DDE3ED; border-radius:7px;
  font-size:.875rem; color:#1E2A3B; background:#fff;
  outline:none; cursor:pointer; transition:border-color .2s;
}
.rac-select:focus { border-color:#1A5FA8; }

.rac-btn {
  padding:8px 16px; border:none; border-radius:7px;
  font-size:.875rem; font-weight:600; cursor:pointer;
  transition:opacity .15s, transform .12s; white-space:nowrap;
  display:inline-flex; align-items:center; gap:5px;
}
.rac-btn:hover { opacity:.88; transform:translateY(-1px); }
.rac-btn-filter { background:#1A5FA8; color:#fff; }
.rac-btn-reset  { background:#F1F5F9; color:#5A6577; border:1px solid #DDE3ED; }
.rac-btn-excel  { background:#1F7D45; color:#fff; }
.rac-btn-pdf    { background:#C94040; color:#fff; }

/* ── META COMPTEUR ── */
.rac-meta { font-size:.82rem; color:#64748B; margin-bottom:10px; padding:0 2px; }

/* ── TABLEAU ── */
.rac-table-wrap { width:100%; overflow-x:auto; border-radius:10px; border:1px solid #DDE3ED; box-shadow:0 2px 10px rgba(0,0,0,.06); }

.rac-table { width:100%; border-collapse:collapse; font-size:.875rem; background:#fff; min-width:900px; }

.rac-table thead tr { background:#1A3A6B; }
.rac-table thead th {
  color:#fff; font-weight:700; font-size:.82rem;
  padding:14px 16px; text-align:left; white-space:nowrap;
  border-right:1px solid rgba(255,255,255,.1); letter-spacing:.02em;
}
.rac-table thead th:last-child { border-right:none; }

.rac-table tbody tr { border-bottom:1px solid #EEF2F7; transition:background .1s; }
.rac-table tbody tr:last-child { border-bottom:none; }
.rac-table tbody tr:nth-child(even) { background:#F8FAFC; }
.rac-table tbody tr:hover { background:#EDF4FF; }

.rac-table td { padding:12px 16px; vertical-align:middle; color:#334155; line-height:1.5; }

/* Colonne NOM : lien cliquable */
.rac-nom-link {
  color:#1A5FA8; font-weight:700; cursor:pointer;
  text-decoration:none; transition:color .15s;
}
.rac-nom-link:hover { color:#0D3E7A; text-decoration:underline; }

/* Badges sexe */
.rac-badge {
  display:inline-block; padding:2px 10px; border-radius:20px;
  font-size:.75rem; font-weight:700;
}
.rac-badge-h { background:#EAF2FB; color:#1A5FA8; }
.rac-badge-f { background:#FCE7F3; color:#9D174D; }

/* ── PAGINATION ── */
.rac-pagination { display:flex; justify-content:center; align-items:center; gap:6px; margin-top:16px; flex-wrap:wrap; }
.rac-page-btn {
  padding:6px 13px; border:1px solid #DDE3ED; border-radius:7px;
  background:#fff; font-size:.82rem; cursor:pointer; color:#334155;
  transition:all .15s; font-weight:500;
}
.rac-page-btn:hover { background:#EDF4FF; border-color:#1A5FA8; color:#1A5FA8; }
.rac-page-btn.active { background:#1A5FA8; color:#fff; border-color:#1A5FA8; }
.rac-page-info { font-size:.82rem; color:#64748B; margin:0 8px; }

/* ── LOADER ── */
.rac-loader { text-align:center; padding:3rem; color:#94A3B8; font-size:.9rem; display:flex; flex-direction:column; align-items:center; gap:12px; }
.rac-loader span { display:block; width:32px; height:32px; border-radius:50%; border:3px solid #EAF2FB; border-top-color:#1A5FA8; animation:racSpin .8s linear infinite; }
@keyframes racSpin { to { transform:rotate(360deg); } }

.rac-empty { text-align:center; padding:3rem; color:#94A3B8; font-size:.9rem; }

/* ── MODAL DÉTAIL ── */
.rac-overlay {
  position:fixed; inset:0; background:rgba(10,20,50,.55);
  z-index:99999; display:flex; align-items:center; justify-content:center;
  padding:1rem; animation:racFadeIn .2s ease;
}
@keyframes racFadeIn { from{opacity:0} to{opacity:1} }

.rac-modal {
  background:#fff; border-radius:14px; width:100%; max-width:580px;
  max-height:90vh; overflow-y:auto;
  box-shadow:0 24px 64px rgba(0,0,0,.22);
  animation:racSlideUp .22s ease;
}
@keyframes racSlideUp { from{transform:translateY(18px);opacity:0} to{transform:translateY(0);opacity:1} }

.rac-modal-header {
  background:linear-gradient(135deg,#1A3A6B,#1A5FA8);
  padding:1.8rem 2rem; display:flex; align-items:center; gap:1.2rem; position:relative; border-radius:14px 14px 0 0;
}
.rac-modal-close {
  position:absolute; top:14px; right:14px;
  background:rgba(255,255,255,.2); border:none; color:#fff;
  width:30px; height:30px; border-radius:50%; cursor:pointer;
  font-size:15px; display:flex; align-items:center; justify-content:center;
  transition:background .15s;
}
.rac-modal-close:hover { background:rgba(255,255,255,.38); }

.rac-modal-av {
  width:68px; height:68px; border-radius:50%; flex-shrink:0;
  display:flex; align-items:center; justify-content:center;
  font-size:22px; font-weight:700; overflow:hidden;
  border:3px solid rgba(255,255,255,.3); background:rgba(255,255,255,.15); color:#fff;
}
.rac-modal-av img { width:100%; height:100%; object-fit:cover; border-radius:50%; }
.rac-modal-hname  { font-size:1.1rem; font-weight:700; color:#fff; margin:0 0 3px; }
.rac-modal-hposte { font-size:.82rem; color:rgba(255,255,255,.82); margin:0; }

.rac-modal-body { padding:1.6rem 2rem 2rem; }
.rac-modal-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-bottom:1.2rem; }
.rac-modal-field label { display:block; font-size:.68rem; font-weight:700; text-transform:uppercase; letter-spacing:.07em; color:#94A3B8; margin-bottom:3px; }
.rac-modal-field span  { font-size:.875rem; font-weight:600; color:#1E2A3B; }
.rac-modal-sep { height:1px; background:#F1F5F9; margin:1rem 0; }
.rac-modal-exp { background:#F8FAFC; border-radius:8px; padding:12px 16px; font-size:.83rem; color:#475569; line-height:1.75; font-style:italic; }
.rac-modal-contacts { display:flex; gap:10px; flex-wrap:wrap; margin-top:1rem; }
.rac-modal-cbtn { display:inline-flex; align-items:center; gap:6px; padding:9px 18px; border-radius:8px; font-size:.82rem; font-weight:700; text-decoration:none; transition:opacity .15s; }
.rac-modal-cbtn:hover { opacity:.85; }
.rac-cbtn-tel   { background:#E3F5F0; color:#0D8A6A; }
.rac-cbtn-email { background:#EAF2FB; color:#1A5FA8; }

/* ── RESPONSIVE ── */
@media(max-width:768px){
  .rac-filterbar { flex-direction:column; align-items:stretch; }
  .rac-input,.rac-select { width:100%; }
  .rac-btn { width:100%; justify-content:center; }
  .rac-modal-grid { grid-template-columns:1fr; }
}
