/* R9 — Recruiter "Candidatures Reçues" inbox. Ported verbatim from the canonical
   mockup (/mockups/recruiter/applications) <style> block. Zero inline CSS — the
   view references these named classes; dynamic values arrive via data-attrs. */

.ra-scope{
  --ra-gold:#B8975A;
  --ra-gold-mid:#B8975A;
  --ra-gold-light:#E5D4A0;
  --ra-gold-ultra:#EFE2B8;
  --ra-gold-dark:#9A7A28;
  --ra-gold-bg:#F8F4ED;
  --ra-bg:#FFFFFF;
  --ra-black:#0d0d0d;
  --ra-text:#1a1a1a;
  --ra-muted:#737373;
  --ra-light:#a3a3a3;
  --ra-lightest:#d4d4d4;
  --ra-border:#e5e5e5;
  --ra-border-light:#f5f5f5;
  --ra-white:#ffffff;
  --ra-serif:'Geist',system-ui,sans-serif;
  --ra-sans:'Geist',system-ui,sans-serif;
  --ra-gold-gradient:linear-gradient(135deg,#C4A559 0%,#D4BC7A 40%,#E5D4A0 70%,#EFE2B8 100%);
}

/* ── Page ── */
.ra-page{max-width:72rem;margin:0 auto;padding:2rem 1.5rem;}

/* ── Title row ── */
.ra-title-row{display:flex;align-items:flex-start;justify-content:space-between;margin-bottom:1.5rem;flex-wrap:wrap;gap:1rem;}
.ra-title{font-family:var(--ra-sans);font-size:1.875rem;font-weight:700;letter-spacing:-0.025em;color:var(--ra-text);line-height:1.2;}
.ra-subtitle{font-size:0.875rem;color:var(--ra-muted);margin-top:0.25rem;}

/* ── Position-scoped filter chip (?job_id=) ── */
.ra-scopechip{display:inline-flex;align-items:center;gap:0.5rem;margin-bottom:1rem;padding:0.375rem 0.5rem 0.375rem 0.875rem;border-radius:9999px;border:1px solid var(--ra-gold-light);background:var(--ra-gold-bg);font-size:0.8125rem;font-weight:500;color:#7a5f1f;}
.ra-scopechip a{display:inline-flex;align-items:center;justify-content:center;width:1.25rem;height:1.25rem;border-radius:50%;color:#7a5f1f;text-decoration:none;transition:background 0.15s;}
.ra-scopechip a:hover{background:rgba(154,122,40,0.12);}
.ra-scopechip svg{width:0.875rem;height:0.875rem;}

/* ── Engagement badge ── */
.ra-engagement{display:inline-flex;align-items:center;gap:0.5rem;padding:0.375rem 0.75rem;border-radius:9999px;border:1px solid #bbf7d0;background:#f0fdf4;font-size:0.75rem;font-weight:500;color:#166534;white-space:nowrap;}
.ra-engagement-dim{opacity:0.7;}
.ra-engagement-dot{width:0.375rem;height:0.375rem;border-radius:50%;background:currentColor;opacity:0.7;}

/* ── Tabs ── */
.ra-tabs{display:flex;flex-wrap:wrap;gap:0.5rem;margin-bottom:1.5rem;border-bottom:1px solid var(--ra-border);padding-bottom:0;}
.ra-tab{position:relative;display:inline-flex;align-items:center;gap:0.5rem;padding:0.625rem 1rem;font-size:0.875rem;font-weight:500;color:var(--ra-muted);background:none;border:none;font-family:var(--ra-sans);cursor:pointer;transition:color 0.15s;text-decoration:none;}
.ra-tab:hover{color:var(--ra-black);}
.ra-tab.active{color:var(--ra-text);font-weight:600;}
.ra-tab.active::after{content:'';position:absolute;bottom:-1px;left:0;right:0;height:2px;background:var(--ra-gold);}
.ra-tab svg{width:1rem;height:1rem;flex-shrink:0;}
.ra-tab-count{font-size:0.75rem;padding:0.125rem 0.375rem;border-radius:9999px;line-height:1.3;}
.ra-tab .ra-tab-count{background:#f5f5f5;color:#404040;}
.ra-tab.active .ra-tab-count{background:var(--ra-gold);color:var(--ra-white);}

/* ── Empty state ── */
.ra-empty{text-align:center;padding:5rem 0;color:var(--ra-lightest);}
.ra-empty svg{width:2.5rem;height:2.5rem;margin:0 auto 0.75rem;opacity:0.4;}

/* ── Card list ── */
.ra-list{display:flex;flex-direction:column;gap:0.5rem;}

/* ── Candidate card ── */
.ra-card{
  width:100%;text-align:left;
  background:var(--ra-white);
  border-radius:1rem;
  border:1px solid var(--ra-border);
  padding:1rem;
  display:flex;align-items:center;gap:1rem;
  transition:all 0.15s;
  cursor:pointer;
  text-decoration:none;color:inherit;
}
.ra-card:hover{border-color:#d4d4d4;box-shadow:0 1px 3px rgba(0,0,0,0.05);}

.ra-card-avatar{
  width:3rem;height:3rem;border-radius:50%;
  background:#f5f5f5;
  display:flex;align-items:center;justify-content:center;
  overflow:hidden;flex-shrink:0;
}
.ra-card-avatar img{width:100%;height:100%;object-fit:cover;}
.ra-card-avatar span{font-size:0.875rem;font-weight:600;color:#525252;}

.ra-card-body{flex:1;min-width:0;text-decoration:none;color:inherit;display:block;}
.ra-card-name-row{display:flex;align-items:center;gap:0.5rem;flex-wrap:wrap;}
.ra-card-name{font-weight:600;font-size:0.875rem;color:var(--ra-text);}
.ra-card-verified{width:0.875rem;height:0.875rem;color:var(--ra-gold);flex-shrink:0;}
.ra-card-dot{font-size:0.75rem;color:var(--ra-lightest);}
.ra-card-job{font-size:0.875rem;color:#404040;}
.ra-card-letter{font-size:0.75rem;color:var(--ra-muted);margin-top:0.25rem;overflow:hidden;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;}
.ra-card-time{font-size:0.75rem;color:var(--ra-lightest);flex-shrink:0;display:flex;align-items:center;gap:0.25rem;white-space:nowrap;}
.ra-card-time svg{width:0.75rem;height:0.75rem;}

/* ── AI match (Brique 3, grayed) ── */
.ra-card-match{display:flex;align-items:center;gap:0.25rem;flex-shrink:0;font-size:0.72rem;font-weight:600;color:var(--ra-lightest);white-space:nowrap;opacity:0.65;cursor:not-allowed;}
.ra-card-match svg{width:0.875rem;height:0.875rem;}
.ra-future-tag{font-size:0.6rem;font-weight:700;letter-spacing:0.02em;text-transform:uppercase;padding:0.1rem 0.375rem;border-radius:9999px;background:#f5f5f5;color:var(--ra-light);white-space:nowrap;}

/* ── Card quick actions ── */
.ra-card-actions{display:flex;align-items:center;gap:0.5rem;flex-shrink:0;}
.ra-card-act{font-size:0.72rem;font-weight:700;padding:7px 14px;border-radius:999px;cursor:pointer;white-space:nowrap;font-family:inherit;border:1px solid transparent;transition:all .15s;text-decoration:none;display:inline-flex;align-items:center;}
.ra-card-act-gold{background:linear-gradient(135deg,#C4A559 0%,#D4BC7A 40%,#E5D4A0 70%,#EFE2B8 100%);color:#fff;}
.ra-card-act-gold:hover{filter:brightness(1.04);}
.ra-card-act-outline{background:#fff;border-color:#e5e5e5;color:#525252;}
.ra-card-act-outline:hover{border-color:#A8893C;color:#A8893C;}
.ra-card-act-disabled{opacity:0.55;cursor:not-allowed;}
.ra-card-status-label{font-size:0.72rem;font-weight:600;color:var(--ra-lightest);white-space:nowrap;}

/* Quick-action forms must not break the flex row */
.ra-card-actions form{margin:0;display:inline-flex;}

/* ── Animations ── */
@keyframes ra-fadeUp{from{opacity:0;transform:translateY(4px);}to{opacity:1;transform:none;}}
.ra-card{animation:ra-fadeUp 0.25s ease both;}

/* ── Responsive ── */
@media(max-width:640px){
  .ra-title-row{flex-direction:column;}
}

/* ══ PANNEAU LATÉRAL « Candidature » (slide-over) — porté du mockup ══ */
.ra-overlay{position:fixed;inset:0;background:rgba(0,0,0,.4);z-index:200;display:flex;align-items:center;justify-content:flex-end;}
.ra-overlay[hidden]{display:none;}
.ra-panel{background:var(--ra-white);width:100%;max-width:36rem;height:100%;overflow-y:auto;animation:ra-slideIn .3s ease;}
@keyframes ra-slideIn{from{transform:translateX(100%);}to{transform:translateX(0);}}
body.ra-panel-open{overflow:hidden;}

.ra-panel-inner{padding:1.5rem;display:flex;flex-direction:column;min-height:100%;}
.ra-panel-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:1.5rem;}
.ra-panel-label{font-size:.75rem;text-transform:uppercase;letter-spacing:.05em;color:var(--ra-muted);}
.ra-panel-close{padding:.25rem;border-radius:9999px;background:none;border:none;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background .15s;color:var(--ra-text);}
.ra-panel-close:hover{background:#f5f5f5;}
.ra-panel-close svg{width:1.25rem;height:1.25rem;}

.ra-profile-row{display:flex;align-items:center;gap:1rem;margin-bottom:1.5rem;}
.ra-profile-avatar{width:4rem;height:4rem;border-radius:50%;background:#f5f5f5;display:flex;align-items:center;justify-content:center;overflow:hidden;flex-shrink:0;}
.ra-profile-avatar span{font-weight:600;font-size:1rem;color:var(--ra-text);}
.ra-profile-name{font-weight:600;font-size:1.125rem;color:var(--ra-text);}
.ra-profile-position{font-size:.875rem;color:var(--ra-muted);}
.ra-profile-location{font-size:.75rem;color:var(--ra-light);}

.ra-job-box{margin-bottom:1.5rem;padding:1rem;background:var(--ra-gold-bg);border-radius:.75rem;}
.ra-section-label{font-size:.75rem;text-transform:uppercase;letter-spacing:.05em;color:var(--ra-muted);margin-bottom:.5rem;}
.ra-job-title{font-weight:500;color:var(--ra-text);}

.ra-section{margin-bottom:1.5rem;}
.ra-section-text{font-size:.875rem;color:#262626;white-space:pre-wrap;line-height:1.6;}
.ra-section-text-muted{color:var(--ra-light);}

.ra-info-grid{display:grid;grid-template-columns:1fr 1fr;gap:.75rem;margin-bottom:1.5rem;}
.ra-info-card{padding:.75rem;border-radius:.75rem;border:1px solid var(--ra-border);}
.ra-info-card-label{font-size:.75rem;color:var(--ra-muted);}
.ra-info-card-value{font-weight:500;color:var(--ra-text);}
.ra-info-card-value a{text-decoration:underline;color:var(--ra-text);font-weight:500;}
.ra-info-card:hover{border-color:var(--ra-lightest);transition:border-color .15s;}

.ra-actions{position:sticky;bottom:0;margin-top:auto;background:var(--ra-white);padding-top:1rem;border-top:1px solid var(--ra-border-light);display:flex;gap:.75rem;}
.ra-btn{flex:1;padding:.75rem 1.25rem;border-radius:9999px;font-size:.875rem;font-weight:500;font-family:var(--ra-sans);cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:.5rem;transition:all .15s;text-decoration:none;border:1px solid transparent;}
.ra-btn-outline{background:none;border-color:#d4d4d4;color:var(--ra-text);}
.ra-btn-outline:hover{background:#fff;border-color:#A8893C;color:#A8893C;}
.ra-btn-gold{background:var(--ra-gold-gradient);color:var(--ra-white);font-weight:700;box-shadow:0 2px 8px rgba(150,120,62,.2);}
.ra-btn-disabled{opacity:.55;cursor:not-allowed;box-shadow:none;}

/* R5 — carrousel « Mes pôles » (partagé). Règles rd-est-*/rd-slab re-scopées. */
.ra-scope .rd-est-section { margin-bottom: 0; }
.ra-scope .rd-slab { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.ra-scope .rd-slab-text { font-size: 9px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; color: hsl(41 43% 45%); white-space: nowrap; }
.ra-scope .rd-slab-line { flex: 1; height: 1px; background: rgba(0,0,0,.06); }
.ra-scope .rd-est-scroll { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.ra-scope .rd-est-all { flex: 0 0 auto; width: 88px; height: 130px; border-radius: 11px; border: 1.5px solid rgba(196,165,89,.4); background: #FFFFFF; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 12px 8px; gap: 2px; cursor: pointer; transition: all .2s; }
.ra-scope .rd-est-all:hover { background: #FFFBF0; transform: translateY(-1px); }
.ra-scope .rd-est-all.rd-est-filtered { border-color: #D4A832; background: #FFFBF0; box-shadow: 0 0 0 3px rgba(212,168,50,.1); }
.ra-scope .rd-est-all-label { font-family: inherit; font-size: 11px; font-weight: 700; color: #1a1a1a; }
.ra-scope .rd-est-all-count { font-family: inherit; font-size: 16px; font-weight: 800; color: #0d0d0d; line-height: 1; }
.ra-scope .rd-est-all-sub { font-size: 8px; color: #B8912A; font-weight: 500; }
.ra-scope .rd-est-card { flex: 0 0 auto; width: 115px; height: 130px; border-radius: 10px; background: #FFFFFF; cursor: pointer; overflow: hidden; display: flex; flex-direction: column; border: 1.5px solid transparent; transition: all .2s, border-color .6s ease; }
.ra-scope .rd-est-card:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(0,0,0,.06); border-color: rgba(212,168,50,.35); }
.ra-scope .rd-est-photo { height: 90px; position: relative; background-size: cover; background-position: center; flex-shrink: 0; }
.ra-scope .rd-est-photo--default { background-image: url('https://images.unsplash.com/photo-1414235077428-338989a2e8c0?w=260&h=200&fit=crop&crop=center'); }
.ra-scope .rd-badge-overlay--hotel5 { background: #1C1A17; color: #F5D480; }
.ra-scope .rd-est-badge-overlay { position: absolute; top: 8px; left: 8px; z-index: 2; font-size: 8px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; padding: 4px 9px; border-radius: 999px; }
.ra-scope .rd-est-body { padding: 6px 8px 8px; flex: 1; }
.ra-scope .rd-est-name { font-size: 11px; font-weight: 700; color: #1C1A17; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ra-scope .rd-est-talents { font-size: 8.5px; color: #B8912A; font-weight: 500; margin-top: 1px; }
.ra-scope .rd-est-all { animation: rdFadeUp .3s ease both; }
.ra-scope .rd-est-scroll { gap: 8px; }

/* R6 — aperçu dépliable des candidatures (drawer façon shortlist).
   .ra-card passe en flex-wrap pour que le drawer s'ouvre en pleine largeur. */
.ra-scope .ra-card{flex-wrap:wrap;}
.ra-scope .ra-expand-chevron{width:28px;height:28px;border-radius:50%;border:1px solid rgba(0,0,0,.06);background:#FAFAFA;display:flex;align-items:center;justify-content:center;color:#999;transition:all .25s;cursor:pointer;flex-shrink:0;}
.ra-scope .ra-expand-chevron:hover{border-color:#C9A96E;color:#B8975A;background:#fff;}
.ra-scope .ra-expand-chevron.open{transform:rotate(180deg);background:#fff;border-color:#C9A96E;color:#B8975A;}
.ra-scope .cc-drawer{flex-basis:100%;width:100%;max-height:0;overflow:hidden;transition:max-height .4s cubic-bezier(.4,0,.2,1);}
.ra-scope .cc-drawer.open{max-height:320px;border-top:1px solid rgba(0,0,0,.06);margin-top:12px;}
.ra-scope .stars { color: #DAA520; font-size: 9px; letter-spacing: 1px; }
.ra-scope .drawer-inner { padding: 14px 20px 14px 96px; display: flex; gap: 28px; }
.ra-scope .drawer-section { flex: 1; min-width: 0; }
.ra-scope .drawer-title { font-size: 8px; font-weight: 800; letter-spacing: 1.5px; color: #B8975A; text-transform: uppercase; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.ra-scope .exp-item { display: flex; gap: 8px; margin-bottom: 8px; align-items: flex-start; }
.ra-scope .exp-dot { width: 7px; height: 7px; border-radius: 50%; margin-top: 4px; flex-shrink: 0; border: 1.5px solid #fff; }
.ra-scope .exp-dot.palace { background: #8B7355; box-shadow: 0 0 0 1px rgba(139,115,85,.25); }
.ra-scope .exp-dot.star { background: #C75B12; box-shadow: 0 0 0 1px rgba(199,91,18,.25); }
.ra-scope .exp-dot.yacht { background: #2D6A4F; box-shadow: 0 0 0 1px rgba(45,106,79,.25); }
.ra-scope .exp-dot.maison { background: #6B4C8A; box-shadow: 0 0 0 1px rgba(107,76,138,.25); }
.ra-scope .exp-line { position: relative; }
.ra-scope .exp-role { font-size: 11px; font-weight: 700; color: #1a1a1a; }
.ra-scope .exp-place { font-size: 9px; color: #888; margin-top: 0; }
.ra-scope .exp-dates { font-size: 8px; font-weight: 600; color: #bbb; }
.ra-scope .edu-row { display: flex; gap: 8px; align-items: center; }
.ra-scope .edu-icon { width: 28px; height: 28px; border-radius: 7px; background: linear-gradient(145deg, #f5f5f5, #eee); display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
.ra-scope .edu-school { font-size: 11px; font-weight: 700; color: #1a1a1a; }
.ra-scope .edu-detail { font-size: 9px; color: #888; }
.ra-scope .edu-year { font-size: 8px; font-weight: 700; color: #bbb; margin-top: 1px; }
.ra-scope .mentor-item { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.ra-scope .mentor-av { width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(145deg, #f0f0f0, #e5e5e5); display: flex; align-items: center; justify-content: center; font-size: 10px; flex-shrink: 0; }
.ra-scope .mentor-name { font-size: 11px; font-weight: 700; color: #1a1a1a; }
.ra-scope .mentor-detail { font-size: 8.5px; color: #999; }
.ra-scope .drawer-wide { flex: 1.4; }
.ra-scope .drawer-narrow { flex: 0.8; }
.ra-scope .exp-body { flex: 1; }
.ra-scope .exp-head { display: flex; align-items: center; justify-content: space-between; }
