.mabible-container {
  max-width: 1200px;
  margin: 20px auto;
  padding: 20px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.mabible-form {
  margin-bottom: 30px;
}

.mabible-search-options {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
}

.mabible-search-input {
  flex: 1;
  padding: 15px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 16px;
  transition: all 0.3s ease;
}

.mabible-search-input:focus {
  border-color: #51483f;
  outline: none;
  box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.mabible-testament {
  margin-bottom: 40px;
}

.mabible-testament h2 {
  color: #2c3e50;
  font-size: 24px;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e0e0e0;
}

.mabible-books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
}

.mabible-book {
  display: block;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 6px;
  color: #2c3e50;
  text-decoration: none;
  text-align: center;
  transition: all 0.3s ease;
}

.mabible-book:hover {
  background: #8cc63e29;
  color: #51483f;
  transform: translateY(-2px);
}

select,
button {
  padding: 15px 25px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 16px;
  /*background: white;*/
  cursor: pointer;
  transition: all 0.3s ease;
}

button {
  background: #51483f;
  color: white;
  border: none;
}

button:hover {
  background: #51483f;
}

.mabible-results {
  margin-top: 30px;
  padding: 20px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background: #f8f9fa;
}

.mabible-verses {
  margin-top: 20px;
}

.verse {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  /*padding: 0.5rem 0.75rem 0.5rem 0;*/
  align-items: flex-start;
  justify-content: flex-start;
  background-color: #00000000;
  border-bottom: 2px solid transparent;
}

.verse-number {
  font-size: 0.7rem;
  margin-top: 2px;
  width: 26px;
  text-align: right;
  margin-right: 8px;
  font-weight: bold;
  flex-shrink: 0;
}

.verse-content {
  flex: 1;
  min-width: 0;
  line-height: 1.8;
}

.verse-content p {
  margin: 0;
}

.jesus-words {
  color: #8b0000 !important;
  font-weight: 500 !important;
}

.footnote {
  color: #51483f;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-style: dotted;
  position: relative;
  display: inline-block;
  padding: 0 2px;
  margin: 0 1px;
  background: rgba(81, 72, 63, 0.1);
  border-radius: 2px;
  transition: all 0.2s ease;
}

.footnote:hover {
  background: rgba(81, 72, 63, 0.2);
}

.footnote:hover::after {
  content: attr(data-tooltip);
  position: fixed;
  background: #51483f;
  color: white;
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 14px;
  max-width: 400px;
  z-index: 1000;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  left: 50%;
  transform: translateX(-50%);
  bottom: 40px;
  white-space: normal;
  word-wrap: break-word;
}

.bible-content .chapter-content .verse h6 {
  font-size: 0.7rem;
  margin-top: 2px;
  width: 26px;
  text-align: left;
  margin-right: 8px;
}

/*button {
  outline: none !important;
  border: none;
  background-color: transparent;
}*/

.target-verse {
  background: #e3f2fd;
  border-left: 4px solid #51483f;
}

.context-verse {
  opacity: 0.8;
}

.verse-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.reference {
  font-weight: bold;
  color: #2c3e50;
}

.verse-reference-header {
  width: 100%;
  padding: 8px 12px;
  margin-bottom: 8px;
  background: #f8f9fa;
  border-left: 4px solid #f16521;
  border-radius: 4px;
  color: #006738;
  font-size: 0.95rem;
}

.verse-reference-header strong {
  color: #006738;
}

.verse-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.verse-actions button {
  background: none;
  border: none;
  padding: 5px;
  cursor: pointer;
  color: #666;
  transition: color 0.3s ease;
}

.verse-actions button:hover {
  color: #51483f;
}

.other-versions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.version-link {
  padding: 2px 8px;
  border-radius: 3px;
  background: #e0e0e0;
  color: #333;
  text-decoration: none;
  font-size: 12px;
  white-space: nowrap;
}

.version-link:hover {
  background: #51483f;
  color: white;
}

.text {
  line-height: 2;
  color: #333;
}

/* Animation pour la copie */
@keyframes copySuccess {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

.copy-success {
  animation: copySuccess 0.3s ease;
  color: #4caf50 !important;
}

.version-info {
  margin-bottom: 15px;
  padding: 10px;
  background: #e3f2fd;
  border-radius: 4px;
  color: #51483f;
  font-weight: bold;
}

/* Styles pour les résultats de recherche */
.mabible-verses {
  margin-top: 20px;
}

.version-info {
  background: #f8f9fa;
  padding: 10px 15px;
  margin-bottom: 20px;
  font-weight: 600;
  color: #333;
}

/* Styles pour différents types de versets */
.verse.target-verse {
  background: #8cc63e29;
  border-left: 4px solid #8cc63e;
  box-shadow: 0 2px 4px rgba(212, 255, 7, 0.2);
}

.verse.search-result {
  border-left: 4px solid #ab9f93;
  background: #f9f7f5;
}

.verse.context-verse {
  background: #f8f9fa;
  border-left: 4px solid #6c757d;
  opacity: 0.8;
}

/* Surlignage des termes de recherche */
mark {
  background: #ffeb3b;
  color: #333;
  padding: 2px 4px;
  border-radius: 3px;
  font-weight: 600;
}

/* Styles pour les boutons d'action des versets */
.verse-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.copy-verse,
.favorite-verse {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 3px;
  transition: all 0.2s ease;
  color: #6c757d;
}

.copy-verse:hover,
.favorite-verse:hover {
  background: #e9ecef;
  color: #495057;
}

.favorite-verse .dashicons-star-filled {
  color: #8cc63e;
}

/* États de chargement et erreurs */
.mabible-loading {
  text-align: center;
  padding: 40px 20px;
  color: #6c757d;
  font-style: italic;
}

.mabible-loading::before {
  content: "";
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid #e9ecef;
  border-top: 2px solid #ab9f93;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 10px;
  vertical-align: middle;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.mabible-error {
  background: #f8d7da;
  color: #721c24;
  padding: 15px;
  border-radius: 5px;
  border: 1px solid #f5c6cb;
  margin: 20px 0;
}

/* Messages temporaires */
.mabible-message {
  position: fixed;
  top: 50px;
  left: 50%;
  transform: translateX(-50%);
  background: #51483f;
  color: white;
  padding: 15px 25px;
  border-radius: 8px;
  font-family: "Poppins", sans-serif;
  font-size: 14px;
  font-weight: 500;
  z-index: 999999;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  animation: slideDown 0.3s ease-out;
  min-width: 200px;
  text-align: center;
}

@keyframes slideDown {
  from {
    transform: translateX(-50%) translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }
}

/* Styles pour aucun résultat */
.no-results {
  text-align: center;
  padding: 40px 20px;
  color: #6c757d;
}

.no-results p {
  margin-bottom: 15px;
  font-size: 16px;
}

.search-help {
  font-weight: 600;
  color: #495057;
}

.search-examples {
  list-style: none;
  padding: 0;
  margin: 15px 0;
  text-align: left;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.search-examples li {
  padding: 8px 0;
  border-bottom: 1px solid #e9ecef;
  color: #6c757d;
}

.search-examples li:last-child {
  border-bottom: none;
}

/* Compteur de résultats */
.results-count {
  text-align: center;
  padding: 10px;
  color: #6c757d;
  font-style: italic;
  margin-top: 20px;
}

/* Responsive pour les résultats de recherche */
@media (max-width: 768px) {
  .verse-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .verse-actions {
    justify-content: flex-start;
  }

  .mabible-message {
    top: 30px;
    left: 20px;
    right: 20px;
    transform: none;
    min-width: auto;
    width: calc(100% - 40px);
  }

  @keyframes slideDown {
    from {
      transform: translateY(-100%);
      opacity: 0;
    }
    to {
      transform: translateY(0);
      opacity: 1;
    }
  }
}

/* Styles pour le mode intégré simplifié */
.mabible-integrated {
  margin: 0;
  padding: 15px;
  background: #f9f9f9;
  border-radius: 8px;
  box-shadow: none;
  border: 1px solid #e0e0e0;
}

.mabible-search-integrated {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.mabible-integrated .mabible-search-input {
  flex: 1;
  padding: 12px 15px;
  font-size: 15px;
  border: 1px solid #ddd;
  border-radius: 6px;
}

.mabible-integrated .mabible-search-input:focus {
  border-color: #51483f;
  box-shadow: 0 0 0 2px rgba(81, 72, 63, 0.1);
}

.mabible-integrated button {
  padding: 12px 20px;
  font-size: 15px;
  background: #51483f;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.mabible-integrated button:hover {
  background: #3d342c;
}

.mabible-search-help {
  text-align: center;
  margin-top: 8px;
}

.mabible-search-help small {
  color: #6c757d;
  font-style: italic;
  font-size: 11px;
}

.mabible-integrated .mabible-results {
  margin-top: 15px;
  padding: 15px;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  max-height: 400px;
  overflow-y: auto;
}

/* Masquer les résultats vides en mode intégré */
.mabible-integrated .mabible-results:empty {
  display: none;
}

/* Responsive pour le mode intégré */
@media (max-width: 768px) {
  .mabible-search-integrated {
    flex-direction: column;
    gap: 8px;
  }

  .mabible-integrated .mabible-search-input {
    width: 100%;
  }

  .mabible-integrated button {
    width: 100%;
    padding: 15px;
  }

  .mabible-search-help small {
    font-size: 11px;
  }
}

/* ==============================
   CORRECTIONS FIREFOX - RECHERCHE
   ============================== */

/* Corrections spécifiques à Firefox pour les versets de recherche */
@-moz-document url-prefix() {
  /* Fix pour la numérotation des versets dans les recherches */
  .verse {
    display: -moz-flex !important;
    display: flex !important;
    flex-wrap: wrap !important;
    -moz-box-align: start !important;
    align-items: flex-start !important;
    -moz-box-pack: start !important;
    justify-content: flex-start !important;
    width: 100% !important;
    margin: 0 !important;
    background-color: transparent !important;
    border-bottom: 2px solid transparent !important;
    box-sizing: border-box !important;
  }

  .verse-number {
    font-size: 12px !important;
    margin: 0 !important;
    margin-top: 3px !important;
    margin-right: 12px !important;
    width: 30px !important;
    min-width: 30px !important;
    text-align: left !important;
    font-weight: 600 !important;
    color: #51483f !important;
    line-height: 1.4 !important;
    flex-shrink: 0 !important;
    display: block !important;
    padding: 0 !important;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    -moz-user-select: none !important;
    user-select: none !important;
  }

  .bible-content .chapter-content .verse h6 {
    font-size: 12px !important;
    margin: 0 !important;
    margin-top: 3px !important;
    margin-right: 12px !important;
    width: 30px !important;
    min-width: 30px !important;
    text-align: left !important;
    color: #51483f !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    flex-shrink: 0 !important;
    display: block !important;
    padding: 0 !important;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    -moz-user-select: none !important;
    user-select: none !important;
  }

  /* Fix pour le texte des versets */
  .verse .text,
  .verse p {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.6 !important;
    color: #333 !important;
    -moz-box-flex: 1 !important;
    flex: 1 !important;
    font-size: 15px !important;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
  }

  /* Fix pour les états de versets */
  .verse.target-verse {
    background: #8cc63e29 !important;
    border-left: 4px solid #8cc63e !important;
    box-shadow: 0 2px 4px rgba(212, 255, 7, 0.2) !important;
    padding: 12px !important;
    border-radius: 6px !important;
    margin: 8px 0 !important;
  }

  .verse.search-result {
    border-left: 4px solid #ab9f93 !important;
    background: #f9f7f5 !important;
    padding: 12px !important;
    border-radius: 6px !important;
    margin: 8px 0 !important;
  }

  .verse.context-verse {
    background: #f8f9fa !important;
    border-left: 4px solid #6c757d !important;
    opacity: 0.8 !important;
    padding: 12px !important;
    border-radius: 6px !important;
    margin: 8px 0 !important;
  }

  /* Fix pour les actions des versets */
  .verse-actions {
    display: -moz-flex !important;
    display: flex !important;
    gap: 8px !important;
    -moz-box-align: center !important;
    align-items: center !important;
    margin-left: auto !important;
  }

  .copy-verse,
  .favorite-verse {
    background: transparent !important;
    border: none !important;
    cursor: pointer !important;
    padding: 6px !important;
    border-radius: 4px !important;
    transition: all 0.2s ease !important;
    color: #6c757d !important;
    display: -moz-inline-flex !important;
    display: inline-flex !important;
    -moz-box-align: center !important;
    align-items: center !important;
    -moz-box-pack: center !important;
    justify-content: center !important;
    min-width: 32px !important;
    min-height: 32px !important;
  }

  .copy-verse:hover,
  .favorite-verse:hover {
    background: #e9ecef !important;
    color: #495057 !important;
  }

  /* Fix pour le surlignage des termes recherchés */
  mark {
    background: #ffeb3b !important;
    color: #333 !important;
    padding: 2px 4px !important;
    border-radius: 3px !important;
    font-weight: 600 !important;
  }
}

/* Corrections supplémentaires pour les navigateurs Gecko (Firefox) */
@supports (-moz-appearance: none) {
  .verse {
    -moz-user-select: text !important;
    user-select: text !important;
  }

  .verse-number,
  .bible-content .chapter-content .verse h6 {
    -moz-user-select: none !important;
    user-select: none !important;
  }

  .copy-verse,
  .favorite-verse {
    -moz-appearance: none !important;
    -moz-user-select: none !important;
    user-select: none !important;
  }
}
