/* ============================================================
   PAGE-OWNED STYLES: jeu-responsable
   Scoped to <main> or page-owned component roots.
   ============================================================ */

/* ---- Hero Section ---- */
.hero-jeu-responsable {
  padding-block: var(--space-8);
  text-align: center;
}

.hero-content {
  max-width: 720px;
  margin-inline: auto;
}

.hero-content h1 {
  margin-block-end: var(--space-4);
}

.hero-content p {
  max-width: 65ch;
  margin-inline: auto;
  margin-block-end: var(--space-4);
}

.hero-content p:last-child {
  margin-block-end: 0;
}

@media (max-width: 48rem) {
  .hero-jeu-responsable {
    padding-block: var(--space-6);
  }
  .hero-content {
    padding-inline: var(--space-4);
  }
}

/* ---- Principes Section ---- */
.principes {
  padding-block-end: var(--space-7);
}

.principes h2 {
  text-align: center;
  margin-block-end: var(--space-5);
}

.grille-principes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-5);
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--space-4);
}

.carte-principe {
  width: 100%;
  min-width: 0;
}

.carte-principe h3 {
  margin-block-end: var(--space-3);
}

.carte-principe p {
  max-width: 55ch;
}

@media (max-width: 48rem) {
  .grille-principes {
    grid-template-columns: 1fr;
  }
}

/* ---- Conseils pratiques Section ---- */
.conseils {
  padding-block-end: var(--space-7);
}

.conseils h2 {
  text-align: center;
  margin-block-end: var(--space-5);
}

.carte-conseils {
  max-width: 800px;
  margin-inline: auto;
  padding: var(--space-5);
}

.carte-conseils h3 {
  margin-block-end: var(--space-4);
}

.liste-conseils {
  list-style: none;
  padding-inline-start: 0;
  margin-block: 0;
}

.liste-conseils li {
  position: relative;
  padding-inline-start: 2rem;
  margin-block-end: var(--space-3);
  max-width: 70ch;
}

.liste-conseils li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35em;
  width: 1.2em;
  height: 1.2em;
  background-color: var(--accent-gold);
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2L15.09 8.26L22 9.27L17 14.14L18.18 21.02L12 17.77L5.82 21.02L7 14.14L2 9.27L8.91 8.26L12 2Z'/%3E%3C/svg%3E");
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2L15.09 8.26L22 9.27L17 14.14L18.18 21.02L12 17.77L5.82 21.02L7 14.14L2 9.27L8.91 8.26L12 2Z'/%3E%3C/svg%3E");
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
}

@media (max-width: 48rem) {
  .carte-conseils {
    padding: var(--space-4);
  }
}

/* ---- Auto-évaluation Section ---- */
.auto-evaluation {
  padding-block-end: var(--space-7);
}

.auto-evaluation h2 {
  text-align: center;
  margin-block-end: var(--space-5);
}

.carte-auto-evaluation {
  max-width: 700px;
  margin-inline: auto;
  padding: var(--space-5);
}

.carte-auto-evaluation h3 {
  margin-block-end: var(--space-4);
}

.carte-auto-evaluation p {
  max-width: 70ch;
  margin-block-end: var(--space-4);
}

#form-auto-evaluation fieldset {
  border: none;
  padding: 0;
  margin: 0;
}

.question {
  margin-block-end: var(--space-3);
}

.question label {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  cursor: pointer;
  max-width: 70ch;
}

.question input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 1.2em;
  height: 1.2em;
  border: 1px solid var(--accent-gold);
  background-color: transparent;
  flex-shrink: 0;
  margin-top: 0.2em;
  position: relative;
  cursor: pointer;
}

.question input[type="checkbox"]:checked {
  background-color: var(--accent-gold);
}

.question input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 1px;
  width: 5px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.note {
  font-size: var(--font-size-small);
  line-height: var(--line-height-small);
  color: var(--text-secondary);
  margin-block-end: var(--space-4);
}

#form-auto-evaluation .btn {
  margin-block-start: var(--space-4);
}

@media (max-width: 48rem) {
  .carte-auto-evaluation {
    padding: var(--space-4);
  }
}

/* ---- Signes d'alerte Section ---- */
.signes-alerte {
  padding-block-end: var(--space-7);
}

.signes-alerte h2 {
  text-align: center;
  margin-block-end: var(--space-5);
}

.grille-signes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-5);
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--space-4);
}

.carte-signe {
  width: 100%;
  min-width: 0;
}

.carte-signe h3 {
  margin-block-end: var(--space-3);
}

.carte-signe p {
  max-width: 50ch;
  margin-block-end: var(--space-3);
}

.carte-signe ul {
  list-style: none;
  padding-inline-start: 0;
  margin-block: 0;
}

.carte-signe li {
  position: relative;
  padding-inline-start: 1.5rem;
  margin-block-end: var(--space-2);
  max-width: 50ch;
}

.carte-signe li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 0.6em;
  height: 0.6em;
  background-color: var(--accent-gold);
  border-radius: 50%;
}

@media (max-width: 48rem) {
  .grille-signes {
    grid-template-columns: 1fr;
  }
}

/* ---- Ressources d'aide Section ---- */
.ressources-aide {
  padding-block-end: var(--space-7);
}

.ressources-aide h2 {
  text-align: center;
  margin-block-end: var(--space-5);
}

.carte-ressources {
  max-width: 700px;
  margin-inline: auto;
  padding: var(--space-5);
}

.carte-ressources h3 {
  margin-block-end: var(--space-4);
}

.carte-ressources p {
  max-width: 70ch;
  margin-block-end: var(--space-4);
}

.liste-ressources {
  list-style: none;
  padding-inline-start: 0;
  margin-block: 0 0 var(--space-4);
}

.liste-ressources li {
  margin-block-end: var(--space-3);
}

.liste-ressources a {
  color: var(--accent-gold);
  text-decoration: none;
  transition: text-decoration 0.2s;
}

.liste-ressources a:hover {
  text-decoration: underline;
}

@media (max-width: 48rem) {
  .carte-ressources {
    padding: var(--space-4);
  }
}

/* ---- Dispositifs de protection Section ---- */
.dispositifs-protection {
  padding-block-end: var(--space-7);
}

.dispositifs-protection h2 {
  text-align: center;
  margin-block-end: var(--space-5);
}

.conteneur-dispositifs {
  display: flex;
  gap: var(--space-5);
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--space-4);
}

.carte-dispositif {
  flex: 1;
  min-width: 0;
}

.carte-dispositif h3 {
  margin-block-end: var(--space-3);
}

.carte-dispositif p {
  max-width: 55ch;
  margin-block-end: var(--space-3);
}

.carte-dispositif .note {
  margin-block-start: var(--space-3);
}

@media (max-width: 48rem) {
  .conteneur-dispositifs {
    flex-direction: column;
  }
}

/* ---- FAQ Jeu responsable Section ---- */
.faq-jeu-responsable {
  padding-block-end: var(--space-7);
}

.faq-jeu-responsable h2 {
  text-align: center;
  margin-block-end: var(--space-5);
}

.conteneur-faq {
  max-width: 800px;
  margin-inline: auto;
  padding-inline: var(--space-4);
}

.faq-item {
  border-bottom: 1px solid var(--accent-gold);
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: var(--space-4) 0;
  background: none;
  border: none;
  font-family: var(--heading-font);
  font-size: var(--font-size-h3);
  line-height: var(--line-height-h3);
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
  transition: color 0.2s;
  letter-spacing: 0.02em;
}

.faq-question:hover {
  color: var(--accent-gold);
}

.faq-icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  position: relative;
  flex-shrink: 0;
  margin-inline-start: var(--space-3);
}

.faq-icon::before,
.faq-icon::after {
  content: "";
  position: absolute;
  background-color: currentColor;
  transition: transform 0.3s;
}

.faq-icon::before {
  top: 50%;
  left: 0;
  width: 100%;
  height: 2px;
  transform: translateY(-50%);
}

.faq-icon::after {
  top: 0;
  left: 50%;
  width: 2px;
  height: 100%;
  transform: translateX(-50%);
}

.faq-question[aria-expanded="true"] .faq-icon::after {
  transform: translateX(-50%) rotate(90deg);
}

.faq-reponse {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out, padding 0.3s ease-out;
  padding: 0;
}

.faq-reponse p {
  max-width: 70ch;
  margin-block-end: var(--space-4);
}

.faq-reponse.open {
  max-height: 500px; /* large enough for content */
  padding-block-end: var(--space-4);
}

@media (max-width: 48rem) {
  .faq-question {
    font-size: 1.25rem;
  }
}

/* ---- Engagement de Mireevra Section ---- */
.engagement-mireevra {
  padding-block-end: var(--space-7);
}

.engagement-mireevra h2 {
  text-align: center;
  margin-block-end: var(--space-5);
}

.carte-engagement {
  max-width: 800px;
  margin-inline: auto;
  padding: var(--space-5);
  background-color: var(--bg-card);
}

.carte-engagement h3 {
  margin-block-end: var(--space-4);
}

.carte-engagement p {
  max-width: 70ch;
  margin-block-end: var(--space-4);
}

.carte-engagement .note {
  margin-block-start: var(--space-4);
}

@media (max-width: 48rem) {
  .carte-engagement {
    padding: var(--space-4);
  }
}

/* ---- Utility: screen reader only ---- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
