/* ─── Variables couleurs ─── */
:root {
  --blue-dark:   #003366;
  --blue-main:   #0066cc;
  --blue-light:  #e8f1fb;
  --grey-border: #d0d7de;
  --grey-bg:     #f5f7fa;
  --green-main:  #28a745;
  --green-dark:  #218838;
  --red-main:    #dc3545;
  --red-dark:    #c82333;
}

/* ─── Base globale ─── */
* {
  box-sizing: border-box;
}
html, body {
  margin: 0;
  padding: 0;
  background: var(--grey-bg);
  font-family: "Helvetica Neue", Arial, sans-serif;
  color: #333;
  line-height: 1.5;
}
.container {
  width: 90%;
  max-width: 900px;
  margin: 2rem auto;
  padding: 0 1rem;
}
.no-bullet {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* ─── En-tête ─── */
.site-header {
  background-color: #2368b5;  /* bleu foncé */
  color: #ffffff;             /* texte blanc */
  text-align: center;
  padding: 2rem 1rem;
  margin: 0;
}
.site-header h1 {
  margin: 0;
  font-size: 2rem;
  line-height: 1.2;
}
.site-header .subtitle {
  margin-top: 0.5rem;
  font-size: 1rem;
  line-height: 1.4;
}
.centered-list {
  list-style-type: disc;      /* puces rondes */
  padding-left: 0;            /* supprime le retrait par défaut */
  margin: 1rem auto 0 auto;   /* centre horizontalement et espace au-dessus */
  display: inline-block;      /* fait que <ul> prend juste la largeur nécessaire */
}
.centered-list li {
  margin: 0.4rem 0;           /* espace entre chaque puce (vertical) */
  font-size: 0.95rem;
  color: #ffffff;             /* texte des puces en blanc */
}

/* ─── Section “À propos” ─── */
#about h2 {
  font-size: 1.6rem;
  color: var(--blue-main);
  margin-bottom: 1rem;
}
#about p {
  font-size: 1rem;
  margin-bottom: 1rem;
}
#about .note {
  font-size: 0.95rem;
  color: #555;
  margin-top: 0.8rem;
}
#about .tiny {
  font-size: 0.85rem;
  color: #777;
}

/* ─── Questionnaire (cartes de questions) ─── */
#quiz h2 {
  font-size: 1.6rem;
  color: var(--blue-main);
  margin-bottom: 1rem;
}
.question-card {
  background: #fff;
  border: 1px solid var(--grey-border);
  border-radius: 8px;
  padding: 1.2rem 1rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}
.question-card h3 {
  margin: 0 0 0.8rem 0;
  font-size: 1.15rem;
  color: var(--blue-dark);
}
.question-card p {
  margin: 0 0 1rem;
  font-size: 1rem;
}
.choice-wrapper {
  display: flex;
  align-items: center;
  margin-bottom: 0.6rem;
}
.choice-wrapper input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.choice-wrapper label {
  display: inline-block;
  background: #eef3f8;
  padding: 0.6rem 0.8rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  color: var(--blue-dark);
  transition: background 0.2s, border 0.2s;
  border: 2px solid transparent;
  user-select: none;
}
.choice-wrapper label:hover {
  background: #dde9f5;
}
.choice-wrapper input[type="radio"]:checked + label {
  background: var(--blue-main);
  color: #fff;
  border: 2px solid #004999;
}

/* ─── Bouton “Voir mes résultats” ─── */
.submit-container {
  text-align: center;
  margin: 2rem 0;
}
#submit-btn {
  background: var(--green-main);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.8rem 1.2rem;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.2s;
}
#submit-btn:hover {
  background: var(--green-dark);
}

/* ─── Résultats (carte) ─── */
#results .card {
  background: #fff;
  border: 1px solid var(--grey-border);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}
#results h2 {
  font-size: 1.6rem;
  color: var(--blue-dark);
  margin-top: 0;
}
#results ul {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}
#results ul li {
  font-size: 1rem;
  margin-bottom: 0.6rem;
}
#results h3 {
  margin-top: 1rem;
  font-size: 1.3rem;
}
#results .note {
  font-size: 0.95rem;
  color: #555;
  margin-top: 1rem;
}
#results button#restart {
  margin-top: 1.2rem;
  background: var(--red-main);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.7rem 1.2rem;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}
#results button#restart:hover {
  background: var(--red-dark);
}

/* ─── Résumé des réponses ─── */
#answers-summary-container {
  margin-top: 2rem;
}
#answers-summary-container .pdf-btn {
  margin-bottom: 1rem;
}
#answers-summary-container p.toggle-text {
  cursor: pointer;
  text-align: center;
  font-weight: bold;
  margin: 1.5rem 0 1rem;
}
#answers-summary-container #answers-list {
  display: none;
  margin-top: 1rem;
}
#answers-summary-container ol {
  padding-left: 1.2rem;
}
#answers-summary-container li {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

/* ─── Bouton PDF ─── */
.pdf-btn {
  background: var(--green-main);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.8rem 1.2rem;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.2s;
}
.pdf-btn:hover {
  background: var(--green-dark);
}

/* ─── Interprétation des scores ─── */
.results-interpretation {
  margin-top: 2rem;
}
.results-interpretation h3 {
  font-size: 1.4rem;
  color: var(--blue-dark);
  margin-bottom: 0.8rem;
}
.interpretation-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}
.interpretation-table th,
.interpretation-table td {
  border: 1px solid var(--grey-border);
  padding: 0.6rem 0.8rem;
  text-align: left;
  font-size: 0.95rem;
}
.interpretation-table th {
  background: var(--blue-light);
  color: var(--blue-dark);
}
.interpretation-table tbody tr:nth-child(even) {
  background: #f7f9fc;
}
.interpretation-table tbody tr:nth-child(odd) {
  background: #fff;
}
.results-interpretation p,
.results-interpretation .note {
  font-size: 0.95rem;
  color: #333;
  margin-top: 0.8rem;
}

/* ─── Scores moyens RAADS-R ─── */
.results-comparison {
  margin-top: 2.5rem;
}
.results-comparison h3 {
  font-size: 1.4rem;
  color: var(--blue-dark);
  margin-bottom: 0.8rem;
}
.results-comparison p,
.results-comparison ul.no-bullet,
.results-comparison .note {
  font-size: 0.95rem;
  color: #333;
  margin-bottom: 0.8rem;
}
.results-comparison ul.no-bullet {
  margin-left: 1rem;
  padding: 0;
}
.results-comparison ul.no-bullet li {
  margin-bottom: 0.4rem;
}
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}
.comparison-table th,
.comparison-table td {
  border: 1px solid var(--grey-border);
  padding: 0.6rem 0.8rem;
  text-align: left;
  font-size: 0.95rem;
}
.comparison-table th {
  background: var(--blue-light);
  color: var(--blue-dark);
}
.comparison-table tbody tr:nth-child(even) {
  background: #f7f9fc;
}
.comparison-table tbody tr:nth-child(odd) {
  background: #fff;
}
.comparison-table td:first-child {
  font-weight: 500;
  color: var(--blue-dark);
}

/* ─── Pied de page ─── */
footer {
  margin-top: 3rem;
  text-align: center;
  padding-bottom: 2rem;
  font-size: 0.85rem;
  color: #777;
}

/* ─── Responsive petits écrans ─── */
@media (max-width: 600px) {
  header h1 {
    font-size: 1.8rem;
  }
  .question-card h3 {
    font-size: 1rem;
  }
  .choice-wrapper label {
    font-size: 0.95rem;
  }
  #submit-btn {
    width: 100%;
  }
}

/* ─── Impression (PDF) ─── */
@media print {
  header,
  #about,
  #quiz,
  .submit-container,
  footer,
  .pdf-btn,
  .toggle-text {
    display: none !important;
  }
  #results,
  .results-interpretation,
  .results-comparison,
  #answers-summary-container,
  table {
    page-break-inside: avoid;
  }
  body {
    font-size: 12pt;
  }
}
