/* Sélecteur de langue avec globe en haut à gauche */
.i18n-switcher {
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  font-family: system-ui, -apple-system, Roboto, Arial, sans-serif;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.i18n-switcher.visible {
  opacity: 1;
  visibility: visible;
}

/* Bouton globe */
.i18n-globe {
  appearance: none;
  border: none;
  cursor: pointer;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #f5f5f5;
  padding: 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
  user-select: none;
  position: relative;
}

.i18n-globe::before {
  content: '';
  position: absolute;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: white;
  z-index: 0;
}

.i18n-globe svg {
  position: relative;
  z-index: 1;
  color: #4a4a4a;
  width: 20px;
  height: 20px;
}

.i18n-globe:hover {
  background: #e8e8e8;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
  transform: scale(1.02);
}

.i18n-globe:active {
  transform: scale(0.98);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Menu déroulant */
.i18n-menu {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: rgba(255, 255, 255, 0.95);
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  padding: 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  min-width: 60px;
  margin-top: 8px;
}

/* Options de langue */
.i18n-option {
  appearance: none;
  border: none;
  cursor: pointer;
  background: transparent;
  color: #1b1b1b;
  padding: 8px 12px;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.5px;
  border-radius: 6px;
  transition: all 0.2s ease;
  text-align: center;
  min-width: 50px;
}

.i18n-option:hover {
  background: rgba(0, 0, 0, 0.05);
}

.i18n-option.active {
  background: #007AFF;
  color: #ffffff;
  font-weight: 700;
}

/* Positionnement dans le footer en bas à gauche pour site.html */
.site-page footer,
footer {
  position: relative;
}

.site-page footer .i18n-switcher,
footer .i18n-switcher,
.site-page .i18n-switcher,
body.site-page .i18n-switcher {
  position: absolute;
  top: auto;
  bottom: 20px;
  left: 20px;
  right: auto;
  align-items: flex-start;
  z-index: 9999;
}

/* Menu déroulant vers le haut sur site.html */
.site-page .i18n-menu,
body.site-page .i18n-menu {
  margin-top: 0;
  margin-bottom: 8px;
  order: -1;
}

/* Mobile */
@media (max-width: 768px) {
  .i18n-switcher {
    top: 10px;
    right: 10px;
    left: auto;
    align-items: flex-end;
  }
  
  /* Sur mobile, garder en haut à droite même sur site.html */
  .site-page .i18n-switcher,
  body.site-page .i18n-switcher {
    top: 10px;
    bottom: auto;
    left: auto;
    right: 10px;
    align-items: flex-end;
  }
  
  .site-page .i18n-menu,
  body.site-page .i18n-menu {
    margin-top: 8px;
    margin-bottom: 0;
    order: 0;
  }
  
  .i18n-globe {
    width: 44px;
    height: 44px;
  }
  
  .i18n-globe::before {
    width: 36px;
    height: 36px;
  }
  
  .i18n-globe svg {
    width: 20px;
    height: 20px;
  }
  
  .i18n-menu {
    min-width: 55px;
    padding: 5px;
  }
  
  .i18n-option {
    padding: 6px 10px;
    font-size: 12px;
  }
}

