/* ================================================================
   INPTIC Concours — app.css
   Police : Arial/Helvetica uniquement (aucune dépendance externe)
   ================================================================ */

/* ── RESET & BASE ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue:      #003087;
  --blue-dk:   #001B5E;
  --blue-lt:   #E8EFFF;
  --yellow:    #FFD700;
  --green:     #009A44;
  --green-dk:  #007A35;
  --green-lt:  #E6F7ED;
  --red:       #DC2626;
  --red-lt:    #FEE2E2;
  --orange:    #F59E0B;
  --gray-50:   #F4F6F9;
  --gray-100:  #E8EFFF;
  --gray-200:  #D8E3F5;
  --gray-400:  #7B91B8;
  --gray-600:  #4B5563;
  --gray-800:  #1A2B45;
  --white:     #FFFFFF;
  --radius:    8px;
  --shadow:    0 2px 12px rgba(0,48,135,.06);
  --shadow-lg: 0 8px 32px rgba(0,48,135,.14);
}

body {
  font-family: Arial, Helvetica, sans-serif;
  background: #F4F6F9;
  color: #1A2B45;
  font-size: 14px;
  line-height: 1.6;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── LAYOUT PRINCIPAL ─────────────────────────────────────────── */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ── SIDEBAR ──────────────────────────────────────────────────── */
.inptic-sidebar {
  width: 250px;
  background: #001B5E;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; bottom: 0; left: 0;
  overflow-y: auto;
  z-index: 300;
  box-shadow: 4px 0 20px rgba(0,0,0,.2);
  transition: transform .25s;
}
.inptic-sidebar-brand {
  padding: 18px 16px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.inptic-sidebar-nav { flex: 1; padding: 10px 0; }

.inptic-nav-section {
  padding: 14px 16px 5px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: rgba(255,215,0,.6);
}
.inptic-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  color: rgba(255,255,255,.7);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  border-left: 3px solid transparent;
  transition: all .15s;
}
.inptic-nav-link:hover,
.inptic-nav-link.active {
  background: rgba(255,215,0,.1);
  color: #FFD700;
  border-left-color: #FFD700;
  text-decoration: none;
}
.inptic-nav-link svg { width: 16px; height: 16px; flex-shrink: 0; }

.inptic-sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid rgba(255,255,255,.1);
}
.inptic-sidebar-user { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.inptic-sidebar-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: #FFD700; color: #003087;
  font-size: 14px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.inptic-logout-btn {
  display: flex; align-items: center; gap: 8px;
  color: rgba(255,100,100,.8); font-size: 12px;
  font-weight: 600; text-decoration: none;
}
.inptic-logout-btn:hover { color: #FF6B6B; text-decoration: none; }

/* ── MAIN ─────────────────────────────────────────────────────── */
.inptic-main { margin-left: 250px; flex: 1; display: flex; flex-direction: column; }

/* ── TOPBAR ───────────────────────────────────────────────────── */
.inptic-topbar {
  background: #fff;
  border-bottom: 2px solid #E8EFFF;
  padding: 0 24px; height: 58px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 8px rgba(0,48,135,.06);
}
.inptic-topbar-left { display: flex; align-items: center; gap: 12px; }
.inptic-topbar-title { font-size: 16px; font-weight: 700; color: #001B5E; }
.inptic-menu-btn { display: none; background: none; border: none; cursor: pointer; padding: 4px; color: #003087; }
.inptic-topbar-right { display: flex; align-items: center; gap: 12px; }
.inptic-topbar-home {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; color: #003087;
  text-decoration: none; padding: 5px 12px;
  border: 1.5px solid #003087; border-radius: 6px; transition: all .15s;
}
.inptic-topbar-home:hover { background: #003087; color: #FFD700; text-decoration: none; }

/* ── CONTENT WRAP ─────────────────────────────────────────────── */
.inptic-content-wrap { padding: 24px; flex: 1; }

/* ── ALERTS ───────────────────────────────────────────────────── */
.inptic-alert, .alert {
  padding: 12px 16px; border-radius: 8px;
  margin-bottom: 18px; font-size: 13px;
  font-weight: 600; border-left: 4px solid;
}
.inptic-alert-success, .alert-success { background: #E6F7ED; border-color: #009A44; color: #005A28; }
.inptic-alert-danger,  .alert-danger  { background: #FEE2E2; border-color: #DC2626; color: #991B1B; }
.inptic-alert-warning, .alert-warning { background: #FFFBEB; border-color: #F59E0B; color: #92400E; }
.inptic-alert-info,    .alert-info    { background: #E8EFFF; border-color: #003087; color: #001B5E; }

/* ── KPI GRID ─────────────────────────────────────────────────── */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(170px,1fr)); gap: 16px; margin-bottom: 24px; }
.kpi {
  background: #fff; border: 1px solid #E8EFFF; border-radius: 12px;
  padding: 20px; display: flex; align-items: center; gap: 14px;
  box-shadow: var(--shadow);
}
.kpi-icon { width: 46px; height: 46px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.kpi-icon svg { width: 22px; height: 22px; color: #fff; }
.kpi-val { font-size: 26px; font-weight: 700; line-height: 1; color: #001B5E; }
.kpi-lbl { font-size: 12px; color: var(--gray-400); margin-top: 3px; }
.bg-green  { background: #009A44; }
.bg-blue   { background: #003087; }
.bg-orange { background: #F59E0B; }
.bg-red    { background: #DC2626; }
.bg-gray   { background: #64748B; }

/* ── CARDS ────────────────────────────────────────────────────── */
.card { background: #fff; border: 1px solid #E8EFFF; border-radius: 12px; box-shadow: var(--shadow); margin-bottom: 20px; }
.card-header { padding: 16px 20px; border-bottom: 1px solid #E8EFFF; display: flex; align-items: center; justify-content: space-between; }
.card-title { font-weight: 700; font-size: 15px; color: #001B5E; }
.card-body { padding: 20px; }

/* ── TABLE ────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { background: #F4F7FF; text-align: left; padding: 10px 14px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #6880AC; border-bottom: 1px solid #E8EFFF; }
td { padding: 12px 14px; border-bottom: 1px solid #F0F4FA; vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #F8FAFF; }

/* ── BADGES ───────────────────────────────────────────────────── */
.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.badge-brouillon { background: #F1F5F9; color: #64748B; }
.badge-soumis    { background: #E8EFFF; color: #003087; }
.badge-en_cours  { background: #FFFBEB; color: #92400E; }
.badge-valide    { background: #E6F7ED; color: #005A28; }
.badge-rejete    { background: #FEE2E2; color: #991B1B; }
.badge-ouvert    { background: #E6F7ED; color: #005A28; }
.badge-ferme     { background: #F1F5F9; color: #64748B; }
.badge-archive   { background: #F1F5F9; color: #94A3B8; }
.badge-admin     { background: #EDE9FE; color: #5B21B6; }
.badge-jury      { background: #FFFBEB; color: #92400E; }
.badge-candidat  { background: #E8EFFF; color: #003087; }

/* ── BUTTONS ──────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 18px; border: none; border-radius: 8px; font-size: 13px; font-weight: 700; cursor: pointer; text-decoration: none; transition: all .15s; white-space: nowrap; font-family: Arial, Helvetica, sans-serif; }
.btn-primary  { background: #003087; color: #FFD700; }
.btn-primary:hover { background: #001B5E; color: #FFD700; text-decoration: none; }
.btn-blue     { background: #003087; color: #fff; }
.btn-blue:hover { background: #001B5E; text-decoration: none; color: #fff; }
.btn-danger   { background: #DC2626; color: #fff; }
.btn-danger:hover { background: #B91C1C; text-decoration: none; color: #fff; }
.btn-orange   { background: #F59E0B; color: #fff; }
.btn-orange:hover { background: #D97706; text-decoration: none; color: #fff; }
.btn-ghost    { background: transparent; color: #003087; border: 1.5px solid #D8E3F5; }
.btn-ghost:hover { background: #E8EFFF; text-decoration: none; color: #003087; }
.btn-sm       { padding: 5px 12px; font-size: 12px; }
.btn svg      { width: 15px; height: 15px; }
.btn-disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }

/* ── FORMS ────────────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; color: #001B5E; }
label .req { color: #DC2626; margin-left: 2px; }
input, select, textarea {
  width: 100%; padding: 9px 12px;
  border: 1.5px solid #D8E3F5; border-radius: 8px;
  font-size: 14px; font-family: Arial, Helvetica, sans-serif;
  background: #fff; color: #1A2B45; transition: border-color .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: #003087; box-shadow: 0 0 0 3px rgba(0,48,135,.1); }
.form-row   { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.hint { font-size: 12px; color: var(--gray-400); margin-top: 4px; }

/* ── PROGRESS ─────────────────────────────────────────────────── */
.progress { background: #E8EFFF; border-radius: 20px; overflow: hidden; }
.progress-bar { height: 100%; background: #003087; border-radius: 20px; transition: width .4s; }
.progress-bar.green  { background: #009A44; }
.progress-bar.orange { background: #F59E0B; }

/* ── TIMELINE ─────────────────────────────────────────────────── */
.timeline { list-style: none; padding: 0; }
.timeline li { display: flex; gap: 12px; padding-bottom: 18px; position: relative; }
.timeline li:not(:last-child)::before { content: ''; position: absolute; left: 10px; top: 22px; bottom: 0; width: 2px; background: #E8EFFF; }
.tl-dot { width: 22px; height: 22px; border-radius: 50%; background: #E8EFFF; flex-shrink: 0; margin-top: 2px; }
.tl-dot.green  { background: #009A44; }
.tl-dot.blue   { background: #003087; }
.tl-dot.orange { background: #F59E0B; }
.tl-dot.red    { background: #DC2626; }
.tl-content strong { display: block; font-size: 13px; color: #001B5E; }
.tl-content small  { color: var(--gray-400); font-size: 11px; }

/* ── DOC ITEMS ────────────────────────────────────────────────── */
.doc-item { display: flex; align-items: center; justify-content: space-between; padding: 12px; border: 1.5px solid #E8EFFF; border-radius: 10px; margin-bottom: 8px; background: #fff; }
.doc-item.uploaded { border-color: #009A44; background: #E6F7ED; }
.doc-item.missing  { border-color: #DC2626; background: #FEE2E2; }
.doc-meta { font-size: 12px; color: var(--gray-400); margin-top: 2px; }

/* ── STEPPER ──────────────────────────────────────────────────── */
.stepper { display: flex; align-items: center; margin-bottom: 24px; }
.step { flex: 1; display: flex; flex-direction: column; align-items: center; position: relative; }
.step:not(:last-child)::after { content: ''; position: absolute; top: 18px; left: 50%; width: 100%; height: 2px; background: #E8EFFF; }
.step.done::after { background: #009A44; }
.step-circle { width: 36px; height: 36px; border-radius: 50%; background: #E8EFFF; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; z-index: 1; color: #64748B; }
.step.active .step-circle { background: #003087; color: #FFD700; }
.step.done   .step-circle { background: #009A44; color: #fff; }
.step-label { font-size: 11px; color: var(--gray-400); margin-top: 4px; text-align: center; }
.step.active .step-label { color: #003087; font-weight: 700; }

/* ── AUTH ─────────────────────────────────────────────────────── */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 60px 16px; }
.auth-card { background: #fff; border-radius: 16px; padding: 40px; width: 100%; max-width: 440px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.auth-logo { text-align: center; margin-bottom: 28px; }
.auth-logo h1 { font-size: 20px; font-weight: 700; color: #003087; }
.auth-logo p  { color: var(--gray-400); font-size: 13px; margin-top: 4px; }
.auth-back-btn {
  position: fixed; top: 16px; left: 16px; z-index: 100;
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.95); color: #003087;
  padding: 8px 14px; border-radius: 20px; font-size: 13px; font-weight: 700;
  text-decoration: none; box-shadow: 0 2px 12px rgba(0,0,0,.15); transition: all .18s;
}
.auth-back-btn:hover { background: #003087; color: #FFD700; text-decoration: none; }

/* ── NAVBAR PUBLIQUE ──────────────────────────────────────────── */
.navbar { background: #fff; border-bottom: 1px solid #E8EFFF; padding: 0 24px; height: 60px; display: flex; align-items: center; justify-content: space-between; box-shadow: var(--shadow); }
.navbar-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; color: #1A2B45; }
.navbar-brand img { height: 36px; }
.navbar-brand .badge-inptic { background: #003087; color: #FFD700; font-size: 11px; padding: 2px 8px; border-radius: 20px; font-weight: 700; }
.navbar-links { display: flex; align-items: center; gap: 20px; font-size: 13px; }
.navbar-links a { color: var(--gray-600); font-weight: 500; }
.navbar-links a:hover { color: #003087; text-decoration: none; }

/* ── RESPONSIVE ───────────────────────────────────────────────── */
@media (max-width: 900px) {
  .inptic-sidebar { transform: translateX(-100%); }
  .inptic-sidebar.open { transform: translateX(0); }
  .inptic-main { margin-left: 0; }
  .inptic-menu-btn { display: block; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .inptic-content-wrap { padding: 14px; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
}
