/* Compléments au CSS Divi d'origine : remplacent ce que faisait le JavaScript
   de Divi/WordPress, et ajoutent accessibilité, Actusnews et graphiques. */

/* Lien d'évitement */
.pj-skip-link { position: absolute; left: 1rem; top: -100px; z-index: 100000; background: #000; color: #fff; padding: .6rem 1rem; }
.pj-skip-link:focus { top: 1rem; color: #fff; }
:focus-visible { outline: 2px solid #c90c0f; outline-offset: 2px; }

/* Contenus « multi-vues » Divi (version téléphone distincte) */
.pj-view-phone { display: none; }
@media (max-width: 767px) {
  .pj-view-phone { display: block; }
  .pj-view-desktop { display: none; }
}

/* Menu mobile (bouton au lieu du span Divi) */
.et_pb_menu .mobile_menu_bar { cursor: pointer; }
.et_pb_menu .mobile_nav .et_mobile_menu { display: none; }
.et_pb_menu .mobile_nav.opened .et_mobile_menu { display: block; }
.pj-lang-switch img { vertical-align: middle; }

/* Diaporamas : seule la diapositive active est affichée */
.et_pb_slider .et_pb_slides .et_pb_slide { display: none; }
.et_pb_slider .et_pb_slides .et_pb_slide.et-pb-active-slide { display: list-item; animation: pj-fade .6s ease; }
@keyframes pj-fade { from { opacity: 0; } to { opacity: 1; } }

/* Accordéons */
.et_pb_toggle_close .et_pb_toggle_content { display: none; }
.et_pb_toggle_open .et_pb_toggle_content { display: block; }
.et_pb_toggle_title { cursor: pointer; }

/* Vidéos YouTube */
.et_pb_video_box iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; display: block; }
.et_pb_video_overlay { cursor: pointer; }

/* Vidéo d'accueil */
video.dt-video { display: block; width: 100%; max-width: 100%; height: auto; }

/* Graphiques financiers (D3) */
.poujoulat-chart { width: 100%; height: 400px; }
.poujoulat-chart svg { display: block; max-width: 100%; }

/* Carrousel de logos (anciennement Divi Squad) */
.pj-carousel { overflow: hidden; -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent); }
.pj-carousel-track { display: flex; align-items: center; gap: 3rem; list-style: none; margin: 0; padding: 1rem 0; width: max-content; }
.pj-carousel-track.is-animated { animation: pj-scroll 40s linear infinite; }
.pj-carousel:hover .pj-carousel-track { animation-play-state: paused; }
.pj-carousel-track li { flex: none; padding: 0 !important; }
.pj-carousel-track img { height: 80px; width: auto; max-width: 220px; object-fit: contain; }
@keyframes pj-scroll { to { transform: translateX(-50%); } }

/* Actusnews (HTML fourni par poujoulat.actusnews.com, nettoyé côté serveur) */
.actusnews { margin-block: 1rem 2rem; }
.actusnews .act_moteur { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; margin: 0 0 1.5rem; padding: 0; }
.actusnews .act_moteur li { padding: 0; }
.actusnews .act_moteur a { display: inline-block; padding: .35rem .9rem; border: 1px solid #ddd; border-radius: 999px; text-decoration: none; font-weight: 600; color: #000; }
.actusnews .act_moteur .act_li_actif a, .actusnews .act_moteur a:hover { background: #c90c0f; border-color: #c90c0f; color: #fff; }
.actusnews details { border-top: 1px solid #e5e5e5; }
.actusnews summary { cursor: pointer; padding: 1rem 0; font-weight: 700; color: #000; }
.actusnews .comunique { position: relative; min-height: 96px; padding: 1rem 0 1rem 84px; border-bottom: 1px solid #eee; }
.actusnews .comunique strong { display: block; color: #000; }
.actusnews .file-IMAGE_PDF img { position: absolute; left: 0; top: 1rem; width: 64px; height: auto; border: 1px solid #eee; }
.actusnews .comunique p { margin: .35rem 0 0; padding: 0; }
.actusnews .comunique p:empty, .actusnews .clr, .actusnews .et_pb_divider { display: none; }
.actusnews a.pdf { font-weight: 700; color: #c90c0f; }
.actusnews .size { color: #777; font-size: .85em; }
.act-copyright { display: flex; gap: 1rem; align-items: center; max-width: 640px; margin: 2rem auto 0; padding: .75rem; border: 2px solid #139dd9; font-size: 12px; line-height: 1.45; }
.act-copyright img { width: 90px; height: auto; flex: none; }
.act-copyright p { margin: 0 0 .35rem; padding: 0; }
.actusnews-fallback { background: #f4f4f4; padding: 1.25rem; }
