/* =====================================================
   CYBERFOLIO 2.0 — STYLES SPÉCIFIQUES À "CONTACT & FAQ"
   (n'impacte pas style.css global ; complète les classes
   .glass, .reveal, .btn-glow déjà définies)
   ===================================================== */

/* ---------------------------------------------------
   ACCORDÉON FAQ
   Les réponses sont strictement masquées par défaut
   (max-height: 0 + overflow: hidden) et ne s'ouvrent
   qu'au clic, via une hauteur exacte calculée en JS
   (contact.js) pour une transition fluide et fiable.
--------------------------------------------------- */
.faq-item {
  transition: border-color 0.3s ease, background 0.3s ease;
}
.faq-item:has(.faq-question[aria-expanded="true"]) {
  border-color: rgba(34, 211, 238, 0.3);
}

.faq-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Flèche de l'accordéon */
.faq-chevron {
  transition: transform 0.3s ease;
  flex-shrink: 0;
}
.faq-question[aria-expanded="true"] .faq-chevron {
  transform: rotate(180deg);
  color: #22D3EE;
}

/* ---------------------------------------------------
   VALIDATION DU FORMULAIRE (côté client, contact.js)
   Le formulaire porte l'attribut "novalidate" : la validation
   native du navigateur est désactivée au profit de cette
   validation JS, qui affiche un message précis sous chaque
   champ concerné plutôt qu'une bulle générique du navigateur.
--------------------------------------------------- */
.field-invalid {
  border-color: rgba(248, 113, 113, 0.55) !important;
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.14) !important;
}
.field-error {
  margin-top: 0.45rem;
  font-size: 0.78rem;
  line-height: 1.3;
  color: #FCA5A5;
  font-family: 'JetBrains Mono', monospace;
}

/* Bouton d'envoi désactivé pendant la soumission */
#contact-submit-btn:disabled {
  transform: none;
  box-shadow: none;
}
#contact-submit-icon.is-spinning {
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------
   CHAMP HONEYPOT (anti-spam, invisible pour un humain)
   Positionnement hors écran plutôt que display:none :
   certains robots ignorent volontairement les champs
   display:none, ce qui rendrait le piège inefficace.
--------------------------------------------------- */
.honeypot-field {
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}
