* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-image: url("resources/affiche_2.jpg");
  min-height: 100vh;
  padding: 20px;
}

.container {
  max-width: 700px;
  margin: 0 auto;
  background: white;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
  overflow: hidden;
}

.loading-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 9999;
  justify-content: center;
  align-items: center;
}

.loading-overlay.active {
  display: flex;
}

.spinner-container {
  text-align: center;
  background: white;
  padding: 40px;
  border-radius: 15px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.spinner {
  width: 60px;
  height: 60px;
  margin: 0 auto 20px;
  border: 6px solid #f3f3f3;
  border-top: 6px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin{


    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }


}

.spinner-text {
  color: #333;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
}

.spinner-subtext {
  color: #666;
  font-size: 14px;
}

div.logoapejm {
  background-image: url("resources/logo.png");
  background-size: 100px;
  width: 100px;
  height: 100px;
  margin-left: 50%;
  transform: translate(-50%, 0)
}

h1 {
  color: #333;
  text-align: center;
  margin-bottom: 10px;
  font-size: 28px;
}

h2 {
  color: #666;
  text-align: center;
  margin-bottom: 10px;
  font-size: 20px;
}

.subtitle {
  text-align: left;
  color: #666;
  margin-top: 30px;
  font-size: 16px;
}

.message {
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
  text-align: center;
}

.message.success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.message.error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.form-group {
  margin-bottom: 20px;
}

label {
  display: block;
  margin-bottom: 5px;
  color: #333;
  font-weight: 600;
  font-size: 14px;
}

.required {
  color: #e74c3c;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
textarea {
  width: 100%;
  padding: 12px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.3s;
}

input[type="date"]{
	max-width: 153px;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: #667eea;
}

textarea {
  resize: vertical;
  min-height: 100px;
  font-family: inherit;
}

input[type="file"] {
  width: 100%;
  padding: 12px;
  border: 2px dashed #e0e0e0;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.3s;
  background-color: #f9f9f9;
}

input[type="file"]:hover {
  border-color: #667eea;
  background-color: #f0f0ff;
}

.file-info {
  font-size: 12px;
  color: #666;
  margin-top: 5px;
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.section-title {
  color: #495057;
  font-size: 1.3em;
  font-weight: 600;
  margin: 30px 0 15px 0;
  padding-bottom: 10px;
  border-bottom: 2px solid #dee2e6;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

button {
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, opacity 0.3s;
  margin-top: 10px;
}

button:hover:not(:disabled) {
  transform: translateY(-2px);
}

button:active:not(:disabled) {
  transform: translateY(0);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.HaPay {
  width: 100%;
  display: grid;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  height: 40px;
}

.HaPay * {
  font-family: "Open Sans", "Trebuchet MS", "Lucida Sans Unicode",
    "Lucida Grande", "Lucida Sans", Arial, sans-serif;
  transition: all 0.3s ease-out;
}

.HaPayButton {
  align-items: stretch;
  -webkit-box-pack: stretch;
  -ms-flex-pack: stretch;
  background: none;
  border: none;
  display: flex;
  padding: 0;
  border-radius: 8px;
  height: 40px;
}

.HaPayButton:hover {
  cursor: pointer;
}

.HaPayButton:not(:disabled):focus {
  box-shadow: 0 0 0 0.25rem rgba(73, 211, 138, 0.25);
  -webkit-box-shadow: 0 0 0 0.25rem rgba(73, 211, 138, 0.25);
}

.HaPayButton:not(:disabled):hover .HaPayButtonLabel,
.HaPayButton:not(:disabled):focus .HaPayButtonLabel {
  background-color: #483dbe;
}

.HaPayButton:not(:disabled):hover .HaPayButtonLogo,
.HaPayButton:not(:disabled):focus .HaPayButtonLogo,
.HaPayButton:not(:disabled):hover .HaPayButtonLabel,
.HaPayButton:not(:disabled):focus .HaPayButtonLabel {
  border: 1px solid #483dbe;
}

.HaPayButton:disabled {
  cursor: not-allowed;
}

.HaPayButton:disabled .HaPayButtonLogo,
.HaPayButton:disabled .HaPayButtonLabel {
  border: 1px solid #d1d6de;
}

.HaPayButtonLogo {
  background-color: #ffffff;
  border: 1px solid #4c40cf;
  border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;
  padding: 10px 16px;
  width: 30px;
  box-sizing: content-box;
}

.HaPayButtonLabel {
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: space-between;
  column-gap: 5px;
  background-color: #4c40cf;
  border: 1px solid #4c40cf;
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
  color: #ffffff;
  font-size: 16px;
  font-weight: 800;
  display: flex;
  padding: 0 16px;
}

.HaPayButton:disabled .HaPayButtonLabel {
  background-color: #d1d6de;
  color: #505870;
}

.HaPaySecured {
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: space-between;
  display: flex;
  column-gap: 5px;
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 600;
  color: #2e2f5e;
}

.HaPay svg {
  fill: currentColor;
}
