/*
 * Styles pour le bloc FAQ FRS (frs-faq-block) et ses items (frs-faq-item).
 * Préparé pour l'animation JavaScript.
 */

/* Conteneur global du bloc FAQ */
.frs-faq-block {
    /* margin-bottom: 2em; */
  }
  
  /* Style pour chaque item Q/R */
  .frs-faq-item {
    border-bottom: 1px solid var(--ast-global-color-0);
  }
  .frs-faq-item:last-child {
    border-bottom: none;
  }
  
  /* Style pour la question (élément <summary>) */
  .frs-faq-item__question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .5rem .5rem;
    cursor: pointer;
    list-style: none; /* Cache le marqueur <details> par défaut */
    font-weight: bold;
    transition: background-color 0.2s ease;
    position: relative; /* Pour s'assurer qu'il est au-dessus du marqueur caché */
  }
  .frs-faq-item__question:hover {
    background-color: #f8f8f8;
  }
  
  /* Cache le marqueur par défaut de <details> */
  .frs-faq-item__question::marker,
  .frs-faq-item__question::-webkit-details-marker {
    display: none;
    content: '';
  }
  
  /* Conteneur pour le texte de la question */
  .frs-faq-item__question-text {
    margin-right: 1rem;
  }
  
  /* Conteneur de l'icône (le span autour du SVG) */
  .frs-faq-item__icon {
    display: inline-flex;
    flex-shrink: 0;
    width: 50px;
    height: 50px;
  }
  
  /* Style du SVG lui-même (pour la taille et la transition de rotation) */
  .frs-faq-item__icon svg {
    width: 80%;
    height: 80%;
    /* La transition pour la rotation est maintenant gérée par #fleche */
  }
  
  /* Style du cercle de fond (#rond) */
  .frs-faq-item__icon svg #rond {
    fill: var(--ast-global-color-0); /* Couleur bleue par défaut */
    transition: fill 0.3s ease-in-out; /* Animation du changement de couleur */
  }
  
  /* Style de la flèche (#fleche) */
  .frs-faq-item__icon svg #fleche {
    fill: #ffffff;
    transform-origin: center center;
    transition: transform 0.3s ease-in-out; /* Animation de la rotation */
  }
  
  
  /* Styles lorsque l'accordéon est OUVERT (basé sur l'attribut 'open') */
  /* Le JS ajoutera/retirera cet attribut */
  .frs-faq-item__details[open] > .frs-faq-item__question .frs-faq-item__icon svg #rond {
    fill: var(--ast-global-color-1); /* Couleur verte lorsque ouvert */
  }
  
  .frs-faq-item__details[open] > .frs-faq-item__question .frs-faq-item__icon svg #fleche {
    transform: rotate(90deg); /* Rotation de la flèche vers le bas */
  }
  
  /* Style pour la réponse (le contenu de <details>) */
  .frs-faq-item__answer {
    /* Retrait des transitions max-height et opacity */
    overflow: hidden; /* Essentiel pour l'animation JS de hauteur */
    /* Initialement caché par JS ou hauteur 0 */
    /* height: 0; */ /* On pourrait le mettre ici, mais JS le gérera */
    padding-left: 1rem; /* Garder le padding latéral */
    padding-right: 1rem;
    /* Le padding top/bottom sera animé par JS si besoin, ou ajouté quand visible */
    box-sizing: border-box;
  }
  
  /* Styles pour les blocs internes */
  .frs-faq-item__answer > .block-editor-inner-blocks > .block-editor-block-list__layout { }
  .frs-faq-item__answer > div[data-block] { margin-bottom: 1em; }
  .frs-faq-item__answer > div[data-block]:last-child { margin-bottom: 0; }
  
  /* Classe utilitaire pour l'animation (optionnel, mais peut aider) */
  .frs-faq-item__answer.is-animating {
      /* On pourrait ajouter des styles pendant l'animation si nécessaire */
  }
  
  