/**
 * ESCEP-Niger - Stylesheets officiels pour le portail du concours 2026-2027
 * Charte graphique : Bleu ESCEP (#1665D8), Rouge Niger (#E01A22), Vert Émeraude (#059669)
 */

.escep-app-wrap {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #0f172a;
  line-height: 1.5;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  box-sizing: border-box;
}

.escep-app-wrap *, .escep-app-wrap *:before, .escep-app-wrap *:after {
  box-sizing: border-box;
}

.escep-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  padding: 24px;
  margin-bottom: 24px;
}

.escep-card-header {
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 16px;
  margin-bottom: 20px;
}

.escep-brand-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.escep-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.escep-badge-year {
  background: #fef3c7;
  color: #b45309;
  border-color: #fde68a;
}

.escep-title {
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 4px 0;
}

.escep-subtitle {
  font-size: 13px;
  color: #64748b;
  margin: 0;
}

.escep-step-nav {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.escep-step {
  flex: 1;
  min-width: 120px;
  padding: 10px;
  font-size: 12px;
  font-weight: 700;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  text-align: center;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s;
}

.escep-step.active {
  background: #1d4ed8;
  color: #ffffff;
  border-color: #1d4ed8;
}

.escep-step-content {
  display: none;
}

.escep-step-content.active {
  display: block;
}

.escep-section-title {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 16px;
  padding-left: 8px;
  border-left: 3px solid #1d4ed8;
}

.escep-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.escep-grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.escep-field {
  margin-bottom: 16px;
}

.escep-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 6px;
}

.escep-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 13px;
  color: #0f172a;
  background: #ffffff;
}

.escep-input:focus {
  outline: none;
  border-color: #1d4ed8;
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.15);
}

.escep-radio-card {
  display: block;
  padding: 14px;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  background: #f8fafc;
  transition: all 0.15s;
}

.escep-radio-card.selected, .escep-radio-card:hover {
  border-color: #1d4ed8;
  background: #eff6ff;
}

.escep-radio-title {
  font-weight: 700;
  font-size: 13px;
  color: #0f172a;
  margin-bottom: 4px;
}

.escep-radio-desc {
  font-size: 11px;
  color: #64748b;
}

.escep-docs-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.escep-doc-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.escep-doc-info {
  flex: 1;
  min-width: 240px;
}

.escep-doc-info strong {
  display: block;
  font-size: 12px;
  color: #0f172a;
}

.escep-doc-info span {
  font-size: 11px;
  color: #64748b;
}

.escep-file-input {
  font-size: 11px;
  color: #334155;
}

.escep-payment-official-box {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
}

.escep-payment-badge {
  font-size: 11px;
  font-weight: 700;
  color: #15803d;
  margin-bottom: 4px;
}

.escep-payment-benef {
  font-size: 16px;
  font-weight: 800;
  color: #14532d;
}

.escep-payment-phone, .escep-payment-amount {
  font-size: 13px;
  color: #166534;
  margin-top: 4px;
}

.escep-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
}

.escep-actions.right {
  justify-content: flex-end;
}

.escep-actions.between {
  justify-content: space-between;
}

.escep-btn {
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: background 0.15s;
}

.escep-btn.primary {
  background: #1d4ed8;
  color: #ffffff;
}

.escep-btn.primary:hover {
  background: #1e40af;
}

.escep-btn.secondary {
  background: #e2e8f0;
  color: #334155;
}

.escep-btn.secondary:hover {
  background: #cbd5e1;
}

.escep-btn.success {
  background: #059669;
  color: #ffffff;
}

.escep-btn.success:hover {
  background: #047857;
}

.escep-success-box {
  background: #f0fdf4;
  border: 2px solid #86efac;
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  margin-top: 20px;
}

.escep-success-icon {
  font-size: 36px;
  color: #16a34a;
  margin-bottom: 12px;
}

.escep-code-box {
  background: #ffffff;
  border: 1px dashed #86efac;
  padding: 16px;
  border-radius: 8px;
  margin: 16px 0;
  font-size: 14px;
}

.escep-help {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 16px;
}

/* Communiqué institutionnel */
.escep-communique-card {
  background: #ffffff;
  border: 2px solid #cbd5e1;
  border-radius: 12px;
  padding: 32px;
  margin: 20px auto;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}

.escep-communique-header {
  text-align: center;
  border-bottom: 2px double #cbd5e1;
  padding-bottom: 16px;
  margin-bottom: 24px;
  font-size: 12px;
  color: #475569;
}

.escep-communique-header .bold {
  font-weight: 800;
  font-size: 15px;
  color: #0f172a;
}

.escep-communique-title {
  text-align: center;
  font-size: 18px;
  font-weight: 800;
  color: #1e3a8a;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.escep-official-callout {
  background: #eff6ff;
  border-left: 4px solid #1d4ed8;
  padding: 14px 18px;
  margin: 16px 0;
  font-size: 14px;
  color: #1e3a8a;
}

/* Admin Table */
.escep-admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  font-size: 12px;
}

.escep-admin-table th {
  background: #f1f5f9;
  padding: 10px;
  text-align: left;
  border: 1px solid #cbd5e1;
  font-weight: 700;
}

.escep-admin-table td {
  padding: 10px;
  border: 1px solid #e2e8f0;
}

/* ============================================================
   Groupe de recherche du suivi — bouton décalé sous le champ
   ============================================================ */
.escep-suivi-search .escep-search-input-group {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  margin-top: 10px;
}
.escep-suivi-search .escep-search-input-group .escep-input {
  width: 100%;
}
.escep-suivi-search .escep-search-input-group .escep-btn {
  align-self: flex-start;
  margin-top: 4px;
  min-width: 180px;
}
@media (min-width: 640px) {
  .escep-suivi-search .escep-search-input-group {
    flex-direction: row;
    align-items: flex-end;
  }
  .escep-suivi-search .escep-search-input-group .escep-input {
    flex: 1 1 auto;
  }
  .escep-suivi-search .escep-search-input-group .escep-btn {
    margin-top: 0;
    margin-bottom: 2px;
  }
}

/* ============================================================
   Portail unique (communiqué + espace candidat)
   ============================================================ */
.escep-portail-header {
  display: flex;
  align-items: center;
  gap: 20px;
  background: linear-gradient(90deg, #1e3a8a, #2563eb);
  color: #fff;
  border-radius: 14px;
  padding: 20px 24px;
  margin-bottom: 22px;
  box-shadow: 0 8px 24px rgba(30, 58, 138, .25);
}
.escep-portail-logo {
  height: 74px;
  width: auto;
  background: #fff;
  padding: 6px;
  border-radius: 10px;
  flex-shrink: 0;
}
.escep-portail-school {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.15;
}
.escep-portail-sub {
  font-size: 14px;
  opacity: .95;
  margin-top: 2px;
}
.escep-portail-contact {
  font-size: 12px;
  opacity: .85;
  margin-top: 8px;
}
.escep-portail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}
@media (min-width: 960px) {
  .escep-portail-grid {
    grid-template-columns: 1.1fr .9fr;
    align-items: start;
  }
}
.escep-portail-col .escep-app-wrap {
  padding: 0;
  margin: 0;
}

/* ============================================================
   En-tête logo public (communiqué, espace candidat)
   ============================================================ */
.escep-logo-header {
  display: flex;
  align-items: center;
  gap: 18px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-left: 6px solid #1e3a8a;
  border-radius: 12px;
  padding: 14px 20px;
  margin-bottom: 18px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, .05);
}
.escep-logo-header-img {
  height: 58px;
  width: auto;
  flex-shrink: 0;
}
.escep-logo-header-school {
  font-size: 20px;
  font-weight: 800;
  color: #1e3a8a;
  line-height: 1.15;
}
.escep-logo-header-sub {
  font-size: 13px;
  color: #475569;
  margin-top: 3px;
}
.escep-logo-header-contact {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 6px;
}
@media (max-width: 520px) {
  .escep-logo-header { flex-direction: column; text-align: center; border-left: none; border-top: 6px solid #1e3a8a; }
}

/* ============================================================
   Page complète [escep_page_complete] — onglets
   ============================================================ */
.escep-complete .escep-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 0;
}
.escep-complete .escep-tab {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
  border-bottom: none;
  border-radius: 10px 10px 0 0;
  padding: 11px 20px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  margin-bottom: -2px;
  transition: background .15s, color .15s;
}
.escep-complete .escep-tab:hover {
  background: #e2e8f0;
}
.escep-complete .escep-tab.active {
  background: #1e3a8a;
  color: #fff;
  border-color: #1e3a8a;
}
/* Sans JS : sections empilées, séparées ; avec JS : onglets */
.escep-complete .escep-tab-panel + .escep-tab-panel {
  margin-top: 26px;
}
.escep-complete.escep-tabs-on .escep-tab-panel + .escep-tab-panel {
  margin-top: 0;
}
.escep-complete.escep-tabs-on .escep-tab-panel {
  animation: escepFade .2s ease-in;
}
@keyframes escepFade {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
