/* styles.css */

/* Centrer un élément iframe */
.centered-iframe {
  margin: 0 auto;
}

/* Style pour iPhone - Clavier */
.clavier {
  font-size: 1rem;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background-color: #fff;
  color: #666666;
}

.clavier:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}

/* Style pour iPhone - Champ de saisie personnalisé */
/* Style pour iPhone - Bouton */
.bouton-loupe-croix {
  /* background-color: #f5f5f5; */
	background: none;
  color: blue;
  border: none;
  padding: 10px;
  border-radius: 0px;
  cursor: pointer;
  margin-left: 0px;
  font-size: 18px; /* Taille de la police */
}

/* Style du textarea */
.textArea {
  width: 100%;
  /* min-height: 100px; */
  max-height: none; /* Supprime la restriction de hauteur maximale pour permettre l'ajustement dynamique */
  resize: none; /* Désactive le redimensionnement manuel */
  font-size: 18px;
  margin: 10px auto;
  display: block;
  border-radius: 4px;
  overflow-y: auto; /* Permet le défilement vertical */
  padding: 10px;
  box-sizing: border-box;
}

/* Champ personnalisé (fusion : conserve les valeurs les plus récentes) */
.custom-input {
  /* bloc initial fourni : */
  background-color: #f5f5f5;
  /* font-size: 18px; supprimé car plus récent = 16px */
  /* padding: 5px; remplacé par plus récent = 8px */
  border: 2px solid #ccc;
  border-radius: 4px;
  /* width: 100%; remplacé par plus récent = 80% */
  box-sizing: border-box;
  color: blue;

  /* bloc le plus récent : */
  font-size: 16px;
  margin: 10px auto;
  width: 80%;
  padding: 8px;
}

.custom-input:focus {
  font-size: 16px; /* Taille de la police */
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
  /* color: blue; */
}

.bouton {
  margin: 1px 4px;       /* Marge entre les boutons verticale 1px, horizontale 2px */
  padding: 1px 3px;      /* Légère respiration intérieure */
  font-size: 12px;       /* Taille du texte */
  cursor: pointer;
  color: blue;
}

/* Style pour le bouton activé */
.bouton.enabled {
  background-color: green; /* Couleur verte pour le bouton activé */
  color: white; /* Couleur du texte */
}

/* Style pour le bouton désactivé */
.bouton.disabled {
  background-color: gray; /* Couleur grise pour le bouton désactivé */
  color: white; /* Couleur du texte */
  cursor: not-allowed; /* Curseur pour indiquer que le bouton est désactivé */
}

.boutonOptionsProg {
  margin-bottom: 1px;
  font-size: 18px; /* Taille de la police */
  color: blue;
}

/* Style simple pour un bouton avec logo ou icône */
.bouton-logo {
  background-color: transparent; /* Fond transparent pour ne montrer que l'icône */
  border: none; /* Pas de bordure */
  cursor: pointer; /* Curseur pour indiquer qu'il est cliquable */
  padding: 0; /* Pas de padding pour que l'image/icone occupe tout l'espace */
  margin-left: 10px; /* Un léger espacement à gauche si nécessaire */
}

.bouton-logo img,
.bouton-logo i {
  width: 24px; /* Ajustez la taille de l'icône ou du logo */
  height: 24px; /* Assurez-vous que c'est carré si nécessaire */
  display: inline-block; /* Pour que l'icône ne déborde pas */
}

/* Barre d'annonce (fusion : conserve overflow + style plus récent) */
.annonce-container {
  overflow: hidden;
  background-color: #AFEEEE;
  text-align: center;
}

.annonce-bar {
  background-color: #e8e8e8;
  color: #000000;
  padding: 8px;
  text-align: center;
  font-size: 18px;
  white-space: nowrap;
  display: inline-block;
  animation: swingAnimation 10s linear infinite;
  transform-origin: center bottom;
}

@keyframes swingAnimation {
  0%, 100% {
    transform: translateX(0);
  }
  25%, 75% {
    transform: translateX(10%);
  }
  50% {
    transform: translateX(0);
  }
}

#IframePDF {
  display: none;
  width: 90%;
  height: 500px;
  border: none;
  border-radius: 0px;
  background-color: #e8e8e8; /* Couleur de fond */
  margin: 0; /* Ajuster les marges à 0 */
}

.Warsh {
  display: none;
  color: blue;
  cursor: pointer;
  margin: 0 auto;
}

/* Style pour les boutons radio décochés */
input[type="radio"]:not(:checked) + label {
  color: var(--grey-color);
  pointer-events: none;
}

/* Style pour aligner les boutons radio et les labels sur une seule ligne */
input[type="radio"],
label {
  display: inline-block;
  margin-right: 10px;
}

:root {
  --grey-color: #999;
}

#ProgrammeEnCours {
  background-color: white;
  color: #666666;
  padding: 8px;
  font-family: 'Arial', sans-serif;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  text-align: center;
}

@keyframes swing {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(180deg); }
  /*50% { transform: rotate(-180deg); }*/
}

.progress-bar-swing {
  animation: swing 2s infinite;
}

#cadreOptions {
  border: 1px solid #ccc;
  padding: 10px;
  margin: 10px;
}

#cadreOptions label {
  font-weight: bold;
  margin-bottom: 5px;
}

/* Trad.X */
h5 {
  cursor: pointer;
  color: blue;
}
h4 {
  cursor: pointer;
  color: blue;
}
.content {
  display: none;
}
.visible {
  display: block;
}
.invisible {
  display: none;
}
.icone-grande {
  font-size: 24px; /* Remplacez cette valeur par la taille souhaitée */
}

/* Aimer */
#iframeContainer {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  height: 80%;
  background-color: white;
  /* z-index: 98; */
  border: 2px solid #ccc;
  padding: 20px;
  box-sizing: border-box;
  display: none;
}

#closeButton {
  background-color: #e8e8e8; /* Fond bleu */
  color: blue; /* Texte blanc */
  width: 30px; /* Largeur */
  height: 30px; /* Hauteur */
  text-align: center; /* Centrer le contenu */
  line-height: 30px; /* Centrer le contenu verticalement */
  border-radius: 50%; /* Forme arrondie */
  cursor: pointer; /* Curseur pointer */
}

button {
  border: none;
  background: none;
  cursor: pointer;
  font-size: 14px;
  margin: 0 10px;
}

.like {
  background-color: #007bff; /* Bleu foncé */
  color: white;
}

.menu {
  display: flex;
  justify-content: center; /* Centrer horizontalement les éléments */
  margin-bottom: 20px;
}

.menu button {
  border: none;
  padding: 10px 20px;
  cursor: pointer;
  margin-right: 0px;
  margin-left: 0px;
  background-color: #f0f0f0;
}

.menu button:last-child {
  margin-right: 0;
}

#zoomCoranBtn {
  background-color: #afeeee; /* Couleur de fond pour l'onglet Zoom-Coran */
}

#lexiqueBtn {
  background-color: #AFEEEE; /* Couleur de fond pour l'onglet Lexique */
}

.menu button.active {
  background-color: #007bff;
  color: #fff;
}

.menu button:not(.active) {
  filter: grayscale(100%); /* Griser les boutons non sélectionnés */
  cursor: default; /* Désactiver le curseur pour les boutons non sélectionnés */
}

.suggestions-containerMot {
  position: absolute;
  width: 100%;
  max-height: 300px;
  overflow-y: auto;
  background-color: white;
  border: 1px solid #ccc;
  /* z-index: 100; */
}

.suggestion-item {
  padding: 10px;
  cursor: pointer;
  font-size: 16px;
}

.suggestion-item:hover {
  background-color: #f0f0f0;
}

/* #container { //connexion  ... }  -> commentaire corrigé */
#container { /* connexion */
  width: 100%;
  background: #ffffff;
  padding: 5px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  text-align: center;
}

#msgDivCommentaire {
  margin-bottom: 20px;
  color: #333;
  width: 98%;
}

.hidden {
  display: none;
}
.icon {
  margin-right: 8px;
}
#verifyButton {
  display: none; /* Cache le bouton */
}

/* Style pour le bouton ouvrir forum pas utilisé*/
/* Bouton d'ouverture du forum */
#openForumBtn {
  padding: 10px 20px;
  background-color: #4CAF50;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  margin-bottom: 20px;
  transition: background-color 0.3s ease;
}

#openForumBtn:hover {
  background-color: #388e3c;
}

.titre-forum {
  text-align: center;
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 10px;
  color: #333;
}

/* Conteneur principal du forum */
#forum-container {
  border: 1px solid #ccc;
  padding: 10px 16px;
  border-radius: 12px;
  background-color: #f5f5f5;
  max-height: 95vh;
  min-height: 60vh;
  overflow-y: auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  width: 95%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Conteneur des messages */
#messagesContainerForum {
  max-height: 85vh;
  overflow-y: auto;
  margin-top: 16px;
  border: 1px solid #ddd;
  padding: 2px;
  border-radius: 8px;
  background-color: #fff;
}

/* Chaque message du forum (spécifique) */
#messagesContainerForum div.message-box {
  margin-bottom: 12px;
  padding: 10px 16px;
  background-color: #f0f0f0;
  border-left: 5px solid #4CAF50;
  border-radius: 6px;
  font-size: 16px;
  line-height: 1.5;
  position: relative;
  width: 90%;
  transition: background-color 0.2s ease;
}

#messagesContainerForum div.message-box:hover {
  background-color: #e7f5ea;
}

/* Réponses */
.reply-box {
  margin: 10px 0 10px 20px;
  padding: 8px 10px;
  background-color: #fff;
  border-left: 3px solid #4CAF50;
  border-radius: 5px;
  font-size: 16px;
  color: #333;
}

/* Boutons dans les messages */
#messagesContainerForum button.bouton {
  margin: 5px 5px 0 0;
  padding: 4px 8px;
  font-size: 14px;
  border: none;
  border-radius: 6px;
  background-color: #4CAF50;
  color: white;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

#messagesContainerForum button.bouton:hover {
  background-color: #388e3c;
}

/* Formulaire connexion */
.styled-button {
  background-color: #AFEEEE; /* Fond Lexique */
  color: blue; /* Écriture noire */
  border: none; /* Pas de bordure */
  border-radius: 8px; /* Coins légèrement arrondis */
  padding: 1px 2px; /* Espacement interne */
  font-size: 16px; /* Taille de la police */
  cursor: pointer; /* Curseur en forme de main */
  text-align: center; /* Centrage du texte */
  /* display: inline-block; */
  margin: 1px; /* Espacement autour du bouton */
  /* width: 80px; */
  justify-content: center;
}

.styled-button:hover {
  background-color: #0056b3; /* Fond bleu plus foncé au survol */
}

.styled-button:active {
  background-color: #004494; /* Fond encore plus foncé au clic */
}

.helpPopup {
  display: none;
  width: 100%;
  padding: 5px;
  border: 1px solid #ccc;
  background-color: #fff;
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
  border-radius: 8px; /* Coins arrondis pour une apparence plus moderne */
}

/* Styles pour la modale */
.modal {
  display: none; /* Masqué par défaut */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5); /* Fond semi-transparent */
  justify-content: center;
  align-items: center;
  /* z-index: 100; */
}

.modal-content {
  background-color: #fff;
  padding: 20px;
  border-radius: 5px;
  width: 100%;
  max-width: 90%;
  text-align: center;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
}

.modal-buttons {
  margin-top: 20px;
}

.modal-buttons button {
  margin: 0 10px;
  padding: 10px 20px;
  cursor: pointer;
}

#confirmBtn {
  background-color: #4CAF50; /* Couleur verte */
  color: white;
  border: none;
  border-radius: 3px;
}

#cancelBtn {
  background-color: #f44336; /* Couleur rouge */
  color: white;
  border: none;
  border-radius: 3px;
}

.styled-button.cancel {
  background-color: #ff5c5c;
}

.styled-button:hover {
  background-color: #0056b3;
}

.center-container {
  display: flex;
  flex-direction: column; /* Alignement vertical */
  justify-content: center; /* Centrer verticalement */
  align-items: center; /* Centrer horizontalement */
  text-align: center; /* Centrer le texte */
  margin-top: 5px;
}

.session-count {
  margin-top: 10px;
  font-size: 14px;
  color: #333;
}

.delete-button {
  background: none;
  border: none;
  color: red;
  cursor: pointer;
  font-size: 16px;
}

/* Message générique (classe générique, plus récente) */
.message-box {
  font-size: 16px;
  margin: 10px auto;
  width: 80%;
  color: green;
}

.reply-box {
  margin-left: 20px;
  border-left: 2px solid #ccc;
  padding-left: 10px;
  background-color: #e9e9e9;
}

/* MENU */
.menu {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.menu-button { /* style="height: 25px; padding: 0; margin: 5px;" */
  background-color: #f0f0f0;
  border: 2px solid #ccc;
  border-radius: 5px;
  padding: 0;
  margin: 5px;
  font-size: 16px;
  font-weight: bold;
  color: #333;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
}

/* Styles du bouton actif */
.menu-button.active {
  background-color: #AFEEEE;
  color: blue;
  border-color: #4CAF50;
  box-shadow: inset 2px 2px 5px rgba(0, 0, 0, 0.2);
}

.menu-button:hover {
  background-color: #e0e0e0;
  box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.2);
}

.tabContent {
  display: none;
}

.tabContent.active {
  display: block;
}
/* FIN MENU */

/* NOUVEAU STYLE */
.container-center {
  text-align: center;
  background-color: #e8e8e8;
  padding: 2px;
}

/* (annonce-container déjà fusionné plus haut) */

.social-buttons,
.boutons-container,
.center-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 10px 0;
}

.icon-small {
  width: 12px;
  height: 12px;
}

.icon-medium {
  max-width: 24px;
}

.icon-white {
  color: white;
}

.form-box {
  position: relative;
  padding: 20px;
  border: 1px solid #ccc;
  background-color: #f9f9f9;
  width: 300px;
  margin: 20px auto;
  text-align: center; /* Centrer tout le contenu à l'intérieur, y compris le bouton */
}

#okBtn {
  display: block;  /* Le bouton occupe une ligne complète */
  margin: 0 auto;  /* Centrer le bouton horizontalement */
  padding: 10px 20px; /* Optionnel : Ajouter du padding pour plus de confort */
  font-size: 16px; /* Optionnel : Ajuster la taille de la police */
  background-color: #007bff; /* Optionnel : Couleur de fond */
  color: white; /* Optionnel : Couleur du texte */
  border: none; /* Optionnel : Enlever la bordure */
  border-radius: 5px; /* Optionnel : Bordures arrondies */
  cursor: pointer; /* Changer le curseur en "pointeur" */
}

/* (custom-input fusionné plus haut) */

.message-boxVersets {
  display: none;
  background-color: #dff0d8;
  color: #3c763d;
  padding: 8px 12px;
  border: 1px solid #d6e9c6;
  border-radius: 6px;
  margin: 8px 10px;
  font-size: 14px;
  font-weight: bold;
  /* z-index: 99; */
}

.collaborate-box {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.help-popup {
  font-size: 16px;
  line-height: 1.5;
  text-align: left;
  color: #555;
}

.close-button {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: transparent;
  border: none;
  font-size: 18px;
  cursor: pointer;
}

/* Zoom-Coran et Lexique */
.menu-container {
  display: flex;
  justify-content: center; /* Centrer les boutons */
  align-items: center; /* Alignement vertical centré */
}

.messagePopup {
  display: none; /* Masqué par défaut */
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 20px;
  background-color: #f9f9f9;
  border: 1px solid #ccc;
  box-shadow: 0px 0px 10px rgba(0,0,0,0.1);
  text-align: center;
  /* z-index: 100; */
  width: 100%;
  max-width: 85%;
}

/* Arrière-plan sombre */
.popupOverlay {
  display: none; /* Masqué par défaut */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5); /* Transparence */
  /* z-index: 99; */
}

/* Styles pour le placeholder */
.textArea::placeholder {
  color: #888; /* Assurez-vous que la couleur est visible */
  opacity: 1;
}

#fin {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #333;
  color: white;
  padding: 10px 15px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 16px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  transition: background-color 0.3s ease;
}

#fin:hover {
  background-color: #555;
}

/* Style pour la liste de suggestions */
.suggestions-liste {
  position: absolute;
  top: 100%; /* Positionne la liste directement sous l'input */
  width: 100%; /* Fait correspondre la largeur de l'input */
  max-height: 300px; /* Limite la hauteur de la liste */
  overflow-y: auto;
  background-color: white;
  /* border: 1px solid #ccc; */
  border-radius: 4px; /* Coins arrondis pour un rendu plus élégant */
  list-style: none;
  padding: 0;
  margin: 0;
  /* z-index: 100; */
  text-align: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Ombre douce */
}

/* Style des éléments individuels dans la liste */
.suggestions-liste li {
  padding: 8px;
  cursor: pointer;
  font-size: 16px;
}

/* Changement de couleur au survol */
.suggestions-liste li:hover {
  background-color: #f0f0f0;
}

/* Style pour aligner le texte dans l'input */
#inputSoura {
  text-align: center; /* Aligne le texte à gauche */
  padding-left: 16px; /* Espacement pour plus de lisibilité */
  width: 100%; /* Prend toute la largeur disponible */
  box-sizing: border-box; /* Assure une largeur cohérente avec le padding */
  font-size: 16px;
  /* border: 1px solid #ccc; */
  border-radius: 4px;
}

#mediaContainer, #audioContainer {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  margin-top: 2px;
  width: 100%;
}

#imageBanner {
  display: flex;
  align-items: center;        /* Centre l'image verticalement */
  justify-content: center;    /* Centre l'image horizontalement */
  position: relative;
  width: 100%;
  height: 100px;              /* Ajustable */
  overflow: hidden;
  background-color: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #ddd;
  text-align: center;
}

#imageBanner img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;       /* Conserve les proportions */
  flex-shrink: 0;
  margin: 0 auto;            /* Centre l'image horizontalement */
}

#imageBanner img:hover {
  transform: scale(1.05);    /* Zoom léger au survol */
}

.suggestion-item:nth-child(odd) {
  background-color: #f9f9f9; /* Fond gris clair pour lignes impaires */
}

.suggestion-item:nth-child(even) {
  background-color: #ffffff; /* Fond blanc pour lignes paires */
}

.suggestion-item:hover {
  background-color: #e0e0e0; /* Fond plus foncé au survol */
}

.suggestion-item {
  padding: 10px; /* Ajout d'espacement */
  cursor: pointer; /* Indicateur de clic */
}

/* mots-coran.js : nouvelles fonctions de recherche: R1 R2 */
/* verset/rouge : conserver la version la plus récente */
.verset {
  margin-bottom: 20px;
  border-bottom: 1px solid #ddd;
  padding-bottom: 10px;
}

.rouge {
  color: red;
  font-weight: bold;
}

.ref {
  font-size: 14px;
  color: #555;
  text-align: left;
  direction: ltr;
}

.pagination {
  display: flex;
  justify-content: space-between;
  margin-top: 1em;
}

.cache {
  display: none;
}

.et-ou-switch {
  display: flex;
  align-items: center;
  gap: 0.5em;
  margin-bottom: 1em;
}

.et-ou-switch label {
  cursor: pointer;
}

/* Nouvel affichage des versets */
.popup-container {
  display: none; /* par défaut caché */
  position: fixed;
  top: 5vh;
  left: 1vw;
  width: 98vw;
  max-height: 90vh; /* limite la hauteur */
  background-color: white;
  border: 2px solid #444;
  border-radius: 12px;
  box-shadow: 0 0 15px rgba(0,0,0,0.3);
  z-index: 99;
  display: flex;
  flex-direction: column; /* occupe l'espace restant */
}

/*
.popup-content {
  position: relative;
  background: white;
  padding: 0;
  border-radius: 8px;
  width: 80%;
  max-width: 900px;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: 0 0 15px rgba(0,0,0,0.5);
}
*/

.popup-content {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto; /* occupe l'espace restant */
  min-height: 0; /* important pour que overflow-y fonctionne */
  max-height: 80vh;       /* ou calc(100vh - 120px) */
  overflow: auto;
}

.popup-header {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 10px;
  background-color: #f0f0f0;
  border-bottom: 1px solid #ccc;
}

.popup-body {
  flex: 1;
  overflow-y: auto;
  padding: 15px;
  padding-bottom: 40px; /* Ajoute de l'espace pour que le texte de fin ne soit pas caché */
  direction: rtl;
  font-size: 16px;
  line-height: 1.7;
  max-height: 500px;
}

.verset:last-child {
  margin-bottom: 1em; /* au lieu de plus */
}

.texte-arabe {
  font-size: 16px;
  line-height: 1.6;
  margin-top: 5px;
}

.message-boxVersets0 {
  font-weight: bold;
  margin-top: 5px;
  text-align: center;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

/* Enregistrer popup ******************************************************/
.popup-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 95vw; 
	height: 95vh;
  background-color: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  /* z-index: 99; */
}

.popup-box {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  width: 95%;
  max-width: 550px;
  box-shadow: 0 0 15px rgba(0,0,0,0.3);
  position: relative;
}

.popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
  font-size: 16px;
  margin-bottom: 10px;
}

.popup-close {
  background: #4caf50;
  border: none;
  font-size: 16px;
  cursor: pointer;
}

.popup-mode-btn {
  margin: 0 5px;
  padding: 5px 10px;
  font-size: 14px;
  border-radius: 6px;
  border: 1px solid #ccc;
  background: #f5f5f5;
  cursor: pointer;
}

.popup-mode-btn.active {
  background-color: #007BFF;
  color: white;
  font-weight: bold;
}

.popupCommentaireOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 95vw;
  height: 95vh;
  background-color: rgba(0, 0, 0, 0.4);
  display: none; /* par défaut caché */
  align-items: center;
  justify-content: center;
}

@keyframes balanceDouce {
  0%   { transform: translateX(0); }
  25%  { transform: translateX(-3px); }
  50%  { transform: translateX(3px); }
  75%  { transform: translateX(-3px); }
  100% { transform: translateX(0); }
}

.balancement {
  animation: balanceDouce 1.2s ease-in-out infinite;
}

.social-buttons .bouton {
  width: 20px;
  height: 20px;
  padding: 2;
  margin: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background-color: #f8f8f8;
  border-radius: 4px;
  box-shadow: 1px 1px 2px rgba(0,0,0,0.1);
  cursor: pointer;
}

.social-buttons .bouton img,
.social-buttons .bouton i {
  width: 16px;
  height: 16px;
  object-fit: contain;
  font-size: 16px;
}

.popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 95%;
  height: 95%;
  background: rgba(0,0,0,0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  /* z-index: 99; */
}

/* 
.popup-close {
  background:#4caf50;
  border: none;
  font-size: 16px;
  cursor: pointer;
}
*/

.close-btn {
  position: absolute;
  top: 10px;
  right: 1px;
  background: #4caf50;
  border: none;
  font-size: 16px;
  cursor: pointer;
  z-index: 2;
}

.close-btnStatRacines {
  background: #4caf50;
  color: white;
  border: none;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}

/* Conteneur : aligne verticalement tout le monde */
.toolbar { /* style="border:1px solid #999; border-radius:8px; padding:1px; font-size: 12px;" */
  background-color: #f0f0f0; /* background: #4caf50; */
  display: inline-flex;
  align-items: center;
  padding: 1px 2px;
  gap: 6px;
  border: 1px solid #999;
  border-radius: 8px;
  padding: 1px;
  top: 1px;
  right: 5px;
}/* Conteneur : aligne verticalement tout le monde */
.toolbar1 { /* style="border:1px solid #999; border-radius:8px; padding:1px; font-size: 12px;" */
  background-color: #f0f0f0; /* background: #4caf50; */
  /*display: inline-flex;*/
  align-items: center;
  padding: 1px 2px;
  gap: 6px;
  border: 1px solid #999;
  border-radius: 8px;
  padding: 1px;
  top: 1px;
  right: 5px;
}

/* ============================================================
   === POPUP DE LECTURE (créée au vol si absente) ===
   ============================================================ */
/* ligne de séparation précédente convertie en commentaire */
/* //////////////////////////////////////////////////////// */

#lecture-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.45);
  z-index: 99999;
}

#lecture-modal {
  max-width: 820px;
  width: calc(100% - 2rem);
  background: #fff;
  color: #111;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  overflow: hidden;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

#lecture-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding: .6rem .9rem;
  background: #f5f5f5;
  border-bottom: 1px solid #e5e5e5;
}

#lecture-title { font-weight: 600; }

#lecture-close {
  appearance: none;
  border: 1px solid #ccc;
  background: #fff;
  border-radius: 8px;
  padding: .35rem .7rem;
  cursor: pointer;
}

#lecture-body {
  padding: 1rem .9rem 1.1rem;
  line-height: 1.6;
  font-size: 1.15rem;
  white-space: pre-wrap;
  word-break: break-word;
}
/* CSS : largeur pour 4 chiffres, recentré, sans largeur minimale imposée */
#indexInputVisible,
.bouton.index-4ch{
  width: 5.8ch;      /* assez pour “9999” */
  min-width: 0;      /* écrase un éventuel min-width de .bouton */
  text-align: center;
  padding-inline: .4rem;
}
/* Optionnel tableau translitération */
.label-actif { font-weight: 600; }
.label-cache { opacity: 0; } /* ou rien si le display:none suffit via JS */
/* Optionnel, pour le style du bouton */
.toggle-btn { padding: .35rem .6rem; border: 1px solid #ddd; border-radius: .5rem; cursor: pointer; }
/* conteneur intérieur de la popup */
.translit-table { width:100%; border-collapse: collapse; background:#fff; }
.translit-table th, .translit-table td { border:1px solid #e6e6e6; padding:6px 8px; vertical-align: top; }
.translit-table thead th { background:#f7f7f7; font-weight:600; }
.translit-table td.ar { font-size:18px; text-align:center; white-space:nowrap; font-family: "Noto Naskh Arabic", "Scheherazade", serif; }
.chip {
  display:inline-block; padding:2px 6px; margin:2px 4px 2px 0;
  border:1px solid #ddd; border-radius:999px; font-size:12px; background:#fafafa;
}
[dir="rtl"] .translit-table td.ar { text-align:center; }
