/* ── Bouton intégré dans la nav ───────────────────────────────── */
.lang-nav-trigger {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  color: #ffffff;
  padding: 4px 10px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: background 0.2s, border-color 0.2s;
  user-select: none;
  white-space: nowrap;
}

.lang-nav-trigger:hover {
  background: rgba(255,255,255,0.22);
  border-color: rgba(255,255,255,0.5);
}

.lang-trigger-flag  { font-size: 16px; line-height: 1; }
.lang-trigger-code  { font-size: 11px; font-weight: 700; text-transform: uppercase; }
.lang-trigger-chevron {
  width: 10px; height: 10px;
  opacity: 0.7;
  flex-shrink: 0;
}

/* ── Bouton flottant (pages sans nav) ────────────────────────── */
.lang-float-trigger {
  position: fixed;
  top: 16px;
  right: 16px;
  background: #32413B;
  color: #F7F4ED;
  padding: 8px 10px;
  border-radius: 30px;
  box-shadow: 0 4px 16px rgba(50, 65, 59, 0.30);
  border: none;
  cursor: pointer;
  z-index: 9996;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  transition: transform 0.2s, box-shadow 0.2s;
  user-select: none;
  animation: slideInBottom 0.4s ease-out;
}

.lang-float-trigger:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(50, 65, 59, 0.35);
}

.lang-float-trigger:active { transform: translateY(0); }

.lang-trigger-globe { width: 16px; height: 16px; flex-shrink: 0; }
.lang-float-trigger .lang-trigger-code { font-size: 12px; letter-spacing: 0.04em; }

.lang-trigger-label { font-size: 13px; font-weight: 600; }

@keyframes slideInBottom {
  from { transform: translateY(60px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* ── Overlay ──────────────────────────────────────────────────── */
.lang-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(30, 40, 35, 0.55);
  z-index: 10000;
  padding: 20px;
  overflow-y: auto;
  backdrop-filter: blur(3px);
}

.lang-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Modal card ───────────────────────────────────────────────── */
.lang-modal-content {
  background: #ffffff;
  border-radius: 20px;
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(30, 40, 35, 0.25);
  animation: scaleIn 0.2s ease-out;
}

@keyframes scaleIn {
  from { transform: scale(0.93); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}

/* ── Header ───────────────────────────────────────────────────── */
.lang-modal-header {
  background: #32413B;
  color: #F7F4ED;
  padding: 18px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 20px 20px 0 0;
}

.lang-modal-header h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.lang-close-btn {
  background: rgba(247, 244, 237, 0.15);
  border: none;
  color: #F7F4ED;
  font-size: 24px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  line-height: 1;
  padding: 0;
}

.lang-close-btn:hover { background: rgba(247, 244, 237, 0.25); }

/* ── Body ─────────────────────────────────────────────────────── */
.lang-modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
  background: #F7F4ED;
}

/* ── Grid ─────────────────────────────────────────────────────── */
.lang-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
}

.lang-item {
  background: #ffffff;
  border: 1.5px solid #dedad2;
  border-radius: 12px;
  padding: 11px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.lang-item:hover {
  border-color: #8EA688;
  background: rgba(142, 166, 136, 0.06);
  transform: translateY(-1px);
}

.lang-item:active { transform: translateY(0); }

.lang-item.active {
  background: rgba(50, 65, 59, 0.06);
  border-color: #32413B;
}

.lang-flag  { font-size: 22px; line-height: 1; }
.lang-name  { font-size: 14px; font-weight: 600; color: #32413B; flex: 1; }
.lang-check { color: #8EA688; font-size: 16px; font-weight: 700; }

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 480px) {
  .lang-bubble-text { display: none; }
  .lang-bubble-closed {
    width: 42px; height: 42px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
  }
  .lang-grid { grid-template-columns: 1fr 1fr; }
}
