/* LOT 11 — sélecteur de langue ShareWin (Français / English).
   Palette validée : vert #0B5C34, jaune #FFD200, texte #0F172A. */

.sw-langue {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 4px 6px 4px 10px;
  border: 1px solid rgba(11, 92, 52, 0.25);
  border-radius: 14px;
  background: #ffffff;
  color: #0f172a;
  font: inherit;
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
}

.sw-langue:focus-within {
  outline: 2px solid #ffd200;
  outline-offset: 2px;
}

.sw-langue-ico {
  width: 16px;
  height: 16px;
  flex: none;
  fill: none;
  stroke: #0b5c34;
  stroke-width: 1.8;
  stroke-linecap: round;
}

/* Libellé lisible par les lecteurs d'écran, masqué visuellement. */
.sw-langue-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.sw-langue-select {
  min-height: 32px;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.sw-langue-select:focus {
  outline: none;
}

.sw-langue-ok {
  padding: 4px 8px;
  border: 0;
  border-radius: 10px;
  background: #0b5c34;
  color: #ffffff;
  font: inherit;
  cursor: pointer;
}

/* Sur fond sombre (barres vertes des espaces connectés). */
.sw-langue--clair {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.sw-langue--clair .sw-langue-ico {
  stroke: #ffd200;
}

.sw-langue--clair .sw-langue-select option {
  color: #0f172a;
}

/* Barre du haut des pages de connexion : sélecteur + lien d'aide côte à côte. */
.sw-langue-groupe {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

@media (max-width: 480px) {
  .sw-langue {
    padding: 3px 4px 3px 8px;
    font-size: 12px;
  }

  .sw-langue-select {
    min-height: 30px;
  }
}

/* Proposition de la langue du navigateur (jamais appliquée d'office). */
.sw-langue-suggestion {
  display: inline-flex;
  margin: 0;
}

.sw-langue-suggestion-btn {
  min-height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 14px;
  background: #ffd200;
  color: #0f172a;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.sw-langue-suggestion-btn:focus-visible {
  outline: 2px solid #0b5c34;
  outline-offset: 2px;
}

/* ── Téléphone et tablette (≤ 768 px, 11/11/2026) : bouton compact « FR » dans l'en-tête ── */
.sw-langue-compact {
  display: none;
  position: relative;
  flex: none;
}

.sw-langue-compact-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 44px;
  min-height: 44px;
  padding: 0 8px;
  box-sizing: border-box;
  border: 1px solid rgba(11, 92, 52, 0.25);
  border-radius: 12px;
  background: #ffffff;
  color: #0f172a;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.sw-langue-compact-btn:focus-visible {
  outline: 2px solid #ffd200;
  outline-offset: 2px;
}

.sw-langue-compact-btn[aria-expanded="true"] {
  border-color: #0b5c34;
}

.sw-langue-compact-liste {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  min-width: 170px;
  margin: 0;
  padding: 6px;
  border: 1px solid #e4e7ec;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.16);
}

.sw-langue-compact-liste[hidden] {
  display: none;
}

.sw-langue-compact-choix {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #0f172a;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.sw-langue-compact-choix:hover,
.sw-langue-compact-choix:focus-visible {
  background: #f1f7f3;
  outline: none;
}

.sw-langue-compact-choix[aria-current="true"] {
  color: #0b5c34;
  font-weight: 800;
}

.sw-langue-compact-choix-code {
  font-size: 12px;
  color: #667085;
}

/* Sur fond sombre (menus latéraux verts). */
.sw-langue-compact--clair .sw-langue-compact-btn {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.sw-langue-compact--clair .sw-langue-ico {
  stroke: #ffd200;
}

.sw-langue-compact--clair .sw-langue-compact-liste {
  top: auto;
  bottom: calc(100% + 6px);
  left: 0;
  right: auto;
}

@media (max-width: 768px) {
  .sw-langue {
    display: none;
  }

  .sw-langue-compact {
    display: inline-flex;
  }

  /* La proposition « Switch to English » laisse la place au bouton (le choix reste dans la liste). */
  .sw-langue-suggestion {
    display: none;
  }
}