/** @format */

html,
body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  background: transparent;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Custom font size for large buttons */
.btn-lg {
  font-size: 18px;
}

.form-wrapper {
  padding: 0;
}

:root {
  --mpcc-primary: #26374a;
  --mpcc-secondary: #335075;
  --mpcc-accent: #af3c43;
  --mpcc-light: #f8f9fa;
  --mpcc-border: #dcdee1;
}

.header-banner {
  background: linear-gradient(135deg, var(--mpcc-primary) 0%, var(--mpcc-secondary) 100%);
  color: white;
  padding: 1rem 0;
  margin: 2rem auto;
  border-radius: 10px;
}

.header-banner h1 {
  font-size: 1.2rem;
  margin: 0;
  font-weight: 600;
  flex: 1;
}

/* Show correct acronym depending on <html lang="..."> */
html[lang="en"] .only-fr {
  display: none !important;
}
html[lang="fr"] .only-en {
  display: none !important;
}

.protected-badge {
  background-color: var(--mpcc-accent);
  color: white;
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.section-header {
  background: linear-gradient(135deg, var(--mpcc-primary) 0%, var(--mpcc-secondary) 100%);
  color: white;
  padding: 1rem 1.25rem;
  border-radius: 0.5rem 0.5rem 0 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-header h2 {
  font-size: 1.2rem;
  margin: 0;
  font-weight: 600;
}

.form-card {
  background: white;
  border-radius: 0.5rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.form-card .card-body {
  padding: 1.25rem;
}

.question-group {
  background: var(--mpcc-light);
  border: 1px solid var(--mpcc-border);
  border-radius: 0.5rem;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.question-group:last-child {
  margin-bottom: 0;
}

.question-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  background-color: var(--mpcc-secondary);
  color: white;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 600;
  margin-right: 0.5rem;
  flex-shrink: 0;
}

.question-title {
  font-weight: 600;
  color: var(--mpcc-primary);
  margin-bottom: 1rem;
  font-size: 1rem;
  display: flex;
  align-items: center;
}

.required-indicator {
  color: var(--mpcc-accent);
  font-weight: 600;
  margin-left: 0.25rem;
}

.form-label {
  font-weight: 500;
  color: #444;
  margin-bottom: 0.35rem;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--mpcc-secondary);
  box-shadow: 0 0 0 0.2rem rgba(51, 80, 117, 0.25);
}

.form-check-input:checked {
  background-color: var(--mpcc-secondary);
  border-color: var(--mpcc-secondary);
}

.btn-primary {
  background-color: var(--mpcc-secondary);
  border-color: var(--mpcc-secondary);
}

.btn-primary:hover {
  background-color: var(--mpcc-primary);
  border-color: var(--mpcc-primary);
}

.btn-outline-secondary:hover {
  color: var(--mpcc-secondary);
  border-color: var(--mpcc-secondary);
  background-color: #f8f9fa;
}

.info-box {
  background-color: #e8f4fd;
  border-left: 4px solid var(--mpcc-secondary);
  padding: 1rem 1.25rem;
  border-radius: 0 0.5rem 0.5rem 0;
  margin: 1.25rem 0;
}

.info-box p {
  margin: 0;
  color: var(--mpcc-primary);
}

.certification-box {
  background: #fff9e6;
  border: 1px solid #f0e6c8;
  border-radius: 0.5rem;
  padding: 1.25rem;
  margin: 1.5rem 0;
}

.certification-box p {
  margin: 0;
  font-weight: 500;
  color: #6b5900;
}

.divider {
  border-top: 2px solid var(--mpcc-border);
  margin: 1.25rem 0;
}

.external-link {
  color: var(--mpcc-secondary);
  text-decoration: underline;
}

.external-link:hover {
  color: var(--mpcc-primary);
}

/* Loading Overlay */
#loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loading-content {
  background: white;
  padding: 2.5rem 3rem;
  border-radius: 1rem;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  max-width: 400px;
}

.spinner {
  width: 60px;
  height: 60px;
  margin: 0 auto 1.5rem;
  border: 5px solid #f3f3f3;
  border-top: 5px solid var(--mpcc-secondary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.loading-content p {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--mpcc-primary);
  margin-bottom: 0.5rem;
}

.loading-content small {
  color: #6c757d;
  font-size: 0.9rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .form-card .card-body {
    padding: 1rem;
  }
  .question-group {
    padding: 1rem;
  }
  /* keep badge readable on mobile */
  .protected-badge {
    margin-top: 0.25rem;
  }
}
