/* ============================================================
   AVOP - Formulaire d'inscription | CSS modernise
   Couleurs : Bleu #334093 | Bleu fonce #252f6e | Blanc #ffffff
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

html {
  background-color: #334093;
  min-height: 100%;
}

body {
  margin: 0;
  padding: 30px 0 50px;
  font-family: 'Segoe UI', Arial, sans-serif;
  font-size: 15px;
  color: #1a1a2e;
  background-color: #334093;
  line-height: 1.6;
}

/* Typographie */
h1 {
  font-size: 1.4rem;
  font-weight: 700;
  color: #334093;
  margin: 0 0 20px 0;
  padding-bottom: 12px;
  border-bottom: 3px solid #334093;
  text-align: left;
}
h2 {
  font-size: 1.05rem;
  font-weight: 600;
  color: #252f6e;
  margin: 18px 0 6px 0;
}
h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: #334093;
  margin: 10px 0 6px 0;
}
p {
  margin: 6px 0 10px;
  color: #333;
}

/* Cards */
.div_box {
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 4px 24px rgba(30,40,100,0.13);
  padding: 36px 48px 32px;
  margin: 24px auto;
  max-width: 1150px;
  text-align: left;
  border: none;
}
.div_box .div_box {
  background: #f4f6ff;
  border: 1px solid #c8cef5;
  box-shadow: none;
  margin: 16px 0;
  padding: 24px 28px;
}

/* Logo — override du style inline */
.div_box img,
.div_box img[style] {
  display: block !important;
  margin: 0 auto 24px !important;
  height: 160px !important;
  width: 160px !important;
  border-radius: 50% !important;
  object-fit: contain !important;
  box-shadow: 0 2px 12px rgba(51,64,147,0.18) !important;
}

/* Champs */
.c100 {
  margin: 16px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.c200 {
  margin: 16px 0;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
}

.c200 label {
  min-width: 80px !important;
  max-width: 80px !important;
}


.c200 input[type="text"] {
  flex: 1;
  min-width: 0;
}

label {
  display: inline-block;
  min-width: 240px;
  max-width: 240px;
  font-weight: 600;
  color: #252f6e;
  font-size: 0.93rem;
  flex-shrink: 0;
}

input[type="text"],
input[type="email"],
input[type="number"],
select,
textarea {
  font-family: inherit;
  font-size: 0.93rem;
  color: #1a1a2e;
  background: #f4f6ff;
  border: 1.5px solid #b0b8e8;
  border-radius: 7px;
  padding: 9px 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
  min-width: 200px;
  max-width: 100%;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #334093;
  box-shadow: 0 0 0 3px rgba(51,64,147,0.15);
  background: #ffffff;
}

input[type="text"]::placeholder,
input[type="email"]::placeholder { color: #9099c4; }

/* Champs Prenom et Nom — chacun sur sa propre ligne */
#prenom, #nom {
  width: 300px;
  min-width: 200px;
  flex: none;
}

/* Champs date */
input[id="jnai"],
input[id="mnai"] {
  width: 80px;
  min-width: 60px;
  flex: none;
  text-align: center;
}
input[id="ynai"] {
  width: 120px;
  min-width: 80px;
  flex: none;
  text-align: center;
}

/* Radio & Checkbox */
input[type="radio"],
input[type="checkbox"] {
  accent-color: #334093;
  width: 17px;
  height: 17px;
  cursor: pointer;
  vertical-align: middle;
  margin: 0 4px 0 8px;
  flex: none;
}

/* Select */
select {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23334093' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

/* Bouton submit */
input[type="submit"] {
  display: inline-block;
  background-color: #334093;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 14px 48px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.03em;
  transition: background-color 0.2s, box-shadow 0.2s, transform 0.1s;
  box-shadow: 0 3px 10px rgba(51,64,147,0.25);
}
input[type="submit"]:hover {
  background-color: #252f6e;
  box-shadow: 0 6px 18px rgba(51,64,147,0.35);
  transform: translateY(-1px);
}
input[type="submit"]:active {
  transform: translateY(0);
  box-shadow: none;
}
#submit {
  text-align: center;
  margin: 32px auto;
  max-width: 1000px;
}
#submit h1 {
  border: none;
  text-align: center;
  margin: 0;
  padding: 0;
  color: transparent;
}

/* Liens */
a:link    { color: #334093; }
a:visited { color: #6b4fa0; }
a:hover   { color: #e07820; text-decoration: underline; }
a:active  { color: #e07820; }
.div_box a:link    { color: #334093; }
.div_box a:visited { color: #7a52b5; }

/* Erreurs inline */
.c100[id$="_aro"],
.c100[id$="_point"],
.c100[id^="mail_err"],
.c100[id^="mailp_err"] {
  background: #fff0ef;
  border-left: 4px solid #d9362b;
  border-radius: 5px;
  padding: 8px 14px;
  color: #d9362b;
  font-size: 0.88rem;
  font-weight: 600;
  margin: 4px 0;
  flex-basis: 100%;
}

/* Page erreur */
.error.message {
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 4px 24px rgba(30,40,100,0.18);
  padding: 48px 40px;
  max-width: 580px;
  margin: 0 auto;
  text-align: center;
}
.error.message h3 {
  font-size: 1.2rem;
  color: #d9362b;
  font-weight: 700;
  margin-bottom: 12px;
}
.error.message p {
  color: #444;
  font-size: 0.95rem;
}
.error-icon {
  display: block;
  font-size: 2.4rem;
  margin-bottom: 12px;
  color: #d9362b;
}
body:has(.error.message) {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}

/* Page thanks.html */
body > img {
  display: block;
  margin: 50px auto 20px;
  height: 180px;
  width: 180px;
  border-radius: 50%;
  box-shadow: 0 2px 12px rgba(51,64,147,0.2);
}
body > h1 {
  color: #ffffff;
  text-align: center;
  border: none;
  font-size: 1.8rem;
}
body > p {
  color: rgba(255,255,255,0.88);
  text-align: center;
  font-size: 1rem;
}

/* Page index.html */
.login-modal {
  max-width: 500px;
  margin: 60px auto;
  text-align: center;
}
.login-modal .header img {
  height: 200px;
  width: 200px;
  transition: transform 0.25s, box-shadow 0.25s;
}
.login-modal .header img:hover {
  transform: scale(1.04);
  box-shadow: 0 8px 28px rgba(51,64,147,0.35);
}
.login-holder h1 {
  font-size: 1.45rem;
  color: #ffffff !important;
  border: none;
  text-align: center;
  margin-top: 20px;
}
.login-holder p { color: rgba(255,255,255,0.85); }

/* Bandeaux paiement */
.c100 p {
  background: #eef0fb;
  border-left: 4px solid #334093;
  border-radius: 5px;
  padding: 12px 16px;
  color: #252f6e;
  font-size: 0.9rem;
  margin: 0;
  width: 100%;
}

/* RGPD */
.div_box > p:last-child,
.div_box > p + p {
  font-size: 0.83rem;
  color: #555;
  line-height: 1.55;
}

/* Responsive tablette */
@media (max-width: 1060px) {
  .div_box {
    margin: 18px 20px;
    padding: 28px 28px 24px;
  }
}

/* Responsive mobile */
@media (max-width: 600px) {
  body {
    font-size: 14px;
    padding: 10px 0 30px;
  }
  .div_box {
    margin: 10px 10px;
    padding: 20px 16px 16px;
    border-radius: 10px;
  }
  h1 { font-size: 1.15rem; }
  h2 { font-size: 0.97rem; }
  label {
    min-width: 100%;
    max-width: 100%;
  }
  .c100 { flex-wrap: wrap; }
  input[type="text"],
  input[type="email"],
  select {
    width: 100%;
    min-width: 0;
  }
  
  }
  input[id="jnai"],
  input[id="mnai"],
  input[id="ynai"] {
    width: auto;
    flex: none;
  }
  input[type="submit"] {
    width: 100%;
    padding: 14px;
    font-size: 1rem;
  }
  .error.message {
    margin: 0 16px;
    padding: 32px 20px;
  }
  #prenom, #nom {
  flex: 1 !important;
  width: auto !important;
  min-width: 0 !important;
}
a[href*="Questionnaire"] {
  display: inline-block;
  background: #eef0fb;
  border: 1.5px solid #334093;
  border-radius: 7px;
  padding: 10px 18px;
  font-weight: 600;
  color: #334093;
  text-decoration: none;
  margin: 8px 0;
  transition: background 0.2s;
}

a[href*="Questionnaire"]:hover {
  background: #334093;
  color: #ffffff;
}
}
