html {
  position: relative;
  z-index: 0;
}

.modal-overlay {
  z-index: 2147483647; /* MAX INT */
}

/* Texte accessible uniquement aux lecteurs d'écran */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body {
  font-family: Arial, sans-serif;
  background: #2f435a;
  color: #fffff0;
  max-width: 700px;
  margin: 40px auto;
  padding: 20px;
}

header {
  text-align: left;
  margin-bottom: 30px;
}

.header-top {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 8px;
}

.header-top img {
  max-width: 180px;
  width: 100%;
  object-fit: contain;
  flex-shrink: 0;
  transform: translateY(-4px);
  margin-top: -24px;
}

.header-top h1 {
  margin: 0;
  font-size: clamp(20px, 4vw, 26px);
  line-height: 1.2;
}

/* MOBILE : h1 passe SOUS image */
@media (max-width: 600px) {
  .header-top {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
  }
  
  .header-top img {
    max-width: 180px;
    transform: none;
    align-items: center;
  }
}

header p {
  margin: 0;
  text-align: center;
}

h1 {
  font-size: 26px;
}

form {
  background: #2f435a;
  padding: 30px;
  border-radius: 10px;
}

fieldset {
  border: none;
  margin-bottom: 20px;
  padding: 0;
}
    
label {
  display: block;
  margin-top: 15px;
  font-weight: bold;
}

input, select {
  width: 100%;
  padding: 10px;
  margin-top: 5px;
  border-radius: 5px;
  border: 1px solid #ccc;
}

/* ✅ AMÉLIORATION : meilleur contraste (6:1 au lieu de 4.5:1) */
.aide-question {
  display: block;
  font-size: 12px;
  font-style: italic;
  color: #a0e0d8;
  margin: 4px 0 12px 0;
  font-weight: normal;
}

button {
  margin-top: 20px;
  width: 100%;
  background: #ff751f;
  color: #fffff0;
  padding: 8px;
  border: none;
  border-radius: 5px;
  font-size: 16px;
  cursor: pointer;
}

/* ✅ AJOUT : focus visible sur bouton */
button:focus {
  outline: 3px solid #80cbc4;
  outline-offset: 2px;
}

/* Overlay */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(27, 39, 53, .95);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.modal-overlay[style*="display: flex"] {
  min-height: 100vh;
}

/* Fenêtre modale */
.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  padding: 24px 24px 28px;
  border-radius: 8px;
  box-sizing: border-box;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  margin: 0;
}

/* États */
.modal.concerne {
  background: #fffff0;
  border: 6px solid #f01515;
  color: #1b2735;
}

.modal.non-concerne {
  background: #fffff0;
  border: 6px solid #4caf50;
  color: #1b2735;
}

/* Titre */
.modal h2 {
  text-align: center;
  margin: 0 0 12px 0;
  font-size: 22px;
}

/* Texte */
.modal p {
  margin: 0 0 12px 0;
  font-size: 16px;
  line-height: 1.5;
}

.modal ul {
  margin: 12px 0;
  padding-left: 20px;
}

.modal li {
  margin-bottom: 8px;
}

/* Bouton fermer */
.close-btn {
  position: absolute;
  top: -10px;
  right: -10px;
  background: #fff;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  color: #333;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.close-btn:hover,
.close-btn:focus {
  color: #000;
  background: #f0f0f0;
}

.close-btn:focus {
  outline: 2px solid #005a87;
  outline-offset: 2px;
}

/* Bouton CTA */
.cta-button {
  display: block;
  text-align: center;
  background: #007cba;
  color: #fff;
  padding: 8px;
  border-radius: 5px;
  text-decoration: none;
  margin-top: 8px;
  font-weight: bold;
}

.cta-button:hover {
  background: #005a87;
}

.cta-button:focus {
  outline: 3px solid #005a87;
  outline-offset: 2px;
}

/* Footer */
footer {
  text-align: center;
  margin-top: 24px;
  padding: 20px 16px 16px;
  border-top: 2px solid #80cbc4;
  color: #80cbc4;
  font-size: 14px;
  line-height: 1.6;
}

footer p {
  margin: 0 0 16px 0;
}

footer p:last-child {
  margin-bottom: 0;
}

footer a {
  color: #80cbc4;
  text-decoration: underline;
  font-weight: normal;
}

footer a:hover,
footer a:focus {
  color: #fffff0;
  text-decoration: none;
}

footer strong {
  color: #fffff0;
}

footer small {
  font-size: 12px;
  line-height: 1.6;
  opacity: 0.85;
}