/* =========================================================================
   EUROP'ALU — RECRUTEMENT
   Identité reprise du book digital Europ'Alu : scène noire, accent
   terracotta, Manrope / Space Mono. Adaptée ici pour la lisibilité des
   offres, formulaires et de l'espace admin.
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@200..800&family=Space+Mono:wght@400;700&display=swap');

:root{
  --stage:      #050505;
  --surface:    #101010;
  --surface-2:  #171717;
  --ink:        #fafafa;
  --muted:      #a7a6a6;
  --muted-2:    #7d7c7c;
  --rule:       rgba(255,255,255,0.12);
  --rule-strong:rgba(255,255,255,0.26);

  --accent:      #B4522C;
  --accent-deep: #E07850;
  --success: #5fa87d;
  --error:   #e06157;

  --font-display: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body:    'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:    'Space Mono', 'SFMono-Regular', Consolas, monospace;

  --container: 1120px;
  --gutter: clamp(20px, 6vw, 80px);
  --radius: 14px;
  --header-h: 59px;  /* hauteur de .site-header (16px + logo 26px + 16px + bordure) */
}

*, *::before, *::after{ box-sizing: border-box; }
html{ background: var(--stage); scroll-behavior: smooth; }
body{
  margin: 0;
  background: var(--stage);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img{ max-width: 100%; height: auto; display: block; }
a{ color: inherit; text-decoration: none; }
h1,h2,h3,h4,p,ul,ol{ margin: 0; }
ul{ padding: 0; list-style: none; }
button{ font-family: inherit; }

.wrap{ max-width: var(--container); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }

.eyebrow{
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-deep);
  display: block;
}

/* --- Boutons --- */
.btn{
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 999px; font-weight: 700; font-size: 15px; white-space: nowrap;
  padding: 13px 26px; border: 1px solid transparent; cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease, transform .15s ease;
}
.btn-primary{ background: var(--accent-deep); color: #14100e; }
.btn-primary:hover{ background: #f0906a; transform: translateY(-1px); }
.btn-ghost{ background: transparent; color: var(--ink); border-color: var(--rule-strong); }
.btn-ghost:hover{ border-color: var(--accent-deep); color: var(--accent-deep); }
.btn-danger{ background: transparent; color: var(--error); border-color: rgba(224,97,87,.45); }
.btn-danger:hover{ background: rgba(224,97,87,.12); }
.btn-sm{ padding: 8px 16px; font-size: 13px; }
.btn[disabled]{ opacity: .5; cursor: not-allowed; }

/* =========================================================================
   HEADER / FOOTER
   ========================================================================= */
.site-header{
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px var(--gutter);
  background: rgba(5,5,5,0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.site-header .brand{ display: flex; align-items: center; gap: 10px; }
.site-header .brand img{ height: 26px; width: auto; filter: brightness(0) invert(1); }
.site-header .nav-links{ display: flex; align-items: center; gap: 28px; font-size: 14.5px; color: var(--muted); font-weight: 500; }
.site-header .nav-links a:hover{ color: var(--ink); }

.site-footer{ background: #000; color: rgba(255,255,255,0.75); padding: 50px 0 26px; border-top: 1px solid var(--rule); margin-top: 60px; }
.footer-top{ display: flex; flex-wrap: wrap; gap: 30px; justify-content: space-between; padding-bottom: 30px; border-bottom: 1px solid rgba(255,255,255,0.12); }
.footer-brand .brand-name{ font-family: var(--font-display); font-size: 22px; font-weight: 800; color: var(--ink); }
.footer-brand p{ margin-top: 10px; font-size: 13.5px; color: rgba(255,255,255,0.55); max-width: 34ch; }
.footer-agencies{ display: flex; flex-wrap: wrap; gap: 18px 26px; max-width: 480px; }
.footer-agencies div{ font-size: 13px; }
.footer-agencies .agency-name{ font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--accent-deep); display: block; margin-bottom: 4px; }
.footer-agencies a:hover{ color: var(--white); }
.footer-bottom{ display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding-top: 22px; font-family: var(--font-mono); font-size: 11px; color: rgba(255,255,255,0.4); }
.footer-bottom a:hover{ color: var(--accent-deep); }

/* =========================================================================
   HERO (accueil)
   ========================================================================= */
.hero{
  position: sticky; top: var(--header-h); z-index: 45; overflow: hidden;
  padding: clamp(14px, 2.2vw, 24px) 0 clamp(12px, 1.8vw, 18px);
  border-bottom: 1px solid var(--rule);
  background:
    radial-gradient(ellipse 900px 500px at 85% -10%, rgba(180,82,44,.18), transparent 60%),
    var(--stage);
}
.hero::after{
  content: ""; position: absolute; z-index: 0; pointer-events: none;
  top: -30%; right: -12%; width: 620px; height: 620px; border-radius: 50%;
  background: conic-gradient(from 210deg, rgba(180,82,44,.28), rgba(224,120,80,.06) 30%, transparent 60%);
  filter: blur(2px);
}
.hero .wrap{ position: relative; z-index: 1; }
.hero h1{
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(24px, 3vw, 36px); line-height: 1.12; max-width: 24ch;
  color: var(--ink); margin-top: 6px;
}
.hero p.lead{ margin-top: 6px; font-size: clamp(14px, 1.3vw, 16px); color: var(--muted); max-width: 44ch; line-height: 1.65; }

/* =========================================================================
   LISTE DES OFFRES
   ========================================================================= */
.offres-section{ padding-top: clamp(18px,2.5vw,28px); padding-bottom: clamp(60px,8vw,100px); }
.offres-head{
  display: flex; justify-content: space-between; align-items: flex-end; gap: 20px;
  margin-bottom: 20px; padding: 0 0 12px; border-bottom: 2px solid var(--ink);
}
.offres-head h2{ font-family: var(--font-display); font-weight: 700; font-size: clamp(20px, 2.4vw, 26px); }
.offres-head .count{ font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); white-space: nowrap; }

.offres-grid{ display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.offre-card{
  display: flex; flex-direction: column; background: var(--surface);
  border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden;
  transition: border-color .2s ease, transform .2s ease;
}
.offre-card:hover{ border-color: var(--rule-strong); transform: translateY(-2px); }
.offre-card .thumb{ position: relative; aspect-ratio: 16/9; background: var(--surface-2); overflow: hidden; }
.offre-card .thumb img{ width: 100%; height: 100%; object-fit: contain; object-position: center; }
.offre-card .thumb.placeholder{ display: flex; align-items: center; justify-content: center; color: var(--muted-2); }
.offre-card .thumb::after{
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(150deg, rgba(180,82,44,.55) 0%, rgba(180,82,44,0) 42%),
    linear-gradient(to top, rgba(5,5,5,.92) 0%, rgba(5,5,5,0) 50%);
}
.offre-card:hover .thumb img{ transform: scale(1.04); }
.offre-card .thumb img{ transition: transform .4s ease; }
.offre-card .thumb-badge{
  position: absolute; top: 14px; left: 14px; z-index: 2;
  background: var(--accent-deep); color: #14100e;
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em; padding: 6px 14px;
  border-radius: 999px; box-shadow: 0 6px 16px rgba(0,0,0,.35);
}
.offre-card .thumb-loc{
  position: absolute; bottom: 12px; left: 14px; z-index: 2;
  color: var(--ink); font-size: 13px; font-weight: 600;
  display: flex; align-items: center; gap: 6px;
  text-shadow: 0 2px 8px rgba(0,0,0,.6);
}
.offre-card .body{ padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.offre-card .tags{ display: flex; gap: 8px; flex-wrap: wrap; }
.tag{
  font-family: var(--font-mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em;
  border: 1px solid var(--rule-strong); border-radius: 999px; padding: 5px 12px; color: var(--muted);
}
.tag.accent{ border-color: rgba(224,120,80,.4); color: var(--accent-deep); }
.offre-card h3{ font-family: var(--font-display); font-weight: 700; font-size: 21px; color: var(--ink); }
.offre-card .excerpt{ font-size: 14.5px; color: var(--muted); line-height: 1.55; flex: 1; }
.offre-card .go{
  margin-top: 6px; display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: 14px; color: var(--accent-deep);
}
.offre-card .go svg{ transition: transform .2s ease; }
.offre-card:hover .go svg{ transform: translateX(4px); }

.empty-state{
  border: 1px dashed var(--rule-strong); border-radius: var(--radius);
  padding: 50px 24px; text-align: center; color: var(--muted);
}
.empty-state strong{ display: block; color: var(--ink); font-size: 18px; margin-bottom: 8px; font-family: var(--font-display); }

/* =========================================================================
   DETAIL OFFRE
   ========================================================================= */
.breadcrumb{
  padding: 20px var(--gutter) 0; max-width: var(--container); margin: 0 auto;
  font-family: var(--font-mono); font-size: 12px; color: var(--muted); display: flex; gap: 8px; align-items: center;
}
.breadcrumb a:hover{ color: var(--accent-deep); }

.offre-hero{ padding-top: 20px; }
.offre-hero .head{ display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 24px; }
.offre-hero h1{ font-family: var(--font-display); font-weight: 800; font-size: clamp(30px, 5vw, 46px); max-width: 22ch; color: var(--ink); }
.offre-hero .meta{ display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }

.offre-figure{ position: relative; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; aspect-ratio: 16/6; }
.offre-figure img{ width: 100%; height: 100%; object-fit: contain; object-position: center; }
.offre-figure::after{
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(135deg, rgba(180,82,44,.5) 0%, rgba(180,82,44,0) 45%),
    linear-gradient(to top, rgba(5,5,5,.85) 0%, rgba(5,5,5,0) 42%);
}
.offre-figure .figure-badge{
  position: absolute; bottom: 18px; left: 22px; z-index: 2;
  display: flex; gap: 10px; flex-wrap: wrap;
}
.offre-figure .figure-badge span{
  font-family: var(--font-mono); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  padding: 7px 16px; border-radius: 999px; box-shadow: 0 6px 16px rgba(0,0,0,.35);
}
.offre-figure .figure-badge .contrat{ background: var(--accent-deep); color: #14100e; }
.offre-figure .figure-badge .lieu{ background: rgba(5,5,5,.55); color: var(--ink); border: 1px solid rgba(255,255,255,.35); backdrop-filter: blur(4px); }

.offre-body{ padding: clamp(30px,5vw,50px) 0; display: grid; grid-template-columns: 7fr 5fr; gap: var(--gutter); align-items: start; }
.offre-desc{ font-size: 16px; color: rgba(250,250,250,0.86); line-height: 1.75; white-space: pre-line; }
.apply-box{ background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 28px; position: sticky; top: 90px; }
.apply-box h3{ font-family: var(--font-display); font-weight: 700; font-size: 19px; margin-bottom: 10px; }
.apply-box p{ font-size: 13.5px; color: var(--muted); margin-bottom: 18px; line-height: 1.6; }
.apply-box .btn{ width: 100%; }

/* =========================================================================
   FORMULAIRES
   ========================================================================= */
.form-section{ padding-top: clamp(30px,5vw,50px); padding-bottom: clamp(60px,8vw,100px); }
.form-card{ max-width: 720px; margin: 0 auto; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: clamp(24px,4vw,44px); }
.form-card h1{ font-family: var(--font-display); font-weight: 800; font-size: clamp(26px, 4vw, 34px); }
.form-card .sub{ margin-top: 10px; color: var(--muted); font-size: 15px; }

.field-row{ display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field{ margin-top: 20px; }
.field label{ display: block; font-size: 13.5px; font-weight: 600; color: var(--ink); margin-bottom: 8px; }
.field .hint{ display: block; font-size: 12px; color: var(--muted-2); margin-top: 6px; }
.field input[type=text],
.field input[type=tel],
.field input[type=number],
.field input[type=password],
.field input[type=email],
.field select,
.field textarea{
  width: 100%; background: var(--surface-2); border: 1px solid var(--rule-strong);
  border-radius: 10px; padding: 12px 14px; color: var(--ink); font-size: 15px; font-family: inherit;
  transition: border-color .15s ease;
}
.field textarea{ resize: vertical; min-height: 110px; }
.field input:focus, .field select:focus, .field textarea:focus{ outline: none; border-color: var(--accent-deep); }
.field input::placeholder, .field textarea::placeholder{ color: var(--muted-2); }

.file-drop{
  border: 1.5px dashed var(--rule-strong); border-radius: 10px; padding: 16px;
  display: flex; align-items: center; gap: 12px; background: var(--surface-2);
  cursor: pointer; transition: border-color .15s ease;
}
.file-drop:hover{ border-color: var(--accent-deep); }
.file-input-hidden{
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.file-drop .icon{ width: 36px; height: 36px; border-radius: 8px; background: rgba(224,120,80,.14); display: flex; align-items: center; justify-content: center; color: var(--accent-deep); flex-shrink: 0; }
.file-drop .txt{ font-size: 13.5px; color: var(--muted); }
.file-drop .txt strong{ color: var(--ink); display: block; font-size: 14px; margin-bottom: 2px; }
.file-drop.has-file{ border-color: var(--success); border-style: solid; }
.file-drop.has-file .icon{ background: rgba(95,168,125,.16); color: var(--success); }

.form-actions{ margin-top: 30px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.form-actions .btn{ flex: 1; min-width: 180px; }

.alert{ border-radius: 10px; padding: 14px 18px; font-size: 14px; margin-bottom: 22px; border: 1px solid; }
.alert-error{ background: rgba(224,97,87,.1); border-color: rgba(224,97,87,.35); color: #ffb3ac; }
.alert-success{ background: rgba(95,168,125,.1); border-color: rgba(95,168,125,.35); color: #a9dcbe; }
.field-error{ color: var(--error); font-size: 12.5px; margin-top: 6px; display: block; }
.field.has-error input, .field.has-error textarea, .field.has-error select{ border-color: var(--error); }

/* =========================================================================
   PAGE MERCI
   ========================================================================= */
.confirm-section{ padding-top: clamp(70px,10vw,120px); padding-bottom: clamp(70px,10vw,120px); text-align: center; }
.confirm-section .check{
  width: 68px; height: 68px; border-radius: 50%; background: rgba(95,168,125,.14);
  color: var(--success); display: flex; align-items: center; justify-content: center;
  margin: 0 auto 24px;
}
.confirm-section h1{ font-family: var(--font-display); font-weight: 800; font-size: clamp(26px,4vw,36px); }
.confirm-section p{ margin-top: 14px; color: var(--muted); max-width: 46ch; margin-left: auto; margin-right: auto; }
.confirm-section .btn{ margin-top: 30px; }

/* =========================================================================
   ADMIN
   ========================================================================= */
.admin-shell{ display: flex; min-height: 100vh; }
.admin-sidebar{
  width: 240px; flex-shrink: 0; background: #000; border-right: 1px solid var(--rule);
  padding: 24px 18px; display: flex; flex-direction: column; gap: 6px;
}
.admin-sidebar .brand{ display: flex; align-items: center; gap: 10px; padding: 0 8px 22px; }
.admin-sidebar .brand img{ height: 22px; filter: brightness(0) invert(1); }
.admin-sidebar a{
  padding: 11px 14px; border-radius: 8px; font-size: 14.5px; color: var(--muted); font-weight: 500;
  display: flex; align-items: center; gap: 10px;
}
.admin-sidebar a:hover{ background: var(--surface); color: var(--ink); }
.admin-sidebar a.active{ background: var(--surface-2); color: var(--accent-deep); }
.admin-sidebar .spacer{ flex: 1; }
.admin-main{ flex: 1; min-width: 0; padding: 34px clamp(20px, 4vw, 56px) 60px; max-width: 1320px; }

.admin-topbar{ display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 28px; flex-wrap: wrap; }
.admin-topbar h1{ font-family: var(--font-display); font-weight: 800; font-size: clamp(24px,3vw,32px); }
.admin-topbar .sub{ color: var(--muted); font-size: 14px; margin-top: 6px; }

/* Ombre orange sur le bord tant qu'il reste du contenu à faire défiler : les
   aplats « local » suivent le contenu et masquent les ombres « scroll » aux extrémités.
   Le tableau reste transparent pour laisser voir ces ombres. */
.table-scroll{
  overflow-x: auto; border: 1px solid var(--rule); border-radius: var(--radius);
  background:
    linear-gradient(to right, var(--surface), var(--surface)) left / 24px 100% no-repeat local,
    linear-gradient(to left, var(--surface), var(--surface)) right / 24px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, rgba(224,120,80,.35), transparent) left / 12px 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, rgba(224,120,80,.35), transparent) right / 12px 100% no-repeat scroll;
  background-color: var(--surface);
}
.admin-table{ width: 100%; min-width: 640px; border-collapse: collapse; }
/* rgba(255,255,255,.028) sur --surface ≈ --surface-2, mais laisse passer l'ombre */
.admin-table th{ text-align: left; font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 14px 12px; border-bottom: 1px solid var(--rule); background: rgba(255,255,255,.028); }
.admin-table td{ padding: 14px 12px; border-bottom: 1px solid var(--rule); font-size: 14.5px; vertical-align: middle; }
.admin-table tr:last-child td{ border-bottom: none; }
.admin-table .row-actions{ display: flex; gap: 8px; justify-content: flex-end; }
.status-pill{ font-family: var(--font-mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; padding: 5px 11px; border-radius: 999px; border: 1px solid; white-space: nowrap; }
.status-pill.on{ color: var(--success); border-color: rgba(95,168,125,.4); background: rgba(95,168,125,.08); }
.status-pill.off{ color: var(--muted); border-color: var(--rule-strong); }
.status-pill.new{ color: var(--accent-deep); border-color: rgba(224,120,80,.4); background: rgba(224,120,80,.08); }

.admin-card{ background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: clamp(20px,3vw,32px); }
.admin-card + .admin-card{ margin-top: 20px; }

.login-shell{ min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-card{ width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 36px; }
.login-card .brand{ display: flex; justify-content: center; margin-bottom: 22px; }
.login-card .brand img{ height: 28px; filter: brightness(0) invert(1); }
.login-card h1{ font-family: var(--font-display); font-weight: 700; font-size: 21px; text-align: center; }
.login-card .sub{ text-align: center; color: var(--muted); font-size: 13.5px; margin-top: 6px; margin-bottom: 20px; }

.candidate-detail dl{ display: grid; grid-template-columns: 140px 1fr; gap: 10px 16px; font-size: 14.5px; }
.candidate-detail dt{ color: var(--muted); font-family: var(--font-mono); font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; }
.candidate-detail dd{ margin: 0; color: var(--ink); }
.candidate-detail .message-box{ margin-top: 18px; background: var(--surface-2); border: 1px solid var(--rule); border-radius: 10px; padding: 16px 18px; font-size: 14.5px; line-height: 1.6; white-space: pre-line; }

/* =========================================================================
   AJOUTS : filtres, suivi des candidatures, statistiques
   ========================================================================= */
.footer-links{ display: flex; gap: 18px; flex-wrap: wrap; }
.muted{ color: var(--muted-2); }

.filters{
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px;
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 16px 18px 18px; margin-bottom: 24px;
}
.filters .field{ margin-top: 0; flex: 1 1 180px; }
.filters .field:first-child{ flex: 2 1 240px; }
.filters .field label{ font-size: 12px; color: var(--muted); }
.filters .field input, .filters .field select{ padding: 10px 12px; font-size: 14px; }
.filters .field-check{ flex: 0 0 auto; padding-bottom: 10px; }
.filters-actions{ display: flex; gap: 8px; }
.result-count{ font-family: var(--font-mono); font-size: 12px; color: var(--muted); margin-bottom: 10px; }

.checkbox{ display: flex !important; align-items: flex-start; gap: 10px; font-weight: 500 !important; cursor: pointer; line-height: 1.5; }
.checkbox input{ width: 17px; height: 17px; margin-top: 2px; accent-color: var(--accent-deep); flex-shrink: 0; }
.checkbox a{ color: var(--accent-deep); text-decoration: underline; }
.field.has-error .checkbox{ color: #ffb3ac; }

/* Champ anti-robot, invisible pour les visiteurs */
.hp-field{ position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.char-counter{ display: block; text-align: right; font-size: 11.5px; color: var(--muted-2); margin-top: 4px; font-family: var(--font-mono); }
.btn.is-loading{ opacity: .7; pointer-events: none; }

.offre-hero .published{ margin-top: 10px; font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.share-btn{ margin-top: 10px; width: 100%; }

.prose h2{ font-family: var(--font-display); font-weight: 700; font-size: 18px; margin-top: 28px; margin-bottom: 8px; }
.prose p{ color: rgba(250,250,250,0.82); font-size: 15px; }
.prose p a{ color: var(--accent-deep); }
.prose h1{ margin-top: 8px; }

/* Admin */
.nav-badge{
  margin-left: auto; background: var(--accent-deep); color: #14100e; font-family: var(--font-mono);
  font-size: 10.5px; font-weight: 700; border-radius: 999px; padding: 2px 8px; min-width: 22px; text-align: center;
}
.sidebar-link{
  width: 100%; text-align: left; background: none; border: none; cursor: pointer;
  padding: 11px 14px; border-radius: 8px; font-size: 14.5px; color: var(--muted); font-weight: 500;
}
.sidebar-link:hover{ background: var(--surface); color: var(--ink); }

.cell-sub{ display: block; font-size: 12.5px; color: var(--muted-2); margin-top: 2px; }
/* Un email long peut passer à la ligne : sinon la colonne Contact élargit le tableau
   au point de cacher le bouton « Voir le dossier » sur un écran de portable. */
.admin-table a[href^="mailto:"]{ overflow-wrap: anywhere; }
.cell-sub a:hover, .admin-table td a:hover{ color: var(--accent-deep); }
.admin-table tr.unread td:first-child{ box-shadow: inset 3px 0 0 var(--accent-deep); }
.unread-dot{ color: var(--accent-deep); }

.statut-tabs{ display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.statut-tabs a{
  font-size: 13px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--rule-strong); color: var(--muted);
}
.statut-tabs a span{ font-family: var(--font-mono); font-size: 11px; margin-left: 4px; opacity: .8; }
.statut-tabs a:hover{ color: var(--ink); border-color: var(--ink); }
.statut-tabs a.active{ background: var(--accent-deep); border-color: var(--accent-deep); color: #14100e; font-weight: 600; }

.status-pill.progress{ color: #7fb2e5; border-color: rgba(127,178,229,.4); background: rgba(127,178,229,.08); }
.status-pill.interview{ color: #d9b45a; border-color: rgba(217,180,90,.45); background: rgba(217,180,90,.08); }
.admin-topbar h1 .status-pill{ vertical-align: middle; margin-left: 8px; font-size: 11px; }

.detail-grid{ display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.detail-grid aside .admin-card + .admin-card{ margin-top: 20px; }
.card-title{ font-family: var(--font-display); font-weight: 700; font-size: 17px; margin-bottom: 14px; }
.stack-actions{ display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.stack-actions .btn{ width: 100%; }
.simple-list li{ padding: 8px 0; border-bottom: 1px solid var(--rule); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 14px; }
.simple-list li:last-child{ border-bottom: none; }
.simple-list a{ color: var(--accent-deep); }

.current-image{ display: flex; gap: 14px; align-items: center; margin-top: 12px; }
.current-image img{ width: 120px; height: 68px; object-fit: cover; border-radius: 8px; border: 1px solid var(--rule); }
.current-image .checkbox{ margin-top: 6px; font-size: 13.5px; }

.login-back{ text-align: center; margin-top: 18px; font-size: 13px; color: var(--muted); }
.login-back a:hover{ color: var(--accent-deep); }

/* =========================================================================
   AJOUTS v3 : utilisateurs, pipeline, entretiens, évaluation, historique
   ========================================================================= */
.sidebar-user{ padding: 12px 14px 6px; border-top: 1px solid var(--rule); margin-top: 6px; display: flex; flex-direction: column; }
.sidebar-user strong{ font-size: 14px; color: var(--ink); }
.sidebar-user span{ font-family: var(--font-mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted-2); }
.ref-search{ margin-top: 10px; }
.ref-search input{
  width: 100%; background: var(--surface); border: 1px solid var(--rule-strong); border-radius: 8px;
  padding: 9px 12px; color: var(--ink); font-size: 13px; font-family: inherit;
}
.ref-search input:focus{ outline: none; border-color: var(--accent-deep); }

.status-pill.hired{ color: #14100e; background: var(--success); border-color: var(--success); }
.card-head{ display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.card-head .card-title{ margin-bottom: 0; }
.date-chip{
  font-family: var(--font-mono); font-size: 11px; padding: 3px 9px; border-radius: 6px;
  background: var(--surface-2); border: 1px solid var(--rule-strong); color: var(--ink); white-space: nowrap;
}
.score{ font-family: var(--font-display); font-weight: 800; font-size: 15px; color: var(--accent-deep); white-space: nowrap; }
.score small{ font-family: var(--font-mono); font-size: 10.5px; font-weight: 400; color: var(--muted); margin-left: 2px; }
.score.big{ font-size: 24px; }

/* Offres : sélecteur d'état */
.inline-select{ display: inline-flex; gap: 6px; align-items: center; }
.etat-select{
  background: var(--surface-2); color: var(--ink); border: 1px solid var(--rule-strong); border-radius: 999px;
  padding: 5px 10px; font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; cursor: pointer;
}
.etat-select.on{ color: var(--success); border-color: rgba(95,168,125,.45); }
.etat-select.progress{ color: #7fb2e5; border-color: rgba(127,178,229,.45); }
.filters .field-date{ flex: 0 1 160px; }
.filters input[type=date]{ color-scheme: dark; }
.field input[type=datetime-local], .field input[type=date]{
  width: 100%; background: var(--surface-2); border: 1px solid var(--rule-strong); border-radius: 10px;
  padding: 12px 14px; color: var(--ink); font-size: 15px; font-family: inherit; color-scheme: dark;
}
.rights-table td:not(:first-child), .rights-table th:not(:first-child){ text-align: center; }

/* Kanban */
.kanban{ display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 12px; align-items: start; }
.kanban-col{ background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); display: flex; flex-direction: column; min-height: 200px; transition: border-color .15s ease, background .15s ease; }
.kanban-col.drag-over{ border-color: var(--accent-deep); background: rgba(224,120,80,.05); }
.kanban-head{ display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--rule); }
.kanban-count{ font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.kanban-cards{ display: flex; flex-direction: column; gap: 8px; padding: 10px; flex: 1; }
.kanban-card{
  background: var(--surface-2); border: 1px solid var(--rule); border-radius: 10px; padding: 11px 12px;
  display: flex; flex-direction: column; gap: 3px; cursor: grab; transition: border-color .15s ease, opacity .15s ease;
}
.kanban-card[draggable=false]{ cursor: default; }
.kanban-card:hover{ border-color: var(--rule-strong); }
.kanban-card.unread{ box-shadow: inset 3px 0 0 var(--accent-deep); }
.kanban-card.dragging{ opacity: .45; }
.kanban-card.saving{ opacity: .6; pointer-events: none; }
.kanban-name{ font-weight: 700; font-size: 14.5px; }
.kanban-name:hover{ color: var(--accent-deep); }
.kanban-meta{ font-size: 12px; color: var(--muted-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kanban-tags{ display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 4px; font-size: 12px; }
.kanban-move{
  margin-top: 8px; width: 100%; background: var(--surface); color: var(--muted); border: 1px solid var(--rule);
  border-radius: 6px; padding: 5px 8px; font-size: 12px; font-family: inherit;
}
.kanban-status{ margin-top: 8px; min-height: 18px; }

/* Fiche candidat */
.pipeline-steps{ display: flex; flex-wrap: wrap; gap: 4px; list-style: none; padding: 0; margin: 0 0 22px; counter-reset: step; }
.pipeline-steps li{
  flex: 1 1 0; min-width: 90px; text-align: center; font-size: 11.5px; padding: 8px 6px; border-radius: 6px;
  background: var(--surface); border: 1px solid var(--rule); color: var(--muted-2); font-family: var(--font-mono);
  text-transform: uppercase; letter-spacing: .03em;
}
.pipeline-steps li.done{ color: var(--success); border-color: rgba(95,168,125,.35); background: rgba(95,168,125,.06); }
.pipeline-steps li.current{ color: #14100e; background: var(--accent-deep); border-color: var(--accent-deep); font-weight: 700; }
.pipeline-steps li.refused{ background: var(--error); border-color: var(--error); }

.inline-form{ margin-top: 16px; border-top: 1px solid var(--rule); padding-top: 14px; }
.inline-form summary{ cursor: pointer; color: var(--accent-deep); font-weight: 600; font-size: 14px; list-style: none; }
.inline-form summary::-webkit-details-marker{ display: none; }
.inline-form[open] summary{ margin-bottom: 4px; }

.entretien-list li.entretien{ padding: 12px 0; border-bottom: 1px solid var(--rule); font-size: 14px; }
.entretien-list li.entretien:last-child{ border-bottom: none; }
.entretien-list li.annule{ opacity: .6; }
.entretien-head{ display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.entretien-list p{ margin-top: 4px; font-size: 13.5px; }
.entretien-comment{ margin-top: 8px; background: var(--surface-2); border: 1px solid var(--rule); border-radius: 8px; padding: 10px 12px; white-space: pre-line; font-size: 13.5px; }

.evaluation-summary{ padding: 12px 0; border-bottom: 1px solid var(--rule); }
.evaluation-head{ display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-size: 14px; }
.criteria-scores{ display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 20px; margin-top: 8px; font-size: 13px; color: var(--muted); }
.criteria-scores li{ display: flex; justify-content: space-between; gap: 10px; }
.dots{ display: inline-flex; gap: 3px; align-items: center; }
.dots i{ width: 9px; height: 9px; border-radius: 50%; background: var(--rule-strong); display: inline-block; }
.dots i.on{ background: var(--accent-deep); }
.rating-grid{ width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 14px; }
.rating-grid th{ font-family: var(--font-mono); font-size: 11px; color: var(--muted); font-weight: 400; padding: 6px; text-align: center; }
.rating-grid th:first-child{ text-align: left; }
.rating-grid td{ padding: 8px 6px; border-top: 1px solid var(--rule); text-align: center; }
.rating-grid td:first-child{ text-align: left; }
.rating-grid input{ width: 18px; height: 18px; accent-color: var(--accent-deep); cursor: pointer; }
.radio-row{ display: flex; flex-wrap: wrap; gap: 18px; }
.radio-row .checkbox{ margin: 0; }

.notes-thread{ margin-top: 14px; }
.notes-thread li{ padding: 10px 0; border-top: 1px solid var(--rule); }
.notes-thread p{ margin-top: 4px; font-size: 13.5px; white-space: pre-line; line-height: 1.55; }
.note-meta{ font-size: 12px; color: var(--muted-2); }
.note-meta strong{ color: var(--ink); }

.timeline{ position: relative; padding-left: 16px; }
.timeline::before{ content: ""; position: absolute; left: 4px; top: 4px; bottom: 4px; width: 1px; background: var(--rule-strong); }
.timeline li{ position: relative; padding: 0 0 14px; display: flex; flex-direction: column; font-size: 13px; }
.timeline li::before{ content: ""; position: absolute; left: -15px; top: 5px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent-deep); }
.timeline li.muted::before{ display: none; }
.timeline-date{ font-family: var(--font-mono); font-size: 10.5px; color: var(--muted-2); }
.timeline-details, .timeline-user{ font-size: 12px; color: var(--muted-2); }
.timeline-user::before{ content: "par "; }

/* =========================================================================
   SITE PUBLIC : textes justifiés
   La césure automatique (lang="fr") évite les grands écarts entre les mots
   que crée la justification sur des lignes courtes.
   ========================================================================= */
.offre-desc,
.offre-card .excerpt,
.apply-box p,
.prose p{
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
  -webkit-hyphens: auto;
  overflow-wrap: break-word;
}

/* =========================================================================
   RESPONSIVE
   ========================================================================= */
/* Fiche candidat : sidebar (240px) + colonne droite (320px) ne laissent plus
   assez de place à la colonne principale sous ~1180px : une seule colonne. */
@media (max-width: 1180px){
  .detail-grid{ grid-template-columns: minmax(0, 1fr); }
}

/* Sur mobile ou en paysage (écran peu haut), le bandeau d'accueil ne reste
   pas collé en haut : il occuperait un tiers à deux tiers de l'écran. */
@media (max-width: 860px), (max-height: 600px){
  .hero{ position: relative; top: auto; }
}

/* Indice de défilement horizontal du Kanban (même principe que .table-scroll) */
.kanban{
  background:
    linear-gradient(to right, var(--stage), var(--stage)) left / 24px 100% no-repeat local,
    linear-gradient(to left, var(--stage), var(--stage)) right / 24px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, rgba(224,120,80,.35), transparent) left / 12px 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, rgba(224,120,80,.35), transparent) right / 12px 100% no-repeat scroll;
}

@media (max-width: 860px){
  .offre-body{ grid-template-columns: 1fr; }
  .apply-box{ position: static; }
  .field-row{ grid-template-columns: 1fr; }
  .admin-shell{ flex-direction: column; }
  .admin-sidebar{
    width: 100%; flex-direction: row; align-items: center; overflow-x: auto; border-right: none;
    border-bottom: 1px solid var(--rule); padding: 14px;
    background:
      linear-gradient(to right, #000, #000) left / 24px 100% no-repeat local,
      linear-gradient(to left, #000, #000) right / 24px 100% no-repeat local,
      radial-gradient(farthest-side at 0 50%, rgba(224,120,80,.35), transparent) left / 12px 100% no-repeat scroll,
      radial-gradient(farthest-side at 100% 50%, rgba(224,120,80,.35), transparent) right / 12px 100% no-repeat scroll;
    background-color: #000;
  }
  .admin-sidebar .brand{ display: none; }
  .admin-sidebar .spacer{ display: none; }
  .site-header{ padding: 14px 20px; }
  :root{ --header-h: 55px; }
  .site-header .nav-links{ gap: 16px; font-size: 13px; }
  .sidebar-user{ display: none; }
  .ref-search{ margin-top: 0; }
  .ref-search input{ width: 150px; }
  .offre-hero .head-cta{ display: none; }
  .admin-sidebar form{ flex-shrink: 0; }
  .sidebar-link, .admin-sidebar a{ white-space: nowrap; }
}

@media (max-width: 560px){
  .offre-desc, .offre-card .excerpt, .apply-box p, .prose p{ text-align: left; }
  .filters{ padding: 14px; }
  .filters .field, .filters .field:first-child{ flex: 1 1 100%; }
  .filters-actions{ width: 100%; }
  .filters-actions .btn{ flex: 1; }
  .candidate-detail dl{ grid-template-columns: 1fr; gap: 2px; }
  .candidate-detail dd{ margin-bottom: 10px; }
  .offre-figure{ aspect-ratio: 16/9; }
  .form-actions{ flex-direction: column; align-items: stretch; }
  .form-actions .btn{ min-width: 0; width: 100%; white-space: normal; text-align: center; }
  .candidate-detail dd{ overflow-wrap: anywhere; }
  .admin-main{ padding: 24px 16px 48px; }
  .admin-card{ padding: 18px 16px; }
  .rating-grid th, .rating-grid td{ padding-left: 3px; padding-right: 3px; }
  .rating-grid td:first-child{ hyphens: auto; -webkit-hyphens: auto; }
  .admin-topbar .row-actions{ flex-wrap: wrap; justify-content: flex-start; }
}

@media (max-width: 640px){
  .offres-grid{ grid-template-columns: 1fr; }
}

.filters-compact{ padding: 12px 18px; }
.filters-compact .field-check{ padding-bottom: 0; }



/* Date limite de candidature sur les cartes d'offres */
.offre-card .deadline, .body .deadline{ margin: 8px 0 0; font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
