    body { margin: 0; font-family: sans-serif; background: #fcfcfc; font-size: 16px;}
body {
  font-family: 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(to bottom, #f9f9f9, #eaeaea);
  color: #333;
}


button {
  background: linear-gradient(to right, #0078d7, #005fa3);
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

button:hover {
  background: #005fa3;
}

select {
  padding: 10px 14px;
  font-size: 1em;
  border-radius: 8px;
  border: 1px solid #ccc;
  background-color: #f5f5f5;
  color: #333;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2210%22%20height%3D%227%22%20viewBox%3D%220%200%2010%207%22%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%3E%3Cpath%20d%3D%22M0%200l5%207%205-7z%22%20fill%3D%22%23333%22/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 10px 7px;
}

select {
  transition: all 0.2s ease-in-out;
}

select:focus {
  border-color: #0078d7;
  box-shadow: 0 0 0 2px rgba(0,120,215,0.3);
  outline: none;
}

#main-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 12px;
  padding-bottom: 70px; /* espace réservé à la bannière publicitaire */
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}

#entete {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #006da6;
  color: white;
  padding: 12px 20px;
  font-family: sans-serif;
  height: 30px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

#filtres {
  background: #fff;
  padding: 12px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
#filtres {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

#filtres label {
  flex: 1 1 45%;
  display: flex;
  flex-direction: column;
  min-width: 100px;
}

#filtres select {
  margin-top: 6px;
  padding: 10px;
  font-size: 1em;
  border-radius: 8px;
  border: 1px solid #ccc;
  background-color: #f5f5f5;
  color: #333;
  width: 100%;
  box-sizing: border-box;
}

#favoriIcon {
  transition: color 0.2s;
  user-select: none;
}

#favoriIcon.favori {
  color: gold;
}

#toggleAffichageIcon {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 10;
  cursor: pointer;
  font-size: 1.6em;
  color: #666;
  transition: color 0.2s;
}

#toggleAffichageIcon:hover {
  color: #0078d7;
}

#favoriIcon {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10;
  cursor: pointer;
  font-size: 1.8em;
  color: gold;
  transition: color 0.2s;
}
    #slideImage { display: block; width: 100%; max-width: 100%; height: auto; margin: 18px 0 10px 0; border-radius: 8px; box-shadow: 0 2px 10px 0 #0001;}
#hanziDisplay {
  display: none;
  font-size: 4em; /* Ajuste selon la taille visuelle souhaitée */
  font-weight: 500;
  text-align: center;
  color: #222;
  margin: 0;
  padding: 15px 0; /* Espace au-dessus et en-dessous */
  border-radius: 8px;
  box-shadow: 0 2px 10px 0 #0001;
  background-color: #fff;
  border: 1px solid #ddd;
  min-height: 60px; /* Hauteur comparable à l’image 130 sur ordi et 85 pour tel*/
  display: flex;
  align-items: center;
  justify-content: center;
}

    #texteHan { min-height: 2.2em; display: block; font-size: 1.8em; margin-bottom: 0.7em; text-align: center; word-break: break-word;}
    #texteFr { min-height: 2.2em; display: block; font-size: 1.2em; margin-bottom: 0.7em; text-align: center; word-break: break-word;}
    .button-bar { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin: 18px 0 8px 0;}
    button { font-size: 1.05em; padding: 12px 19px; border-radius: 7px; border: none; background: #006da6; color: #fff; cursor: pointer; transition: background 0.2s;}
    button:active { background: #004b73; }
    input[type="checkbox"] { transform: scale(1.1); margin-right: 0.4em;}
    label { font-size: 1em; user-select: none;}
    @media (max-width: 600px) { body { font-size: 15px; } #main-container { padding: 3vw; } button { font-size: 1em; padding: 10px 12px;} }
    @media (max-width: 400px) { #main-container { padding: 1vw; } button { font-size: 0.93em; padding: 9px 7px;} }
@media (max-width: 480px) {
  select {
    width: 100%;
    font-size: 1em;
  }
}
@media (max-width: 480px) {
  #filtres {
    flex-direction: row; /* Garder en ligne même sur mobile */
    flex-wrap: wrap;     /* Permet de s’adapter si trop serré */
  }

  #filtres label {
    flex: 1 1 48%; /* Ajustement pour tenir à deux */
    min-width: 100px;
  }
}

.switch {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 1em;
  user-select: none;
  margin-top: 16px; 
}

.switch input {
  display: none;
}

.slider {
  position: relative;
  width: 50px;
  height: 26px;
  background-color: #ccc;
  border-radius: 50px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.slider::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background-color: white;
  border-radius: 50%;
  transition: transform 0.2s;
}

.switch input:checked + .slider {
  background-color: #006da6;
}

.switch input:checked + .slider::before {
  transform: translateX(24px);
}

.switch-label {
  flex: 1;
}
