/* Polices chargées via <link> dans includes/header.php (plus fiable que @import) */

:root {
  --forest: #103B2B;
  --forest-2: #0A2A1E;
  --lime: #B6FF3D;
  --lime-deep: #8FE01A;
  --lime-soft: #EAFFC8;
  --blue: #2F42D6;
  --cream: #F5F4EE;
  --white: #FFFFFF;
  --text: #122019;
  --muted: #6E7A72;
  --line: #E4E2D8;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--cream);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

h1, h2, h3, .brand-font { font-family: 'Sora', sans-serif; }

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

.container { max-width: 1040px; margin: 0 auto; padding: 0 24px; }

/* --- Navbar --- */
.navbar { background: #fff; border-bottom: 1px solid var(--line); }
.navbar-inner { max-width: 1040px; margin: 0 auto; padding: 12px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.navbar-brand img { height: 34px; width: auto; }
.navlinks { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.navlinks a { font-weight: 600; font-size: 13.5px; color: var(--text); }
.navlinks a:hover { color: var(--forest); }
.navauth { display: flex; align-items: center; gap: 10px; }
.user-pill { display: flex; align-items: center; gap: 8px; background: var(--lime-soft); padding: 5px 14px 5px 5px; border-radius: 999px; font-weight: 700; font-size: 12.5px; color: var(--forest); text-decoration: none; transition: background .15s ease; }
.user-pill:hover { background: var(--lime); }
.avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--forest); color: #fff; display: flex; align-items: center; justify-content: center; font-family: 'Sora', sans-serif; font-weight: 700; font-size: 11px; }

/* --- Hero / header --- */
.hero { background: var(--forest); color: #fff; position: relative; overflow: visible; border-radius: 24px; margin: 28px 0 20px; }
.hero-inner { max-width: 1040px; margin: 0 auto; padding: 38px 24px 44px; position: relative; }
.hero-top { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.hero-line { font-family: 'Sora', sans-serif; font-weight: 700; font-size: clamp(24px, 4vw, 34px); line-height: 1.2; letter-spacing: -0.5px; margin: 0; max-width: 480px; }
.hero-line span { color: var(--lime); }
.hero-switch { display: flex; background: rgba(255,255,255,0.10); border: 1px solid rgba(255,255,255,0.16); border-radius: 999px; padding: 4px; gap: 2px; flex-shrink: 0; }
.hero-switch-btn { padding: 10px 18px; border-radius: 999px; font-weight: 600; font-size: 13.5px; color: #D7ECDF; display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.hero-switch-btn.active { background: var(--lime); color: var(--forest); }
.hero-switch-btn:not(.active):hover { color: #fff; }
.chip-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.chip { font-size: 11.5px; font-weight: 600; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.18); color: #EAF6EE; padding: 6px 12px; border-radius: 999px; }
.float-tag { position: absolute; background: #fff; color: var(--forest); font-size: 11px; font-weight: 700; padding: 7px 12px; border-radius: 999px; box-shadow: 0 8px 18px rgba(0,0,0,0.18); display: none; }
@media (min-width: 860px) {
  .float-tag { display: block; }
  .float-tag.t1 { top: -6px; right: 250px; transform: rotate(-6deg); }
  .float-tag.t2 { bottom: -8px; right: 20px; transform: rotate(4deg); background: var(--lime); }
}
@media (max-width: 700px) {
  .hero-top { flex-direction: column; align-items: flex-start; }
  .hero-switch { width: 100%; }
  .hero-switch-btn { flex: 1; justify-content: center; }
}

/* --- Pagination --- */
.pagination { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 10px 0 40px; }
.page-link { border: 1.5px solid var(--line); background: #fff; padding: 8px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--text); }
.page-link.active { background: var(--forest); border-color: var(--forest); color: #fff; }
.page-link.disabled { opacity: .4; pointer-events: none; }

/* --- Buttons --- */
.btn { border: none; border-radius: 999px; padding: 11px 20px; font-weight: 700; font-size: 13.5px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; font-family: 'Inter', sans-serif; }
.btn-primary { background: var(--forest); color: #fff; }
.btn-primary:hover { filter: brightness(1.15); }
.btn-ghost { background: #fff; color: var(--forest); border: 1.5px solid var(--line); }
.btn-lime { background: var(--lime); color: var(--forest); }
.btn-sm { padding: 8px 14px; font-size: 12px; }
.btn-full { width: 100%; justify-content: center; }
.btn:disabled { opacity: .5; cursor: default; }

/* --- Filters --- */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 26px 0 20px; }
.filter { border: 1.5px solid var(--line); background: #fff; padding: 7px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--text); }
.filter.active { border-color: var(--forest); background: var(--lime-soft); color: var(--forest); }

/* --- Offer cards --- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px,1fr)); gap: 18px; margin-bottom: 40px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 18px; box-shadow: 0 4px 18px rgba(16,59,43,0.06); position: relative; transition: box-shadow .15s ease, transform .15s ease; }
.card:hover { box-shadow: 0 10px 28px rgba(16,59,43,0.12); transform: translateY(-2px); }
.card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.badge { font-size: 10.5px; font-weight: 700; padding: 5px 12px; border-radius: 999px; color: #fff; display: inline-block; }
.count-pill { font-size: 10.5px; font-weight: 700; background: var(--lime-soft); color: var(--forest); padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.card-title { font-family: 'Sora', sans-serif; font-weight: 700; font-size: 16px; line-height: 1.3; margin: 12px 0 8px; }
.card-row { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); margin-bottom: 5px; }
.card-desc { font-size: 12.5px; color: #4b544d; margin: 10px 0 14px; line-height: 1.5; }
.salary { font-family: 'Sora', sans-serif; font-weight: 700; font-size: 14px; color: var(--forest); margin: 6px 0 10px; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.org-mini { display: flex; align-items: center; gap: 8px; }
.org-sq { width: 26px; height: 26px; border-radius: 8px; background: var(--forest); color: #fff; font-family: 'Sora', sans-serif; font-weight: 700; font-size: 11px; display: flex; align-items: center; justify-content: center; }
.org-name { font-size: 11.5px; font-weight: 600; }
.closed-tag { position: absolute; top: -10px; right: 14px; background: var(--forest); color: #fff; font-size: 10.5px; font-weight: 700; padding: 4px 11px; border-radius: 999px; }

/* --- Dashboard layout (sidebar) --- */
.dash-layout { display: flex; min-height: 100vh; background: var(--cream); align-items: stretch; }
.sidebar { width: 232px; flex-shrink: 0; background: var(--forest-2); color: #CFE3D6; display: flex; flex-direction: column; padding: 22px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 26px; }
.sidebar-logo-mark { width: 30px; height: 30px; border-radius: 9px; background: var(--lime); display: flex; align-items: center; justify-content: center; font-family: 'Sora', sans-serif; font-weight: 800; color: var(--forest); font-size: 13px; }
.sidebar-logo-text { font-family: 'Sora', sans-serif; font-weight: 800; font-size: 16px; color: #fff; }
.sidebar-nav { display: flex; flex-direction: column; gap: 3px; }
.sidebar-link { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; color: #CFE3D6; font-size: 13px; font-weight: 600; }
.sidebar-link:hover { background: rgba(255,255,255,0.07); color: #fff; }
.sidebar-link.active { background: var(--lime); color: var(--forest); }
.sidebar-sep { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.5px; color: #6E9982; margin: 18px 12px 8px; }
.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 3px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,0.1); }

.dash-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 20px 30px; background: #fff; border-bottom: 1px solid var(--line); }
.topbar-greeting { font-family: 'Sora', sans-serif; font-weight: 700; font-size: 18px; color: var(--text); }
.dash-content { padding: 26px 30px 60px; }

@media (max-width: 860px) {
  .dash-layout { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; flex-direction: row; align-items: center; padding: 12px 14px; overflow-x: auto; }
  .sidebar-brand { padding: 0 14px 0 0; }
  .sidebar-nav { flex-direction: row; }
  .sidebar-link span { display: none; }
  .sidebar-sep { display: none; }
  .sidebar-foot { margin-top: 0; margin-left: auto; flex-direction: row; border-top: none; padding-top: 0; }
  .topbar { padding: 16px 20px; }
  .dash-content { padding: 20px; }
}

/* --- Dashboard stat cards --- */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 26px; }
.stat-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 18px; display: flex; align-items: center; gap: 12px; }
.stat-icon { width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.stat-value { font-family: 'Sora', sans-serif; font-weight: 800; font-size: 21px; color: var(--text); line-height: 1.1; }
.stat-label { font-size: 11px; color: var(--muted); font-weight: 600; margin-top: 2px; }

.dash-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 22px; align-items: start; }
@media (max-width: 980px) { .dash-grid { grid-template-columns: 1fr; } }

.panel { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 22px; margin-bottom: 20px; }
.panel-title { font-family: 'Sora', sans-serif; font-weight: 700; font-size: 15px; color: var(--text); margin: 0 0 16px; display: flex; align-items: center; justify-content: space-between; }

.offer-progress-row { padding: 14px 0; border-bottom: 1px solid var(--line); }
.offer-progress-row:last-child { border-bottom: none; }
.offer-progress-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.offer-progress-info { display: flex; align-items: center; gap: 10px; min-width: 0; }
.offer-progress-title { font-weight: 700; font-size: 13px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.offer-progress-sub { font-size: 11px; color: var(--muted); }
.offer-progress-pct { font-family: 'Sora', sans-serif; font-weight: 700; font-size: 12.5px; color: var(--forest); flex-shrink: 0; }

.activity-row { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.activity-row:last-child { border-bottom: none; }
.activity-name { font-weight: 700; font-size: 12.5px; color: var(--text); }
.activity-sub { font-size: 11px; color: var(--muted); }
.status-pill { font-size: 10px; font-weight: 700; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.status-recue { background: #EAF0FE; color: var(--blue); }
.status-cloture { background: var(--lime-soft); color: var(--forest); }
.status-attente { background: #FDEAEA; color: #B23A3A; }
.banner-ad {
  display: flex; align-items: stretch; max-width: 992px; margin: 26px auto 0;
  border: 1.5px dashed var(--lime-deep); background: var(--lime-soft); border-radius: 18px;
  overflow: hidden; height: 96px; text-decoration: none; color: var(--text);
}
.banner-ad img { width: 180px; height: 100%; object-fit: cover; flex-shrink: 0; }
.banner-ad-text { display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 12px 20px; overflow: hidden; }
.banner-ad-text strong { font-family: 'Sora', sans-serif; font-size: 14px; color: var(--forest); }
.banner-ad-text span:not(.badge) { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.banner-ad .ad-badge { align-self: flex-start; }
@media (max-width: 700px) {
  .banner-ad { height: auto; }
  .banner-ad img { width: 90px; }
}
.ad-card { border: 1.5px dashed var(--lime-deep); background: var(--lime-soft); display: flex; flex-direction: column; }
.ad-badge { background: var(--forest); }
.ad-image { width: 100%; height: 120px; object-fit: cover; border-radius: 12px; margin: 12px 0 10px; }
.ad-card .card-title { margin-top: 12px; }
.ad-card .card-desc { flex: 1; }

/* --- Forms --- */
.form-card { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 28px; box-shadow: 0 6px 24px rgba(16,59,43,0.07); max-width: 560px; margin: 30px auto; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12.5px; font-weight: 700; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; border: 1.5px solid var(--line); border-radius: 12px; padding: 11px 13px; font-size: 13.5px;
  font-family: 'Inter', sans-serif; color: var(--text); background: #FBFBF8;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--lime-deep); outline-offset: 1px; border-color: var(--lime-deep); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.section-title { font-family: 'Sora', sans-serif; font-weight: 700; font-size: 20px; margin: 30px 0 16px; }
.provider-row { display: flex; gap: 10px; margin: 6px 0 16px; }
.provider { flex: 1; border: 1.5px solid var(--line); border-radius: 14px; padding: 13px; text-align: center; cursor: pointer; font-weight: 700; font-size: 12.5px; }

/* --- Dashboard --- */
.dash-item { background: #fff; border: 1px solid var(--line); border-radius: 18px; margin-bottom: 14px; padding: 18px; }
.dash-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.dash-title { font-family: 'Sora', sans-serif; font-weight: 700; font-size: 15px; }
.dash-meta { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.dash-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0; }
.cand-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.cand-name { font-weight: 700; font-size: 13.5px; }
.cand-meta { font-size: 11.5px; color: var(--muted); }

/* --- Dashboard KPI --- */
.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin: 20px 0 28px; }
.kpi-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; }
.kpi-value { font-family: 'Sora', sans-serif; font-weight: 800; font-size: 26px; color: var(--forest); }
.kpi-label { font-size: 11.5px; color: var(--muted); font-weight: 600; margin-top: 2px; }

/* --- Candidate cards --- */
.cand-list { display: flex; flex-direction: column; gap: 10px; }
.cand-card { display: flex; align-items: flex-start; gap: 12px; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: #fff; }
.cand-photo { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.cand-body { flex: 1; min-width: 0; }

/* --- Alerts / flash --- */
.flash { padding: 12px 18px; border-radius: 12px; font-size: 13px; font-weight: 600; margin: 20px 0; }
.flash-error { background: #FDEAEA; color: #B23A3A; }
.flash-success { background: var(--lime-soft); color: var(--forest); }
.flash-info { background: #EAF0FE; color: var(--blue); }

.empty { text-align: center; padding: 60px 20px; color: var(--muted); font-size: 13.5px; }
.report-link { font-size: 11.5px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.report-link:hover { color: #B23A3A; }

/* --- Profile page --- */
.profile-section { border-top: 1px solid var(--line); margin-top: 22px; padding-top: 20px; }
.profile-section:first-of-type { border-top: none; margin-top: 6px; padding-top: 0; }
.profile-section-title { font-family: 'Sora', sans-serif; font-weight: 700; font-size: 13.5px; color: var(--forest); margin-bottom: 14px; }
.field-hint { font-size: 11px; color: var(--muted); margin-top: 5px; }
.progress-track { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--lime-deep), var(--lime)); border-radius: 999px; transition: width .25s ease; }
.skill-suggestions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.skill-chip { border: 1.5px dashed var(--line); background: #fff; color: var(--text); font-size: 11.5px; font-weight: 600; padding: 5px 11px; border-radius: 999px; cursor: pointer; }
.skill-chip:hover { border-color: var(--forest); color: var(--forest); background: var(--lime-soft); }

/* --- Footer --- */
.footer { background: var(--forest-2); color: #CFE3D6; margin-top: 60px; }
.footer-inner { max-width: 1040px; margin: 0 auto; padding: 40px 24px 24px; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 30px; }
.footer-desc { font-size: 12px; color: #9FBFAC; line-height: 1.6; max-width: 280px; }
.footer-title { font-family: 'Sora', sans-serif; font-weight: 700; font-size: 12.5px; color: #fff; margin-bottom: 12px; }
.footer-links { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 9px; }
.footer-links a { color: #B9D4C4; font-size: 12.5px; }
.footer-links a:hover { color: var(--lime); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); margin-top: 30px; padding-top: 18px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 11.5px; color: #87A996; }
.footer-brand img { height: 26px; margin-bottom: 10px; filter: brightness(0) invert(1); }

@media (max-width: 700px) {
  .row2 { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
}
