/* ==========================================================================
   Conextivity : listings (News, Careers)
   Le style des cartes, titres, pastilles et sections est réglé dans Elementor.
   Ce fichier ne contient que ce qu'Elementor ne peut pas gérer :
   - le pied de carte (réagit au survol de la carte, icône + ou flèche selon le lien) ;
   - les formulaires générés par les shortcodes [cnx_year_filter] et [cnx_careers_search].
   ========================================================================== */

:root {
  --cnx-navy: var(--e-global-color-primary, #003057);
  --cnx-white: #fff;
  --cnx-muted: rgba(255, 255, 255, 0.72);
  --cnx-line: rgba(255, 255, 255, 0.14);
  --cnx-line-strong: rgba(255, 255, 255, 0.38);
  --cnx-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* Carte : accessibilité clavier --------------------------------------------- */

.cnx-card:focus-visible {
  outline: 2px solid var(--cnx-white);
  outline-offset: 3px;
}

/* Pied de carte -------------------------------------------------------------- */

.cnx-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 18px;
  margin-top: 8px;
  border-top: 1px solid var(--cnx-line);
  font-size: 14px;
  font-weight: 500;
  color: var(--cnx-white);
}

.cnx-card__icon {
  position: relative;
  flex: none;
  width: 42px;
  height: 42px;
  color: var(--cnx-white);
  border: 1px solid var(--cnx-line-strong);
  border-radius: 50%;
  transition: background-color 0.4s var(--cnx-ease), border-color 0.4s var(--cnx-ease), color 0.4s var(--cnx-ease);
}

.cnx-card__icon::before,
.cnx-card__icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 1.5px;
  background-color: currentColor;
  transform: translate(-50%, -50%);
  transition: transform 0.4s var(--cnx-ease);
}

.cnx-card__icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.cnx-card:hover .cnx-card__icon,
.cnx-card:focus-visible .cnx-card__icon {
  color: var(--cnx-navy);
  background-color: var(--cnx-white);
  border-color: var(--cnx-white);
}

.cnx-card:hover .cnx-card__icon::before,
.cnx-card:focus-visible .cnx-card__icon::before {
  transform: translate(-50%, -50%) rotate(90deg);
}

.cnx-card:hover .cnx-card__icon::after,
.cnx-card:focus-visible .cnx-card__icon::after {
  transform: translate(-50%, -50%) rotate(180deg);
}

/* Offre Fischer Connectors (lien externe) : flèche et libellé dédié */
.cnx-card:not([href^="#"]) .cnx-card__icon::after {
  display: none;
}

.cnx-card:not([href^="#"]) .cnx-card__icon::before {
  width: 14px;
  height: 14px;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17 17 7M8 7h9v9'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17 17 7M8 7h9v9'/%3E%3C/svg%3E") center / contain no-repeat;
}

.cnx-card:not([href^="#"]):hover .cnx-card__icon::before,
.cnx-card:not([href^="#"]):focus-visible .cnx-card__icon::before {
  transform: translate(-35%, -65%);
}

.cnx-card[href^="#"] .cnx-card__cta--external,
.cnx-card:not([href^="#"]) .cnx-card__cta--popup {
  display: none;
}

/* Formulaires des shortcodes --------------------------------------------------
   Sélecteurs volontairement plus précis que custom-reset.css (input[type=search]…). */

.cnx-filter {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
  margin: 0;
}

.cnx-filter input.cnx-filter__input,
.cnx-filter select.cnx-filter__select {
  -webkit-appearance: none;
  appearance: none;
  height: 48px;
  margin: 0;
  padding: 0 22px;
  font-family: inherit;
  font-size: 15px;
  line-height: 48px;
  color: var(--cnx-white);
  background-color: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--cnx-line-strong);
  border-radius: 999px;
  transition: border-color 0.25s, background-color 0.25s;
}

.cnx-filter input.cnx-filter__input {
  width: 320px;
  max-width: 100%;
}

.cnx-filter input.cnx-filter__input::placeholder {
  color: var(--cnx-muted);
}

.cnx-filter select.cnx-filter__select {
  width: auto;
  min-width: 180px;
  padding-right: 48px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 20px center;
  background-size: 14px;
}

.cnx-filter select.cnx-filter__select option {
  color: var(--cnx-navy);
}

.cnx-filter input.cnx-filter__input:hover,
.cnx-filter input.cnx-filter__input:focus,
.cnx-filter select.cnx-filter__select:hover,
.cnx-filter select.cnx-filter__select:focus {
  outline: none;
  border-color: var(--cnx-white);
  background-color: rgba(255, 255, 255, 0.1);
}

.cnx-filter button.cnx-filter__submit {
  height: 48px;
  padding: 0 24px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--cnx-navy);
  background-color: var(--cnx-white);
  border: 1px solid var(--cnx-white);
  border-radius: 999px;
  transition: background-color 0.25s, color 0.25s;
}

.cnx-filter button.cnx-filter__submit:hover,
.cnx-filter button.cnx-filter__submit:focus-visible {
  color: var(--cnx-white);
  background-color: transparent;
}

.cnx-filter a.cnx-filter__clear {
  font-size: 14px;
  white-space: nowrap;
  color: var(--cnx-muted);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.cnx-filter a.cnx-filter__clear:hover {
  color: var(--cnx-white);
}

@media (max-width: 767px) {
  .cnx-filter {
    flex-wrap: wrap;
  }

  .cnx-filter input.cnx-filter__input {
    flex: 1 1 200px;
    width: auto;
  }
}

/* Popups : bouton de fermeture --------------------------------------------
   Couleurs, taille de l'icône et position réglées dans Elementor (onglet Style du popup).
   Elementor ne propose pas de forme ronde ni de taille de zone cliquable. */

.elementor-popup-modal .dialog-close-button {
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin: 12px 12px 0 0;
  border-radius: 50%;
  box-shadow: 0 6px 16px rgba(0, 20, 36, 0.3);
  transition: background-color 0.25s, transform 0.25s var(--cnx-ease);
}

.elementor-popup-modal .dialog-close-button:hover,
.elementor-popup-modal .dialog-close-button:focus-visible {
  transform: rotate(90deg);
}

.elementor-popup-modal .dialog-close-button:focus-visible {
  outline: 2px solid var(--cnx-navy);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .elementor-popup-modal .dialog-close-button,
  .cnx-card__icon,
  .cnx-card__icon::before,
  .cnx-card__icon::after {
    transition: none;
  }
}
/* Chaîne de la connectivité (accueil) ------------------------------------
   Widget HTML « cnx-rail » : 4 nœuds alignés sur les 4 colonnes des étapes,
   reliés par un tracé qui évolue (droit, courbe, onde, montée).
   Un signal parcourt la chaîne et allume chaque nœud à son passage (cycle de 4,8 s). */

.cnx-rail {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  column-gap: 32px; /* identique à l'écart entre les colonnes Elementor */
}

.cnx-rail__cell {
  display: flex;
  align-items: center;
  min-width: 0;
}

.cnx-rail__node {
  flex: none;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  color: #8cc4e8;
  border: 1px solid rgba(140, 196, 232, 0.4);
  border-radius: 50%;
  animation: cnx-rail-node 4.8s ease-out var(--d, 0s) infinite;
}

.cnx-rail__node svg {
  width: 26px;
  height: 26px;
}

.cnx-rail__link {
  flex: 1;
  height: 56px;
  margin-right: -32px; /* le tracé traverse l'écart jusqu'au nœud suivant */
  overflow: visible;
}

.cnx-rail__cell:last-child .cnx-rail__link {
  margin-right: 0;
}

.cnx-rail__base {
  fill: none;
  stroke: rgba(140, 196, 232, 0.35);
  stroke-width: 1;
}

.cnx-rail__pulse {
  fill: none;
  stroke: #8cc4e8;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 12 120;
  stroke-dashoffset: 12;
  animation: cnx-rail-pulse 4.8s linear var(--d, 0s) infinite;
}

@keyframes cnx-rail-pulse {
  0% { stroke-dashoffset: 12; }
  25%, 100% { stroke-dashoffset: -100; }
}

@keyframes cnx-rail-node {
  0%, 22%, 100% {
    border-color: rgba(140, 196, 232, 0.4);
    box-shadow: 0 0 0 0 rgba(140, 196, 232, 0);
  }
  5% {
    border-color: #8cc4e8;
    box-shadow: 0 0 0 6px rgba(140, 196, 232, 0.12);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cnx-rail__node,
  .cnx-rail__pulse {
    animation: none;
  }

  .cnx-rail__pulse {
    display: none;
  }
}