/* ===== WACC — base + icônes SVG + hover neutralisé ===== */

/* Variables par défaut (peuvent être surchargées via les contrôles Elementor) */
.wacc { --wacc-title-color: #1F2A44; }

/* Grille 2 colonnes */
.wacc{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
  width: 100%;
}

/* --- Colonne gauche --- */
.wacc-left .wacc-item{ border-bottom: 1px solid #ECECEC; }

.wacc-header{
  appearance: none;
  background: transparent;
  border: 0;
  width: 100%;
  padding: 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  text-align: left;
}

/* Neutraliser tout hover/focus “bleu foncé” imposé par le thème */
.wacc-header:hover,
.wacc-header:focus{ background: transparent !important; }
.wacc-header:hover .wacc-title,
.wacc-header:focus .wacc-title,
.wacc-item:hover .wacc-title{
  color: var(--wacc-title-color) !important;
}

/* Titre */
.wacc-title{
  font-size: 28px;
  line-height: 1.2;
  font-weight: 600;
  color: var(--wacc-title-color);
}

/* Icônes SVG (fermé / ouvert) */
.wacc-icon{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  font-size: 18px;   /* contrôlable dans Elementor */
  color: #F26E21;    /* contrôlable dans Elementor */
}
.wacc-icon .icon-open{ display: none; }
.wacc-item.open .wacc-icon .icon-open{ display: inline-flex; }
.wacc-item.open .wacc-icon .icon-closed{ display: none; }

/* Panneau (affiché/masqué par JS) */
.wacc-panel{ display: none; }
.wacc-item.open .wacc-panel{ display: block; }
.wacc-text{
  font-size: 16px;
  line-height: 1.6;
  color: #334155;
  padding: 4px 0 24px;
}

/* --- Colonne droite (image active) --- */
.wacc-right .wacc-image img{
  display: block;
  width: 100%;   /* la “jauge” Elementor pourra surcharger cette valeur (%, px) */
  height: auto;
  border-radius: 6px;  /* contrôlable */
}

/* Sticky opt-in */
.wacc.wacc--sticky .wacc-right{ position: sticky; top: 20px; }

/* Responsive */
@media (max-width: 992px){
  .wacc{ grid-template-columns: 1fr; }
  .wacc-title{ font-size: 22px; }
}

/* Patch overlay Elementor (autorise les clics dans l’éditeur) */
.elementor-editor-active .elementor-element:has(.wacc) > .elementor-element-overlay{
  pointer-events: none !important;
}
/* Fallback si :has() n'est pas supporté :
.elementor-editor-active .elementor-element[data-widget_type="widget-accordion-image.default"] > .elementor-element-overlay{
  pointer-events: none !important;
}
*/


/* MAJ Responsive */ 

/* Image inline cachée par défaut (desktop) */
.wacc-image-inline{ display:none; }

/* Responsive : le contenu passe en 1 colonne et l'image vit sous le texte */
@media (max-width: 1024px){
  .wacc{
    grid-template-columns: 1fr !important;
    gap: 20px;
  }

  /* on masque la colonne d'image de droite en mobile */
  .wacc-right{ display:none !important; }
  .wacc.wacc--sticky .wacc-right{ position:static !important; top:auto !important; }

  /* on montre l'image inline sous le texte du panneau ouvert */
  .wacc-image-inline{
    display:block;
    margin: 12px 0 20px;
  }

  /* style de l'image inline = même rendu que la colonne droite */
  .wacc-image-inline img{
    display:block;
    width:100%;
    height:auto;
    border-radius: 6px; /* sera écrasé par le contrôle si besoin */
  }
}
