/* =========================================================
   Gestion Client v0.4.13 — Correctifs ciblés
   - Renouvellements : reflow mobile en une seule colonne
   - Langue : menu FR/EN aligné sous le bouton, même largeur
   Aucun changement de palette, de calcul ou de logique métier.
   ========================================================= */

/* Sélecteur de langue : le menu hérite exactement de la largeur du bouton. */
.avsg-gc-app .gc-language-menu {
  position: relative;
  width: max-content;
  min-width: 58px;
}

.avsg-gc-app .gc-language-menu > .gc-language {
  width: 100% !important;
  min-width: 58px !important;
}

.avsg-gc-app .gc-language-dropdown {
  box-sizing: border-box;
  top: calc(100% + 5px) !important;
  left: 0 !important;
  right: auto !important;
  width: 100% !important;
  min-width: 100% !important;
  max-width: 100% !important;
  padding: 4px !important;
}

.avsg-gc-app .gc-language-dropdown a {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  padding: 0 6px;
  justify-content: center;
  text-align: center;
}

/* Renouvellements : le panneau latéral ne doit jamais comprimer la liste
   sur tablette/mobile. Il passe sous la liste en pleine largeur. */
@media (max-width: 1050px) {
  .avsg-gc-app .gc-renewal-layout {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 16px !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .avsg-gc-app .gc-renewal-groups,
  .avsg-gc-app .gc-renewal-list,
  .avsg-gc-app .gc-renewal-empty,
  .avsg-gc-app .gc-automation-card {
    box-sizing: border-box;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .avsg-gc-app .gc-automation-card {
    position: static !important;
    top: auto !important;
  }
}

@media (max-width: 620px) {
  .avsg-gc-app .gc-language-menu {
    width: 44px !important;
    min-width: 44px !important;
  }

  .avsg-gc-app .gc-language-menu > .gc-language {
    width: 44px !important;
    min-width: 44px !important;
  }

  .avsg-gc-app .gc-language-dropdown {
    width: 44px !important;
    min-width: 44px !important;
    max-width: 44px !important;
  }

  .avsg-gc-app .gc-renewal-layout {
    gap: 14px !important;
  }

  .avsg-gc-app .gc-renewal-item {
    grid-template-columns: 47px minmax(0, 1fr) !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 13px 14px !important;
  }

  .avsg-gc-app .gc-renewal-main,
  .avsg-gc-app .gc-renewal-side {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .avsg-gc-app .gc-renewal-main small {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    overflow-wrap: anywhere;
  }

  .avsg-gc-app .gc-renewal-side {
    grid-column: 2 !important;
    text-align: left !important;
    justify-items: start !important;
    grid-auto-flow: column !important;
    justify-content: start !important;
    align-items: center !important;
    gap: 9px !important;
  }
}
