/*
 * Vérification de majorité (Didit) : la carte d'état et sa mise en page, communes à l'accueil (section
 * #majorite) et à la page /verification — le script qui va avec est site/majorite.js. Chargé par ces deux
 * pages seulement.
 */

/* ── Vérification de majorité ────────────────────────────────────────────────────────────────── */

/* Même composition que les avis : le propos à gauche, l'objet (ici, l'état du membre) dans le verre à
   droite. Les couleurs d'état sont celles de la charte (--ambre, --vert), jamais décoratives. */
.majorite-grille {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}

.majorite-points {
  display: grid;
  gap: 22px;
  margin: 36px 0 0;
  padding: 0;
  max-width: 52ch;
  list-style: none;
}

.majorite-points li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: start;
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--encre-2);
}

.majorite-points strong {
  display: block;
  margin-bottom: 2px;
  font-size: 16px;
  font-weight: 600;
  color: var(--encre);
}

.majorite-puce {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 19px;
  color: var(--rouge-vif);
  background: rgb(255 59 78 / 0.1);
  box-shadow: inset 0 0 0 1px rgb(255 59 78 / 0.2);
}

.majorite-carte {
  display: grid;
  gap: 24px;
  justify-self: end;
  width: 100%;
  max-width: 520px;
  padding: clamp(28px, 3.4vw, 40px);
}

.majorite-tete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.majorite-sceau {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: var(--r-interne);
  font-size: 30px;
  color: var(--rouge-vif);
  background: radial-gradient(120% 120% at 30% 20%, rgb(255 59 78 / 0.22), rgb(255 59 78 / 0.06));
  box-shadow: inset 0 0 0 1px rgb(255 59 78 / 0.24);
  transition: color 0.5s var(--sortie), background 0.5s var(--sortie), box-shadow 0.5s var(--sortie);
}

.majorite-statut {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--encre-2);
  background: rgb(255 255 255 / 0.05);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.08);
  transition: color 0.4s var(--sortie), background-color 0.4s var(--sortie), box-shadow 0.4s var(--sortie);
}

.majorite-voyant {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.majorite-corps h3 {
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: -0.025em;
  font-weight: 600;
}

.majorite-corps p {
  margin-top: 8px;
  max-width: 44ch;
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--encre-2);
}

.majorite-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.majorite-actions:empty {
  display: none;
}

.majorite-mention {
  padding-top: 18px;
  border-top: 1px solid rgb(255 255 255 / 0.07);
  font-size: 13px;
  color: var(--encre-3);
}

.majorite-mention a {
  color: var(--encre-2);
  text-decoration: underline;
  text-decoration-color: rgb(255 255 255 / 0.25);
  text-underline-offset: 3px;
}

.majorite-mention a:hover {
  color: var(--encre);
}

/* États. « chargement » garde la place sans rien affirmer. */
.majorite-carte[data-etat="chargement"] .majorite-corps,
.majorite-carte[data-etat="chargement"] .majorite-actions {
  opacity: 0.45;
}

.majorite-carte[data-etat="en-cours"] .majorite-statut {
  color: var(--ambre);
  background: var(--ambre-fond);
  box-shadow: inset 0 0 0 1px rgb(245 185 78 / 0.26);
}

.majorite-carte[data-etat="en-cours"] .majorite-voyant {
  animation: majorite-pouls 1.8s ease-in-out infinite;
}

.majorite-carte[data-etat="valide"] .majorite-statut {
  color: var(--vert);
  background: var(--vert-fond);
  box-shadow: inset 0 0 0 1px rgb(61 220 132 / 0.26);
}

.majorite-carte[data-etat="valide"] .majorite-sceau {
  color: var(--vert);
  background: radial-gradient(120% 120% at 30% 20%, rgb(61 220 132 / 0.2), rgb(61 220 132 / 0.05));
  box-shadow: inset 0 0 0 1px rgb(61 220 132 / 0.26);
}

.majorite-carte[data-etat="refuse"] .majorite-statut {
  color: var(--rouge-vif);
  background: rgb(255 59 78 / 0.1);
  box-shadow: inset 0 0 0 1px rgb(255 59 78 / 0.26);
}

@keyframes majorite-pouls {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgb(245 185 78 / 0.55);
  }
  60% {
    box-shadow: 0 0 0 7px rgb(245 185 78 / 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .majorite-carte[data-etat="en-cours"] .majorite-voyant {
    animation: none;
  }
}

@media (max-width: 900px) {
  .majorite-grille {
    grid-template-columns: 1fr;
  }

  .majorite-carte {
    justify-self: stretch;
    max-width: none;
  }
}

/* ── Page /verification ───────────────────────────────────────────────────────────────────────── */

.verif-corps {
  padding-bottom: clamp(64px, 8vw, 110px);
}

.verif-corps h2,
.verif-faq h2 {
  font-size: clamp(26px, 2.6vw, 34px);
  line-height: 1.1;
  letter-spacing: -0.035em;
  font-weight: 630;
  text-wrap: balance;
}

/* Trois étapes dans l'ordre où on les vit : la numérotation dit une vraie séquence. */
.verif-etapes {
  display: grid;
  margin: 30px 0 0;
  padding: 0;
  max-width: 52ch;
  list-style: none;
  counter-reset: etape;
}

.verif-etapes li {
  position: relative;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 18px;
  padding-bottom: 28px;
  counter-increment: etape;
}

.verif-etapes li::before {
  content: counter(etape);
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 15px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  color: var(--rouge-vif);
  background: rgb(255 59 78 / 0.1);
  box-shadow: inset 0 0 0 1px rgb(255 59 78 / 0.24);
}

/* Le fil qui relie une étape à la suivante. */
.verif-etapes li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 48px;
  bottom: 8px;
  left: 19.5px;
  width: 1px;
  background: linear-gradient(rgb(255 59 78 / 0.35), rgb(255 255 255 / 0.06));
}

.verif-etapes strong {
  display: block;
  margin: 8px 0 4px;
  font-size: 17px;
  font-weight: 600;
  color: var(--encre);
}

.verif-etapes p {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--encre-2);
}

/* Questions fréquentes : des <details> natifs, ouverts au clavier comme à la souris sans script. */
.verif-faq {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
  padding-bottom: clamp(88px, 11vw, 150px);
}

.verif-faq .chapo-faq {
  margin-top: 14px;
  max-width: 34ch;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--encre-2);
}

.faq details {
  border-top: 1px solid rgb(255 255 255 / 0.08);
}

.faq details:last-child {
  border-bottom: 1px solid rgb(255 255 255 / 0.08);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 4px;
  font-size: 17px;
  font-weight: 560;
  letter-spacing: -0.01em;
  color: var(--encre);
  list-style: none;
  cursor: pointer;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary .ic {
  flex: none;
  font-size: 18px;
  color: var(--rouge-vif);
  transition: rotate 0.45s var(--ressort);
}

.faq details[open] summary .ic {
  rotate: 45deg;
}

.faq summary:focus-visible {
  outline: 2px solid var(--rouge-vif);
  outline-offset: 2px;
  border-radius: 10px;
}

.faq details p {
  margin: 0;
  padding: 0 4px 22px;
  max-width: 62ch;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--encre-2);
}

.chapo-faq a,
.faq details a {
  color: var(--encre);
  text-decoration: underline;
  text-decoration-color: rgb(255 255 255 / 0.3);
  text-underline-offset: 3px;
}

@media (max-width: 900px) {
  .verif-faq {
    grid-template-columns: 1fr;
  }
}
