/* Reset et base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #f0f4f8;
  color: #2d3748;
  line-height: 1.6;
  padding: 20px;
}

.container {
  max-width: 900px;
  margin: 0 auto;
}

.calculator-wrapper {
  background: white;
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

h1 {
  color: #1a365d;
  font-size: 2.2rem;
  text-align: center;
  margin-bottom: 8px;
}

.subtitle {
  text-align: center;
  color: #4a5568;
  font-size: 1.1rem;
  margin-bottom: 35px;
  border-bottom: 3px solid #e2e8f0;
  padding-bottom: 20px;
}

/* Sections */
.section {
  margin-bottom: 30px;
  padding: 20px 25px;
  background: #f7fafc;
  border-radius: 12px;
  border-left: 5px solid #2b6cb0;
}

.section h2 {
  font-size: 1.3rem;
  color: #2d3748;
  margin-bottom: 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.max-points {
  font-size: 0.9rem;
  font-weight: normal;
  color: #4a5568;
  background: #edf2f7;
  padding: 2px 12px;
  border-radius: 20px;
}

/* Groupes de formulaire */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 5px;
  color: #2d3748;
  font-size: 0.95rem;
}

.required {
  color: #e53e3e;
  font-weight: bold;
}

select {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  background: white;
  font-size: 1rem;
  color: #2d3748;
  transition: border-color 0.3s;
  appearance: none;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8"><path d="M1 1l5 5 5-5" stroke="%234a5568" stroke-width="1.5" fill="none"/></svg>');
  background-repeat: no-repeat;
  background-position: right 15px center;
  cursor: pointer;
}

select:focus {
  outline: none;
  border-color: #2b6cb0;
  box-shadow: 0 0 0 3px rgba(43, 108, 176, 0.2);
}

/* Groupes radio et checkbox */
.radio-group {
  display: flex;
  gap: 25px;
  padding-top: 6px;
}

.radio-group label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: normal;
  cursor: pointer;
}

.radio-group input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: #2b6cb0;
  cursor: pointer;
}

.checkbox-group label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: normal;
  margin-bottom: 10px;
  padding: 8px 12px;
  background: white;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  transition: background 0.2s;
  cursor: pointer;
}

.checkbox-group label:hover {
  background: #edf2f7;
}

.checkbox-group input[type="checkbox"] {
  min-width: 18px;
  height: 18px;
  margin-top: 3px;
  accent-color: #2b6cb0;
  cursor: pointer;
}

.note {
  font-size: 0.9rem;
  color: #718096;
  font-style: italic;
  margin-top: 10px;
}

/* Bouton */
.btn-calculate {
  display: block;
  width: 100%;
  padding: 16px;
  background: #2b6cb0;
  color: white;
  font-size: 1.2rem;
  font-weight: 700;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.3s, transform 0.1s;
  letter-spacing: 0.5px;
  margin-top: 10px;
}

.btn-calculate:hover {
  background: #1a4f7a;
}

.btn-calculate:active {
  transform: scale(0.98);
}

/* Section résultats */
.result-section {
  margin-top: 30px;
  padding: 25px;
  background: #ebf4ff;
  border-radius: 12px;
  border: 2px solid #bee3f8;
}

#result-container {
  margin-top: 20px;
}

.result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #e2e8f0;
}

.result-item:last-child {
  border-bottom: none;
}

.result-label {
  font-weight: 600;
  font-size: 1.1rem;
  color: #2d3748;
}

.result-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: #2b6cb0;
}

.eligibility-message {
  margin-top: 18px;
  padding: 16px;
  border-radius: 10px;
  font-weight: 600;
  text-align: center;
  font-size: 1.15rem;
  display: none;
}

.eligibility-message.success {
  display: block;
  background: #c6f6d5;
  color: #22543d;
  border: 2px solid #48bb78;
}

.eligibility-message.fail {
  display: block;
  background: #fed7d7;
  color: #9b2c2c;
  border: 2px solid #fc8181;
}

/* Responsive */
@media (max-width: 640px) {
  .calculator-wrapper {
    padding: 20px;
  }
  
  h1 {
    font-size: 1.6rem;
  }
  
  .section {
    padding: 15px;
  }
  
  .section h2 {
    font-size: 1.1rem;
    flex-direction: column;
    align-items: flex-start;
  }
  
  .radio-group {
    flex-direction: column;
    gap: 8px;
  }
  
  .result-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }
  
  .result-value {
    font-size: 1.3rem;
  }
  
  .btn-calculate {
    font-size: 1rem;
    padding: 14px;
  }
}