:root {
  --color-primary: #1d4ed8;
  --color-secondary: #f59e0b;
  --surface-soft: #eef6ff;
  --surface-warm: #fff7ed;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body.has-fixed-public-header {
  padding-top: 66px;
}

.bg-primary { background-color: var(--color-primary); }
.text-primary { color: var(--color-primary); }
.border-primary { border-color: var(--color-primary); }
.bg-secondary { background-color: var(--color-secondary); }
.text-secondary { color: var(--color-secondary); }
.border-secondary { border-color: var(--color-secondary); }

.site-header {
  background: linear-gradient(90deg, #1557c0, #1d4ed8 52%, #0ea5e9);
}

.site-footer {
  background:
    radial-gradient(circle at 15% 0%, rgba(245,158,11,.16), transparent 28%),
    linear-gradient(135deg, #1d4ed8 0%, #1557c0 55%, #0f766e 100%);
}

.home-hero {
  background:
    radial-gradient(circle at 12% 10%, rgba(245,158,11,.18), transparent 32%),
    radial-gradient(circle at 82% 18%, rgba(14,165,233,.24), transparent 34%),
    linear-gradient(135deg, #eef6ff 0%, #f8fbff 48%, #fff7ed 100%);
  color: #0f172a;
}

.home-hero h1,
.home-hero .hero-title {
  color: #0f172a;
}

.home-hero .hero-copy {
  color: #334155;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .65rem 1.4rem;
  border-radius: .6rem;
  font-weight: 600;
  transition: all .15s ease;
  cursor: pointer;
}
.btn-primary { background-color: var(--color-primary); color: #fff; }
.btn-primary:hover { opacity: .9; transform: translateY(-1px); }
.btn-secondary { background-color: var(--color-secondary); color: #1f2937; }
.btn-secondary:hover { opacity: .9; }
.btn-outline { border: 1.5px solid var(--color-primary); color: var(--color-primary); background: #fff; }
.btn-outline:hover { background: #f8fafc; }
.btn-danger { background-color: #dc2626; color: #fff; }
.btn-danger:hover { opacity: .9; }

.card {
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  border: 1px solid #e5e7eb;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: .2rem .65rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
}
.badge-success { background: #dcfce7; color: #166534; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-info { background: #dbeafe; color: #1e40af; }
.badge-gray { background: #f1f5f9; color: #475569; }

table.data-table { width: 100%; border-collapse: collapse; }
table.data-table th, table.data-table td {
  padding: .65rem .9rem;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
  font-size: .9rem;
}
table.data-table th { background: #f8fafc; font-weight: 700; color: #334155; }
table.data-table tr:hover td { background: #f8fafc; }

.timer-badge {
  font-family: 'Courier New', monospace;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: .05em;
}
.timer-warning { color: #dc2626 !important; animation: pulse 1s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .5; } }

.progress-bar-bg { background: #e5e7eb; border-radius: 999px; height: .6rem; overflow: hidden; }
.progress-bar-fill { background: var(--color-secondary); height: 100%; transition: width .3s ease; }

.modal-overlay {
  position: fixed; inset: 0; background: rgba(15,23,42,.6);
  display: flex; align-items: center; justify-content: center; z-index: 60;
  padding: 1rem;
}
.modal-box {
  background: #fff; border-radius: 1rem; max-width: 640px; width: 100%;
  max-height: 90vh; overflow-y: auto; padding: 1.5rem;
}

.admin-sidebar a.active {
  background: rgba(255,255,255,.12);
  border-left: 3px solid var(--color-secondary);
}

.admin-sidebar {
  width: 21.7rem;
  max-width: 21.7rem;
  flex: 0 0 21.7rem;
  transition: width .2s ease;
  overflow-x: hidden;
}

.admin-main {
  margin-left: 21.7rem;
  transition: margin-left .2s ease;
}

.admin-collapse-btn {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: .5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(255,255,255,.1);
}

.admin-sidebar.collapsed {
  width: 5rem;
  max-width: 5rem;
  flex-basis: 5rem;
}

.admin-main.collapsed {
  margin-left: 5rem;
}

.admin-sidebar.collapsed .admin-nav-label {
  display: none;
}

.admin-sidebar.collapsed .admin-nav-link,
.admin-sidebar.collapsed #logout-btn {
  justify-content: center;
  padding-left: .75rem;
  padding-right: .75rem;
}

.admin-sidebar.collapsed .admin-brand {
  justify-content: center;
}

@media (max-width: 767px) {
  .admin-sidebar,
  .admin-sidebar.collapsed {
    width: 100%;
    max-width: 100%;
    flex-basis: auto;
    position: static;
  }
  .admin-main,
  .admin-main.collapsed {
    margin-left: 0;
  }
}

@media print {
  .no-print { display: none !important; }
  body { background: #fff !important; }
}

.security-note {
  background: #fef9c3;
  border: 1px solid #eab308;
  color: #713f12;
  border-radius: .5rem;
  padding: .75rem 1rem;
  font-size: .85rem;
}

.home-visual {
  position: relative;
  min-height: 360px;
  border: 1px solid rgba(29,78,216,.16);
  border-radius: 1rem;
  padding: 1.25rem;
  overflow: hidden;
  background: linear-gradient(140deg, rgba(255,255,255,.96), rgba(239,246,255,.82));
  box-shadow: 0 24px 55px rgba(29,78,216,.16);
}

.home-slide-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.home-visual-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(15,23,42,.34));
}

.home-visual-icon {
  position: absolute;
  right: 1.25rem;
  top: 1.25rem;
  width: 4rem;
  height: 4rem;
  border-radius: .8rem;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.18);
  color: #fff;
  font-size: 1.8rem;
}

.credential-stack {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 1rem;
  max-width: 330px;
}

.badge-model {
  display: flex;
  align-items: center;
  gap: .9rem;
  border-radius: .9rem;
  background: #fff;
  color: #0f172a;
  padding: 1rem;
  box-shadow: 0 18px 35px rgba(15,23,42,.18);
}

.badge-model-medal {
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--color-secondary);
  color: #111827;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.badge-model-label {
  font-size: .7rem;
  text-transform: uppercase;
  color: #64748b;
  font-weight: 800;
}

.badge-model-title {
  font-size: .9rem;
  font-weight: 800;
  line-height: 1.2;
}

.badge-model-score,
.certificate-model-ref {
  font-size: .75rem;
  color: #64748b;
}

.certificate-model {
  border-radius: .9rem;
  background: #fff;
  color: #0f172a;
  padding: 1.1rem;
  box-shadow: 0 18px 35px rgba(15,23,42,.18);
  border: 4px solid var(--color-secondary);
  transform: translateX(2.5rem);
}

.certificate-model-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .75rem;
  font-weight: 900;
  color: #334155;
}

.certificate-model-title {
  margin-top: .8rem;
  font-size: 1.1rem;
  font-weight: 900;
  text-align: center;
}

.certificate-model-name {
  margin-top: .55rem;
  text-align: center;
  color: #475569;
  font-size: .85rem;
}

.certificate-model-line {
  width: 72%;
  height: 1px;
  background: #cbd5e1;
  margin: .9rem auto;
}

.home-visual-list {
  position: relative;
  z-index: 1;
  margin-top: 13rem;
  border-radius: .8rem;
  background: rgba(255,255,255,.92);
  color: #0f172a;
  padding: 1rem;
}

.home-announcement-band {
  margin-top: -2.5rem;
  position: relative;
  z-index: 2;
}

.partners-strip {
  background: #fff;
  border-top: 1px solid #dbeafe;
  border-bottom: 1px solid #dbeafe;
}

.partner-logo-tile {
  height: 5.25rem;
  border: 1px solid #e2e8f0;
  border-radius: .8rem;
  background: #fff;
  display: grid;
  place-items: center;
  padding: 1rem;
  box-shadow: 0 10px 24px rgba(29,78,216,.06);
}

.partner-logo-tile img {
  max-height: 3.25rem;
  max-width: 100%;
  object-fit: contain;
}

.announcement-card {
  position: relative;
  overflow: hidden;
  min-height: 9.5rem;
}

.announcement-card::after {
  content: "";
  position: absolute;
  right: -2rem;
  top: -2rem;
  width: 7rem;
  height: 7rem;
  border-radius: 999px;
  background: rgba(245,158,11,.14);
}

.announcement-date {
  width: 3.8rem;
  min-width: 3.8rem;
  border-radius: .8rem;
  background: #eff6ff;
  color: var(--color-primary);
  text-align: center;
  padding: .65rem .35rem;
  font-weight: 900;
}

.announcement-date span {
  display: block;
  font-size: .7rem;
  color: #64748b;
  text-transform: uppercase;
}

.announcement-slider,
.testimonial-slider {
  position: relative;
  overflow: hidden;
}

.slider-control {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: .7rem;
  display: inline-grid;
  place-items: center;
  border: 1px solid #dbeafe;
  background: #fff;
  color: var(--color-primary);
  transition: all .15s ease;
}

.slider-control:hover {
  border-color: var(--color-primary);
  background: #eff6ff;
}

.slider-dot {
  width: .6rem;
  height: .6rem;
  border-radius: 999px;
  background: #cbd5e1;
  transition: all .15s ease;
}

.slider-dot.active {
  width: 1.8rem;
  background: var(--color-secondary);
}

.testimonial-slider {
  background:
    linear-gradient(135deg, rgba(255,255,255,.96), rgba(239,246,255,.90)),
    radial-gradient(circle at 92% 10%, rgba(245,158,11,.16), transparent 30%);
}

.badge-template-preview {
  background: #fff;
  border: 3px solid #0ea5e9;
  color: #0f172a;
}

.badge-template-corner {
  position: absolute;
  width: 1.1rem;
  height: 1.1rem;
  border-color: #0ea5e9;
}

.home-visual-list h3 {
  font-weight: 800;
  margin-bottom: .65rem;
}

.home-visual-list ul {
  display: grid;
  gap: .45rem;
  font-size: .85rem;
}

.home-visual-list li i {
  color: #059669;
  margin-right: .5rem;
}

.formation-card-rich {
  overflow: hidden;
}

.formation-cover {
  position: relative;
  height: 14rem;
  margin: -2rem -2rem 1.5rem;
  overflow: hidden;
  background: #0f172a;
}

.formation-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(1.05);
}

.formation-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15,23,42,0), rgba(15,23,42,.50));
}

.formation-cover-badge {
  position: absolute;
  left: 1.25rem;
  bottom: 1.25rem;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  border-radius: 999px;
  background: rgba(255,255,255,.92);
  color: #0f172a;
  padding: .45rem .85rem;
  font-size: .78rem;
  font-weight: 800;
}

.formation-domain-visual {
  width: 6.5rem;
  height: 5.2rem;
  border-radius: .9rem;
  display: grid;
  place-items: center;
  font-size: 2rem;
  color: #fff;
  flex-shrink: 0;
}

.domain-audiovisuel { background: linear-gradient(135deg, #0284c7, #f59e0b); }
.domain-bible { background: linear-gradient(135deg, #059669, #f59e0b); }
.domain-certification { background: linear-gradient(135deg, #2563eb, #f59e0b); }

.contact-chat-panel {
  border: 1px solid #dbeafe;
  background: #f8fafc;
  border-radius: .8rem;
  padding: 1rem;
}

.whatsapp-chat-link {
  display: flex;
  align-items: center;
  gap: .75rem;
  border-radius: .8rem;
  padding: .85rem 1rem;
  background: #16a34a;
  color: #fff;
  font-weight: 800;
}

.whatsapp-chat-link:hover {
  background: #15803d;
}

.floating-whatsapp {
  position: fixed;
  right: 1.35rem;
  bottom: 1.35rem;
  z-index: 70;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  min-height: 3.35rem;
  padding: .85rem 1.05rem;
  border-radius: 999px;
  background: #16a34a;
  color: #fff;
  font-weight: 900;
  box-shadow: 0 18px 35px rgba(22,163,74,.35);
}

.floating-whatsapp i {
  font-size: 1.55rem;
}

.floating-whatsapp:hover {
  background: #15803d;
  transform: translateY(-1px);
}

@media (max-width: 767px) {
  .certificate-model {
    transform: none;
  }
  .home-visual {
    min-height: auto;
    aspect-ratio: 4 / 3;
    padding: .9rem;
  }
  .home-visual-list {
    margin-top: 9rem;
  }
  .formation-cover {
    height: 11rem;
  }
  .floating-whatsapp {
    right: .9rem;
    bottom: .9rem;
    width: 3.4rem;
    height: 3.4rem;
    min-height: 3.4rem;
    padding: 0;
    justify-content: center;
  }
  .floating-whatsapp span {
    display: none;
  }
}
