/* styles.css - Design avec valeurs CSS natives (sans variables :root) */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: Helvetica, Arial, sans-serif;
  background: #000000;
  color: #ffffff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.slider-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000000;
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transform: translateX(100%);
  transition: all 0.6s cubic-bezier(0.4, 0.0, 0.2, 1);
  will-change: transform, opacity;
}

.slide.active {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  z-index: 2;
}

.slide.prev {
  transform: translateX(-100%);
  opacity: 0;
  z-index: 1;
}

.slide.next {
  transform: translateX(100%);
  opacity: 0;
  z-index: 1;
}

.slide.entering {
  animation: slideIn 0.6s cubic-bezier(0.4, 0.0, 0.2, 1) forwards;
}

.slide.exiting {
  animation: slideOut 0.6s cubic-bezier(0.4, 0.0, 0.2, 1) forwards;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

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

.slide-content {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  padding: 4rem 2rem;
  overflow-y: auto;
  overflow-x: hidden;
}

.slide-content::-webkit-scrollbar {
  width: 8px;
}

.slide-content::-webkit-scrollbar-track {
  background: rgba(212, 206, 193, 0.3);
  border-radius: 10px;
}

.slide-content::-webkit-scrollbar-thumb {
  background: #8b6f47;
  border-radius: 10px;
  transition: background 0.3s ease;
}

.slide-content::-webkit-scrollbar-thumb:hover {
  background: #a58963;
}

.welcome-screen {
  text-align: center;
  width: 100%;
  max-width: 480px;
  min-height: 100%;
  animation: fadeInUp 1s cubic-bezier(0.4, 0.0, 0.2, 1);
  background: #000000;
  padding: 2rem 1.5rem 3rem;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
}

/* Scrollbar welcome-screen */
.welcome-screen::-webkit-scrollbar { width: 6px; }
.welcome-screen::-webkit-scrollbar-track { background: rgba(0,255,255,0.05); border-radius: 6px; }
.welcome-screen::-webkit-scrollbar-thumb { background: rgba(0,255,255,0.25); border-radius: 6px; }
.welcome-screen::-webkit-scrollbar-thumb:hover { background: rgba(0,255,255,0.45); }

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

.main-title {
  font-family: Helvetica, Arial, sans-serif;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
  line-height: 1.1;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.subtitle {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  color: #00ffff;
  margin-bottom: 3rem;
  font-weight: 300;
  letter-spacing: 0.01em;
}

.navigation-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  color: #00ffff;
  animation: pulse 2s ease-in-out infinite;
}

.navigation-hint p {
  color: #ffffff;
}

.book-info {
  font-size: 1.2rem;
  color: #00ffff;
  margin-top: 1rem;
  font-weight: 400;
}

/* Modale custom */
.custom-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  animation: fadeIn 0.3s ease;
}

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

.custom-modal-content {
  background: #1a1a1a;
  padding: 2rem;
  border-radius: 16px;
  border: 2px solid #00ffff;
  max-width: 90%;
  width: 400px;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0, 255, 255, 0.5);
  animation: slideUp 0.3s ease;
}

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

.custom-modal-content p {
  color: #ffffff;
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.custom-modal-content button {
  background: #00ffff;
  color: #000000;
  border: none;
  padding: 0.8rem 2rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.custom-modal-content button:hover {
  background: #00cccc;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 255, 255, 0.5);
}

.custom-modal-content button:active {
  transform: translateY(0);
}

.navigation-hint svg {
  animation: slideRight 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

@keyframes slideRight {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(10px); }
}

.chapter {
  width: 100%;
  height: 100%;
  background: #000000;
  color: #ffffff;
  animation: fadeInScale 0.8s cubic-bezier(0.4, 0.0, 0.2, 1);
  position: absolute;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

.chapter::-webkit-scrollbar {
  width: 8px;
}

.chapter::-webkit-scrollbar-track {
  background: rgba(212, 206, 193, 0.3);
  border-radius: 10px;
  margin: 1rem 0;
}

.chapter::-webkit-scrollbar-thumb {
  background: #8b6f47;
  border-radius: 10px;
  transition: background 0.3s ease;
}

.chapter::-webkit-scrollbar-thumb:hover {
  background: #a58963;
}

.chapter::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #8b6f47 0%, #a58963 50%, #8b6f47 100%);
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.chapter-title {
  font-family: Helvetica, Arial, sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 2.5rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
  border-bottom: 2px solid #d4cec1;
  padding-bottom: 1.5rem;
  padding-top: 1.5rem;
  padding-left: 1.5rem;
  position: sticky;
  top: 0px;
  background-color: #1a1a1a;
  color: #ffffff;
  z-index: 100;
}

.verses {
  display: flex;
  flex-direction: column;
  color: #ffffff;
  padding: 0 1.5rem 2rem 1.5rem;
}

.verse {
  display: block;
  padding: 0.3rem 0;
  margin-bottom: 0.8rem;
  transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
  position: relative;
  animation: fadeInVerse 0.6s cubic-bezier(0.4, 0.0, 0.2, 1) backwards;
}

.verse:hover {
  transform: translateX(4px);
}

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

.verse:nth-child(1) { animation-delay: 0.1s; }
.verse:nth-child(2) { animation-delay: 0.15s; }
.verse:nth-child(3) { animation-delay: 0.2s; }
.verse:nth-child(4) { animation-delay: 0.25s; }
.verse:nth-child(5) { animation-delay: 0.3s; }
.verse:nth-child(n+6) { animation-delay: 0.35s; }

.verse-number {
  display: inline;
  color: #00ffff;
  font-weight: 700;
  font-size: 1.5rem;
  margin-right: 0.5rem;
  line-height: 1.6;
}

.verse-text {
  display: inline;
  font-size: 1.5rem;
  line-height: 1.6;
  color: #ffffff;
  font-weight: 400;
}

.quick-nav {
  position: fixed;
  top: 2rem;
  right: 2rem;
  z-index: 1000;
}

.btn {
  cursor: pointer;
  padding: 5px;
  border-radius: 10px;
  transition: all 0.3s ease;
  background: transparent;
  border: none;
  outline: none;
}

.btn:focus {
  outline: 2px solid #00ffff;
  outline-offset: 2px;
}

.btn svg {
  display: block;
  width: 50px;
  height: 50px;
  filter: drop-shadow(0 0 5px rgba(0, 255, 255, 0.3));
}

.line {
  fill: none;
  stroke: #00ffff;
  stroke-width: 10px;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.line.top, .line.bottom {
  stroke-dasharray: 50px 600px;
  stroke-dashoffset: 0px;
}

.line.cross {
  stroke-dasharray: 50px 60px;
  stroke-dashoffset: 0px;
}

/* Animation quand actif */
.ligneberger .line.top, 
.ligneberger .line.bottom {
  stroke-dasharray: 70.71px 600px;
  stroke-dashoffset: -392px;
}

.ligneberger .line.cross {
  stroke-dasharray: 50px 60px;
  stroke-dashoffset: 51px;
}

/* Transitions */
.line.cross {
  transition: 0.35s stroke-dasharray ease 0.35s, 
              0.35s stroke-dashoffset ease 0.35s, 
              0.35s stroke ease 0s;
}

.line.top {
  transition: 0.525s stroke-dasharray ease 0s, 
              0.525s stroke-dashoffset ease 0s, 
              0.35s stroke ease 0s;
}

.line.bottom {
  transition: 0.525s stroke-dasharray ease 0.35s, 
              0.525s stroke-dashoffset ease 0.35s, 
              0.35s stroke ease 0s;
}

.ligneberger .line.cross {
  transition: 0.35s stroke-dasharray ease 0s, 
              0.35s stroke-dashoffset ease 0s, 
              0.35s stroke ease 0s;
}

.quick-nav-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  background: #1a1a1a;
  padding: 1.5rem;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 255, 255, 0.3);
  border: 1px solid #00ffff;
  width: 90%;
  max-width: 400px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
  max-height: 85vh;
  overflow-y: auto;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.quick-nav-close {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
  flex-shrink: 0;
}

.quick-nav-close:hover {
  transform: scale(1.1);
  opacity: 0.85;
  background: transparent;
  border-color: transparent;
}

.quick-nav-close svg {
  display: block;
  flex-shrink: 0;
}

/* Ligne search + fermeture côte à côte */
.search-close-row {
  display: flex;
  align-items: stretch;
  gap: 1rem;
  width: 100%;
}
.search-close-row #bsearchBar {
  flex: 1;
  min-width: 0;
 border: 1.5px solid rgba(0, 255, 255, 0.4);
}
.search-close-row .quick-nav-close {
  flex-shrink: 0;
  align-self: center;
}

.quick-nav-panel::-webkit-scrollbar {
  width: 8px;
}

.quick-nav-panel::-webkit-scrollbar-track {
  background: rgba(0, 255, 255, 0.1);
  border-radius: 10px;
}

.quick-nav-panel::-webkit-scrollbar-thumb {
  background: #00ffff;
  border-radius: 10px;
}

.quick-nav-panel.active {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.quick-nav-panel h3 {
  font-family: Helvetica, Arial, sans-serif;
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
  color: #ffffff;
  text-align: center;
}

.book-selector {
  margin-bottom: 0;
  margin-top: 10px;
}

.book-selector label {
  display: block;
  color: #00ffff;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.book-select {
  width: 100%;
  padding: 0.8rem;
  background: #000000;
  color: #ffffff;
  border: 2px solid #00ffff;
  border-radius: 8px;
  font-size: 1rem;
  font-family: Helvetica, Arial, sans-serif;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
  appearance: none;        /* standard */
  -webkit-appearance: none; /* Chrome / Safari */
  -moz-appearance: none;    /* Firefox */
  background: none;         /* enlève certains styles */
}

.book-select:hover {
  background: #0a0a0a;
  border-color: #00ffff;
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

.book-select:focus {
  outline: none;
  border-color: #00ffff;
  background: #0a0a0a;
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
}

.book-select option {
  background: #000000;
  color: #ffffff;
  padding: 0.5rem;
}

.book-select option[value=""] {
  text-align: center;
}

.book-select optgroup {
  background: #1a1a1a;
  color: #00ffff;
  font-weight: bold;
  font-style: normal;
}

.quick-nav-panel .chapter-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.2rem;
  font-weight: 600;
  color: #ffffff;
  justify-content: center;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: #000000;
  border-radius: 8px;
  border: 1px solid #00ffff;
}

.quick-nav-panel #currentChapter {
  color: #00ffff;
  font-size: 1.5rem;
}

.quick-nav-panel .separator {
  color: #888888;
}

.quick-nav-panel #totalChapters {
  color: #888888;
  font-size: 1rem;
}

.quick-nav-panel input {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 2px solid #00ffff;
  border-radius: 8px;
  font-size: 1rem;
  font-family: Helvetica, Arial, sans-serif;
  margin-bottom: 1rem;
  transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
  background: #000000;
  color: #ffffff;
}

.quick-nav-panel input:focus {
  outline: none;
  border-color: #00ffff;
  background: #0a0a0a;
}

.quick-nav-panel > button,
#gotoBookBtnHome {
  width: 100%;
  padding: 0.8rem 1rem;
  background: #2b2821;
  color: #d4bf7f;	
  border: none;
  border-radius: 8px;
  border: 1px solid rgba(0, 255, 255, 0.2);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  font-family: Helvetica, Arial, sans-serif;
  margin-bottom: 0;
}

.quick-nav-panel > button:hover,
#gotoBookBtnHome:hover {
  background: #00cccc;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 255, 255, 0.5);
}

.quick-nav-panel > button:active {
  transform: translateY(0);
}

/* Bouton "Aller au chapitre" */
#gotoBookBtn,
#gotoBookBtnHome {
  background: #075f47 !important;
  color: #d2c248 !important;
  border: none !important;
}
#gotoBookBtn:hover,
#gotoBookBtnHome:hover {
  background: #054f3b !important;
  box-shadow: 0 4px 12px rgba(7, 95, 71, 0.5) !important;
}

.nav-buttons {
  display: flex;
  gap: 0.8rem;
  margin-top: 0;
}

.nav-buttons .nav-btn {
  flex: 1;
  padding: 0.8rem 1rem;
  background: #000000;
  color: #00ffff;
  border: 2px solid #00ffff;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  font-family: Helvetica, Arial, sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.nav-buttons .nav-btn:hover {
  background: #00ffff;
  color: #000000;
  border-color: #00ffff;
  transform: translateY(-2px);
}

.nav-buttons .nav-btn:active {
  transform: translateY(0);
}

.nav-buttons .nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  transform: translateY(0);
}

.nav-buttons .nav-btn svg {
  width: 16px;
  height: 16px;
}

/* Indicateur de position */
.position-indicator {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(26, 26, 26, 0.95);
  padding: 0.8rem 1.5rem;
  border-radius: 50px;
  border: 2px solid #00ffff;
  box-shadow: 0 4px 20px rgba(0, 255, 255, 0.3);
  z-index: 900;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  pointer-events: none;
}

.position-indicator.show {
  opacity: 1;
  visibility: visible;
}

.position-indicator span {
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
  display: block;
  white-space: nowrap;
}

.loading-indicator {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.loading-indicator.active {
  opacity: 1;
  visibility: visible;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #d4cec1;
  border-top-color: #8b6f47;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 768px) {
  .slide-content {
    padding: 2rem 1.5rem;
  }

  .chapter-title {
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
  }

  .verse {
    padding: 0.3rem 0;
    margin-bottom: 0.6rem;
  }

  .verse-number {
    font-size: 1.3rem;
  }

  .verse-text {
    font-size: 1.3rem;
  }

  .quick-nav {
    top: 1rem;
    right: 1rem;
  }

  .btn svg {
    width: 45px;
    height: 45px;
  }

  .quick-nav-panel {
    width: 92%;
    max-width: none;
    padding: 1.5rem;
    max-height: 90vh;
  }

  .quick-nav-panel h3 {
    font-size: 1.2rem;
  }

  .quick-nav-panel .chapter-indicator {
    font-size: 1rem;
    padding: 0.8rem;
  }

  .quick-nav-panel #currentChapter {
    font-size: 1.3rem;
  }

  .book-selector label {
    font-size: 0.85rem;
  }

  .book-select {
    padding: 0.7rem;
    font-size: 0.95rem;
  }

  .position-indicator {
    bottom: 1.5rem;
    padding: 0.7rem 1.2rem;
  }

  .position-indicator span {
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .main-title {
    font-size: 2rem;
  }

  .subtitle {
    font-size: 1rem;
  }

  .quick-nav {
    top: 0.75rem;
    right: 0.75rem;
  }

  .btn svg {
    width: 40px;
    height: 40px;
  }

  .quick-nav-panel {
    width: 95%;
    padding: 1.2rem;
    max-height: 92vh;
  }

  .quick-nav-panel h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
  }

  .quick-nav-panel .chapter-indicator {
    font-size: 0.9rem;
    padding: 0.7rem;
    margin-bottom: 1rem;
  }

  .quick-nav-panel #currentChapter {
    font-size: 1.1rem;
  }

  .quick-nav-panel #totalChapters {
    font-size: 0.85rem;
  }

  .book-selector {
    margin-bottom: 1rem;
  }

  .book-selector label {
    font-size: 0.8rem;
    margin-bottom: 0.4rem;
  }

  .book-select {
    padding: 0.6rem;
    font-size: 0.9rem;
  }

  .quick-nav-panel input {
    padding: 0.7rem;
    font-size: 0.95rem;
  }

  .quick-nav-panel > button {
    padding: 0.7rem;
    font-size: 0.95rem;
  }

  .nav-buttons .nav-btn {
    padding: 0.7rem 0.5rem;
    font-size: 0.85rem;
  }

  .position-indicator {
    bottom: 1rem;
    padding: 0.6rem 1rem;
  }

  .position-indicator span {
    font-size: 0.85rem;
  }
}

.slider-container.swiping .slide.active {
  transition: none;
}

::selection {
  background: #8b6f47;
  color: #ffffff;
}

::-moz-selection {
  background: #8b6f47;
  color: #ffffff;
}

/* ============================================
   VERSETS ANNOTÉS
   ============================================ */

.verse--has-note {
  cursor: pointer;
  position: relative;
}

.verse--has-note:hover {
  background: rgba(0, 255, 255, 0.06);
  border-radius: 6px;
  padding-left: 6px;
  margin-left: -6px;
}

.verse-note-icon {
  display: inline-block;
  vertical-align: middle;
  margin-left: 8px;
  color: #00ffff;
  opacity: 0.6;
  transition: opacity 0.2s ease;
  position: relative;
  top: -2px;
}

.verse--has-note:hover .verse-note-icon {
  opacity: 1;
}

/* Bouton "Note de chapitre" dans le titre */
.chapter-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-texte-chapitre {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1.5px solid #00ffff;
  color: #00ffff;
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 0.75rem;
  font-family: 'Lucida Sans', Helvetica, sans-serif;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.03em;
  white-space: nowrap;
  transition: all 0.25s ease;
  flex-shrink: 0;
}

.btn-texte-chapitre:hover {
  background: #00ffff;
  color: #000;
  box-shadow: 0 0 12px rgba(0,255,255,0.5);
}

/* ============================================
   VERSE MODAL — centré comme quick-nav-panel
   ============================================ */

.verse-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  padding: 1rem;
}

.verse-modal-overlay.verse-modal-visible {
  opacity: 1;
}

.verse-modal-overlay.verse-modal-visible .verse-modal {
  transform: translateY(0) scale(1);
}

.verse-modal {
  background: #0c1021;
  width: 100%;
  max-width: 600px;
  max-height: 85vh;
  border-radius: 18px;
  border: 2px solid #00ffff;
  box-shadow: 0 0 40px rgba(0, 255, 255, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   MODALES CENTRÉES GÉNÉRIQUES (OPTIONS / BLOC-NOTES)
   ============================================ */

.centered-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.80);
  z-index: 6000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.centered-modal-overlay.cmo-visible {
  opacity: 1;
}

.centered-modal-overlay.cmo-visible .centered-modal-panel {
  transform: translateY(0) scale(1);
}

.centered-modal-panel {
  background: #1a1a1a;
  width: 100%;
  max-width: 420px;
  border-radius: 16px;
  border: 1.5px solid #00ffff;
  box-shadow: 0 0 40px rgba(0, 255, 255, 0.3);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  max-height: 90vh;
}

/* Header commun */
.cmp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 12px 16px;
  background: #111;
  border-bottom: 1px solid rgba(0, 255, 255, 0.25);
  flex-shrink: 0;
}

.cmp-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #00ffff;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.cmp-close {
  background: transparent;
  border: 1.5px solid rgba(0,255,255,0.4);
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #00ffff;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}
.cmp-close:hover { background: #00ffff; color: #000; }

/* ── OPTIONS PANEL ── */
.options-panel {
  overflow: hidden;
}
.options-panel::-webkit-scrollbar { width: 6px; }
.options-panel::-webkit-scrollbar-thumb { background: rgba(0,255,255,0.3); border-radius: 6px; }

.options-verse-preview {
  padding: 10px 14px;
  background: rgba(0,255,255,0.05);
  border-bottom: 1px solid rgba(0,255,255,0.15);
  flex-shrink: 0;
  max-height: 90px;
  overflow-y: auto;
  scroll-behavior: smooth;
}
.options-verse-preview::-webkit-scrollbar { width: 5px; }
.options-verse-preview::-webkit-scrollbar-thumb { background: rgba(0,255,255,0.25); border-radius: 4px; }

/* Exclure l'aperçu du zoom global */
#optionsPreviewText {
  font-size: 1rem !important;
}
.options-verse-preview .verse-number {
  font-size: 1rem !important;
}

.options-actions {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  flex-shrink: 0;
}

.opt-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  border: none;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: Helvetica, Arial, sans-serif;
}

.opt-btn-copy {
  background: rgba(0,255,255,0.15);
  color: #00ffff;
  border: 1.5px solid rgba(0,255,255,0.5);
  min-height: 44px;
}
.opt-btn-copy:hover { background: rgba(0,255,255,0.25); }

.opt-btn-note {
  background: rgba(252,154,70,0.12);
  color: #fc9a46;
  border: 1.5px solid rgba(252,154,70,0.4);
}
.opt-btn-note:hover { background: rgba(252,154,70,0.22); }
.opt-btn-note:disabled { opacity: 0.3; cursor: not-allowed; }

.opt-btn-reset {
  width: 100%;
  flex: none;
  background: rgba(255,48,40,0.1);
  color: #ff8080;
  border: 1px solid rgba(255,48,40,0.3);
  margin-top: 8px;
}
.opt-btn-reset:hover { background: rgba(255,48,40,0.2); }

/* ── Style section ── */
.options-style-section {
  padding: 10px 16px 4px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.options-style-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family: Helvetica, Arial, sans-serif;
  margin-bottom: 2px;
}

/* 4 pastilles + G/I sur une seule ligne */
.style-color-swatches {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: nowrap;
  padding: 2px 0;
  margin-bottom: 12px;
}

.style-swatch-btn {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  border: 2.5px solid transparent;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
  flex-shrink: 0;
  outline: none;
}
.style-swatch-btn:hover {
  transform: scale(1.12);
  box-shadow: 0 0 8px rgba(255,255,255,0.2);
}
.style-swatch-btn.active {
  border-color: #00ffff;
  box-shadow: 0 0 0 3px rgba(0,255,255,0.3);
  transform: scale(1.1);
}

/* Séparateur vertical */
.style-row-sep {
  display: inline-block;
  width: 1px;
  height: 26px;
  background: rgba(255,255,255,0.18);
  margin: 0 2px;
  flex-shrink: 0;
}

/* Toggles Gras / Italique (inline avec pastilles) */
.style-toggle-btn {
  width: 34px;
  height: 32px;
  border-radius: 7px;
  border: 1.5px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.05);
  color: #dce3ee;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s, border-color 0.18s, color 0.18s;
  font-family: Helvetica, Arial, sans-serif;
  flex-shrink: 0;
}
.style-toggle-btn:hover {
  background: rgba(0,255,255,0.1);
  border-color: rgba(0,255,255,0.4);
}
.style-toggle-btn.active {
  background: rgba(0,255,255,0.18);
  border-color: #00ffff;
  color: #00ffff;
}

/* Bouton reset compact (icône seule) */

.style-reset-all-btn {
    border: 1.5px solid #00ffff;
}

.style-reset-all-btn svg {
    stroke: #00ffff;
}
.style-reset-all-btn {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  border: 1px solid rgba(255,255,255,0.15);
  background: transparent;
  color: #888;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, border-color 0.2s;
  margin-left: auto;
  flex-shrink: 0;
}
.style-reset-all-btn:hover {
  color: #ff8080;
  border-color: rgba(255,128,128,0.4);
}

/* ── BLOC-NOTES PANEL ── */
.bloc-notes-panel {
  max-width: 480px;
  min-height: 180px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              min-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.bn-list {
  overflow-y: auto;
  flex: 1;
  padding: 10px 0;
  min-height: 80px;
  transition: min-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.bn-list::-webkit-scrollbar { width: 6px; }
.bn-list::-webkit-scrollbar-thumb { background: rgba(0,255,255,0.3); border-radius: 6px; }

.bn-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 3rem 2rem;
  color: rgba(255,255,255,0.35);
  font-family: Helvetica, Arial, sans-serif;
  font-size: 0.9rem;
  animation: bn-empty-in 0.45s cubic-bezier(0.4, 0, 0.2, 1) both;
}

@keyframes bn-empty-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0);   }
}

.bn-item {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  transition: background 0.2s;
}
.bn-item:hover { background: rgba(0,255,255,0.04); }

.bn-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.bn-item-ref {
  font-size: 0.78rem;
  color: #00ffff;
  font-family: Helvetica, Arial, sans-serif;
  font-weight: 700;
  letter-spacing: 0.03em;
  flex: 1;
}

.bn-item-text {
  font-size: 1.1rem;
  color: #dce3ee;
  font-family: Helvetica, Arial, sans-serif;
  line-height: 1.5;
  font-style: italic;
}

.bn-item-date {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  margin-top: 6px;
  font-size: 0.68rem;
  font-family: 'Lucida Sans', Helvetica, sans-serif;
  font-style: normal;
  font-weight: 500;
  color: rgba(0, 255, 255, 0.6);
  letter-spacing: 0.04em;
}

.bn-item-date::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 1px;
  background: rgba(0, 255, 255, 0.2);
  margin-right: 2px;
}

.bn-item-actions {
  display: flex;
  gap: 5px;
  flex-shrink: 0;
}

.bn-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 7px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.bn-btn-goto {
  background: rgba(0,255,255,0.1);
  color: #00ffff;
  border: 1px solid rgba(0,255,255,0.3);
}
.bn-btn-goto:hover { background: rgba(0,255,255,0.22); }

.bn-btn-delete {
  background: rgba(255,48,40,0.1);
  color: #ff8080;
  border: 1px solid rgba(255,48,40,0.3);
}
.bn-btn-delete:hover { background: rgba(255,48,40,0.22); }

/* ── Bouton TTS dans OPTIONS ── */
.opt-btn-tts {
  width: 100%;
  flex: none;
  background: rgba(139,111,71,0.15);
  color: #c8a96e;
  border: 1.5px solid rgba(139,111,71,0.45);
  margin-bottom: 8px;
}
.opt-btn-tts:hover { background: rgba(139,111,71,0.28); }

/* ── Bouton Bloc-Notes dans l'options-panel (modale verset) ── */
.opt-blocnotes-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0 16px 12px 16px;
}

/* Rangée toggle Mode lecture rapide */
.opt-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(0,255,255,0.15);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  gap: 10px;
}
.opt-toggle-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(200,230,230,0.7);
  letter-spacing: 0.03em;
  white-space: nowrap;
  user-select: none;
}

/* Toggle switch compact */
.opt-toggle-track {
  position: relative;
  width: 44px;
  height: 24px;
  border-radius: 24px;
  background: #1a1a2e;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: inset 0 2px 5px rgba(0,0,0,0.7), 0 2px 6px rgba(0,0,0,0.4);
  transition: background 0.3s;
}
.opt-toggle-track.is-on {
  background: rgba(0,229,200,0.12);
  box-shadow: inset 0 2px 5px rgba(0,0,0,0.5), 0 0 8px rgba(0,229,200,0.25);
}
.opt-toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(145deg, #e07a5f, #b8503a);
  box-shadow: 0 0 6px rgba(224,122,95,0.5), inset 0 1px 3px rgba(255,255,255,0.15), inset 0 -3px 6px rgba(0,0,0,0.7);
  transition: transform 0.3s cubic-bezier(.68,-0.55,.27,1.55), background 0.3s, box-shadow 0.3s;
}
.opt-toggle-track.is-on .opt-toggle-thumb {
  transform: translateX(20px);
  background: linear-gradient(145deg, #2ec4b6, #1a9e92);
  box-shadow: 0 0 8px rgba(46,196,182,0.55), inset 0 1px 3px rgba(255,255,255,0.1), inset 0 -3px 6px rgba(0,0,0,0.6);
}

.opt-btn-blocnotes {
  width: 100%;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0.68rem 1rem;
  background: rgba(0, 255, 255, 0.08);
  color: #00ffff;
  border: 1.5px solid rgba(0, 255, 255, 0.4);
  border-radius: 0 0 8px 8px;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.22s, border-color 0.22s, box-shadow 0.22s;
  font-family: Helvetica, Arial, sans-serif;
  box-sizing: border-box;
  width: 100%;
  margin: 0;
}
.opt-btn-blocnotes:hover {
  background: rgba(0, 255, 255, 0.18);
  border-color: #00ffff;
  box-shadow: 0 0 12px rgba(0, 255, 255, 0.3);
}
.opt-btn-blocnotes .bn-counter {
  background: #00ffff;
  color: #000;
  font-size: 0.70rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  margin-left: 2px;
}

/* ── Bouton TTS chapitre dans le panneau nav ── */
.tts-chapter-nav-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0.72rem 1rem;
  background: #2b2821;
  color: #d4bf7f;
  border: 1.5px solid rgba(212, 191, 127, 0.4);
  border-radius: 8px;
  font-size: 0.93rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
  font-family: Helvetica, Arial, sans-serif;
  margin-bottom: 0;
}
.tts-chapter-nav-btn:hover {
  background: #3a3628;
  border-color: #d4bf7f;
  box-shadow: 0 0 10px rgba(212, 191, 127, 0.3);
}

/* ══ MODAL SYNTHÈSE VOCALE ══ */
.tts-panel {
  max-width: 380px;
}

.tts-ref {
  padding: 10px 16px 6px 16px;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.45);
  font-family: Helvetica, Arial, sans-serif;
  letter-spacing: 0.03em;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
}

.tts-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px 8px 16px;
  flex-shrink: 0;
}

.tts-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tts-label {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.6);
  font-family: Helvetica, Arial, sans-serif;
  min-width: 90px;
}

.tts-select {
  flex: 1;
  background: #000;
  color: #fff;
  border: 1.5px solid rgba(0,255,255,0.35);
  border-radius: 6px;
  padding: 5px 7px;
  font-size: 0.82rem;
  font-family: Helvetica, Arial, sans-serif;
  cursor: pointer;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tts-select:focus { outline: none; border-color: #00ffff; }

.tts-range {
  flex: 1;
  accent-color: #00ffff;
  cursor: pointer;
}

.tts-controls {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 10px 16px 6px 16px;
  flex-shrink: 0;
}

.tts-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.tts-btn-play {
  background: rgba(0,255,255,0.18);
  color: #00ffff;
  border: 1.5px solid rgba(0,255,255,0.5);
}
.tts-btn-play:hover { background: rgba(0,255,255,0.32); box-shadow: 0 0 12px rgba(0,255,255,0.4); }

.tts-btn-pause {
  background: rgba(255,200,50,0.12);
  color: #ffc832;
  border: 1.5px solid rgba(255,200,50,0.4);
}
.tts-btn-pause:hover { background: rgba(255,200,50,0.24); }

.tts-btn-stop {
  background: rgba(255,80,80,0.12);
  color: #ff8080;
  border: 1.5px solid rgba(255,80,80,0.4);
}
.tts-btn-stop:hover { background: rgba(255,80,80,0.24); }

.tts-status {
  text-align: center;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.4);
  font-family: Helvetica, Arial, sans-serif;
  padding: 4px 16px 14px 16px;
  flex-shrink: 0;
}

/* ── Bouton Bloc-Notes dans le panneau nav ── */
.bloc-notes-nav-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0.75rem 1rem;
  background: rgba(0,255,255,0.08);
  color: #00ffff;
  border: 1.5px solid rgba(0,255,255,0.4);
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
  font-family: Helvetica, Arial, sans-serif;
  margin-top: 0;
  margin-bottom: 0;
}
.bloc-notes-nav-btn:hover {
  background: rgba(0,255,255,0.18);
  border-color: #00ffff;
  box-shadow: 0 0 12px rgba(0,255,255,0.3);
}

/* Badge compteur du Bloc-Notes */
.bn-counter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  background: #00ffff;
  color: #000000;
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  margin-left: 2px;
}


/* Header sticky */
.verse-modal-header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: #0c1021;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 10px 18px 10px 18px;
  border-bottom: 1px solid rgba(0, 255, 255, 0.2);
  flex-shrink: 0;
}

/* Ligne du haut : titre bold + actions */
.verse-modal-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
}

/* Ligne du bas : référence seule */
.verse-modal-header-bottom {
  display: flex;
  align-items: center;
  padding-top: 3px;
}

/* Le titre prend tout l'espace disponible à gauche */
.verse-modal-title {
  display: contents; /* les enfants (b + span) remontent dans le flux flex parent */
}

/* Actions groupées à droite : bouton note + close */
.verse-modal-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Variante scroll-top du bouton : même style, couleur ambrée distincte */
.btn-texte-chapitre--scroll-top {
  border-color: rgba(200, 169, 110, 0.7);
  color: #c8a96e;
}
.btn-texte-chapitre--scroll-top:hover {
  background: rgba(200, 169, 110, 0.15);
  border-color: #c8a96e;
  color: #e8c882;
  box-shadow: 0 0 12px rgba(200, 169, 110, 0.35);
}

.verse-modal-title b {
  color: #00ffff;
  font-weight: bold;
  font-size: 1.15em;
  font-family: 'Lucida Sans', Helvetica, sans-serif;
}

.verse-modal-ref {
  color: rgba(255,255,255,0.5);
  font-size: 0.78rem;
  font-family: 'Lucida Sans', Helvetica, sans-serif;
  letter-spacing: 0.04em;
}

.verse-modal-label {
  display: block;
  color: rgba(0,255,255,0.5);
  font-size: 0.65rem;
  font-family: 'Lucida Sans', Helvetica, sans-serif;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.verse-modal-close {
  background: transparent;
  border: 1.5px solid rgba(0,255,255,0.4);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #00ffff;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.verse-modal-close:hover {
  background: #00ffff;
  color: #000;
  border-color: #00ffff;
}

/* Zone scrollable unique (versebox + note) */
.verse-modal-scroll {
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  scroll-behavior: smooth;
}
.verse-modal-scroll::-webkit-scrollbar { width: 6px; }
.verse-modal-scroll::-webkit-scrollbar-track { background: rgba(0,255,255,0.05); border-radius: 6px; }
.verse-modal-scroll::-webkit-scrollbar-thumb { background: rgba(0,255,255,0.3); border-radius: 6px; }
.verse-modal-scroll::-webkit-scrollbar-thumb:hover { background: rgba(0,255,255,0.55); }

/* Verset — premier élément dans la zone scrollable */
.verse-modal-versebox {
  background: rgba(0, 255, 255, 0.06);
  border-left: 3px solid #00ffff;
  padding: 10px 16px;
  margin: 14px 18px 0 18px;
  border-radius: 0 6px 6px 0;
  font-size: 1.05rem;
  line-height: 1.6;
  color: #fff;
  flex-shrink: 0;
}
.verse-modal-num { color: #00ffff; font-weight: 700; font-size: 1.2rem; margin-right: 6px; }
.verse-modal-versetext { color: #ffffff; }

/* Note — second élément dans la zone scrollable */
.verse-modal-body {
  padding: 16px 18px 28px 18px;
  font-family: 'Lucida Sans', Helvetica, sans-serif;
  font-size: 0.97rem;
  line-height: 1.75;
  color: #dce3ee;
}

/* Styles du contenu issu de descriptif.html */
.verse-modal-body dfn {
  font-style: italic;
  font-weight: bold;
  color: #fc9a46;
}

.verse-modal-body cite {
  font-style: italic;
}

.verse-modal-body strong {
  font-weight: bold;
  color: #ffffff;
}

.verse-modal-body em {
  font-style: italic;
}

.verse-modal-body code {
  font-weight: bold;
  font-family: 'Lucida Sans', Helvetica, sans-serif;
  font-size: 0.82em;
  background-color: #FFF168;
  color: #000;
  padding: 1px 5px;
  margin: 0 2px;
  border-radius: 2px;
}

.verse-modal-body b {
  color: #00ffff;
  font-weight: bold;
  font-size: 1.05em;
}

/* ── Note de section (note-section) ── */
.verse-modal-body .note-section {
  background: linear-gradient(135deg, #0d1b2a 0%, #0a1520 100%);
  color: #cdd9e8;
  padding: 18px 20px;
  margin-bottom: 12px;
  border-radius: 10px;
  border: 1px solid rgba(0, 255, 255, 0.18);
  border-left: 3px solid #00ffff;
  list-style: none;
  max-height: 55vh;
  overflow-y: auto;
  scroll-behavior: smooth;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(0, 255, 255, 0.06);
}
.verse-modal-body .note-section::-webkit-scrollbar { width: 6px; }
.verse-modal-body .note-section::-webkit-scrollbar-track { background: rgba(0, 255, 255, 0.04); border-radius: 6px; }
.verse-modal-body .note-section::-webkit-scrollbar-thumb { background: rgba(0, 255, 255, 0.3); border-radius: 6px; }
.verse-modal-body .note-section::-webkit-scrollbar-thumb:hover { background: rgba(0, 255, 255, 0.55); }

.verse-modal-body .note-section-sous-titre {
  background: rgba(139, 111, 71, 0.25);
  color: #c8a96e;
  border: 1px solid rgba(139, 111, 71, 0.4);
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 0.85em;
  letter-spacing: 0.04em;
}

/* Titres forts dans note-section */
.verse-modal-body .note-section > strong,
.verse-modal-body .note-section strong:first-child {
  display: block;
  color: #00ffff;
  font-size: 1.02em;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(0, 255, 255, 0.15);
  letter-spacing: 0.02em;
}

.verse-modal-body ul {
  list-style: none;
  padding: 0;
}

.verse-modal-body ul ul {
  padding-left: 1.4em;
  margin-top: 6px;
}

.verse-modal-body ul ul li {
  position: relative;
  padding: 3px 0 3px 0.5em;
  color: #b8c8d8;
}

.verse-modal-body ul ul li::before {
  content: "›";
  position: absolute;
  left: -0.8em;
  color: #00ffff;
  font-weight: bold;
  opacity: 0.7;
}

/* Variante texte (note de chapitre) — conteneur scrollable explicite */
.verse-modal-texte {
  padding-top: 12px;
  overflow-y: auto;
  flex: 1;
  scroll-behavior: smooth;
}
.verse-modal-texte::-webkit-scrollbar { width: 6px; }
.verse-modal-texte::-webkit-scrollbar-track { background: rgba(0,255,255,0.04); border-radius: 6px; }
.verse-modal-texte::-webkit-scrollbar-thumb { background: rgba(0,255,255,0.3); border-radius: 6px; }
.verse-modal-texte::-webkit-scrollbar-thumb:hover { background: rgba(0,255,255,0.55); }

/* ══════════════════════════════════════════
   TABLES RESPONSIVES — style harmonisé
   ══════════════════════════════════════════ */

.verse-modal-body table {
  width: 100%;
  max-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 14px 0 18px 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(0, 255, 255, 0.2);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0, 255, 255, 0.05);
  font-size: 0.84rem;
  color: #cdd9e8;
  display: table;
  table-layout: fixed;
  box-sizing: border-box;
}

/* En-têtes */
.verse-modal-body table th {
  background: linear-gradient(135deg, rgba(0,255,255,0.14) 0%, rgba(0,180,180,0.1) 100%);
  color: #00ffff;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 8px 6px;
  text-align: center;
  border-bottom: 2px solid rgba(0, 255, 255, 0.35);
  white-space: normal;
  word-break: break-word;
  line-height: 1.3;
}

/* Première colonne (labels) */
.verse-modal-body table td:first-child {
  color: #cdd9e8;
  font-weight: 600;
  background: rgba(139, 111, 71, 0.08);
  border-right: 1px solid rgba(139, 111, 71, 0.2);
  white-space: normal;
  word-break: break-word;
  padding: 8px 6px;
  line-height: 1.35;
}

/* Cellules normales */
.verse-modal-body table td {
  padding: 8px 6px;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.15s ease;
  color: #cdd9e8;
  white-space: normal;
  word-break: break-word;
  line-height: 1.35;
}

/* Cellule vide (coin supérieur gauche) */
.verse-modal-body table td:empty,
.verse-modal-body table th:empty {
  background: #080e18;
}

/* Lignes alternées */
.verse-modal-body table tr:nth-child(even) td {
  background: rgba(0, 255, 255, 0.03);
}
.verse-modal-body table tr:nth-child(even) td:first-child {
  background: rgba(139, 111, 71, 0.12);
}

/* Hover sur les lignes */
.verse-modal-body table tr:hover td {
  background: rgba(0, 255, 255, 0.07);
}
.verse-modal-body table tr:hover td:first-child {
  background: rgba(139, 111, 71, 0.18);
}

/* Dernière ligne : pas de bordure basse */
.verse-modal-body table tr:last-child td {
  border-bottom: none;
}

/* Valeurs em/strong dans les cellules */
.verse-modal-body table em {
  color: #a0c4d8;
  font-style: italic;
}
.verse-modal-body table strong,
.verse-modal-body table b {
  color: #e8d8b0;
  font-weight: 700;
  font-size: inherit;
}

/* Scrollbar de la table sur mobile */
.verse-modal-body table::-webkit-scrollbar { height: 5px; }
.verse-modal-body table::-webkit-scrollbar-track { background: rgba(0,255,255,0.05); border-radius: 4px; }
.verse-modal-body table::-webkit-scrollbar-thumb { background: rgba(0,255,255,0.3); border-radius: 4px; }

/* ── Ligne de groupe (OR / ARGENT) dans table verticale ── */
.verse-modal-body table .table-group-header td {
  background: linear-gradient(90deg, rgba(0,255,255,0.18) 0%, rgba(0,255,255,0.06) 100%);
  color: #00ffff;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 7px 14px;
  border-top: 1px solid rgba(0,255,255,0.3);
  border-bottom: 1px solid rgba(0,255,255,0.15);
  text-align: left;
}
/* Pas de style "première colonne" sur les lignes de groupe */
.verse-modal-body table .table-group-header td:first-child {
  background: linear-gradient(90deg, rgba(0,255,255,0.18) 0%, rgba(0,255,255,0.06) 100%);
  color: #00ffff;
  border-right: none;
  font-weight: 700;
}

/* ── Ligne de conversion franc/euro au-dessus de la table ── */
.verse-modal-body .monnaie-equiv {
  display: block;
  margin-bottom: 6px;
  font-size: 0.82rem;
  color: rgba(200, 169, 110, 0.85);
  letter-spacing: 0.02em;
}
.verse-modal-body .monnaie-equiv small {
  color: rgba(255,255,255,0.35);
  font-size: 0.78em;
}


/* ============================================
   ZOOM - Contrôle de taille du texte
   ============================================ */

.zoom-control {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 0;
  margin-bottom: 0;
  padding: 0.75rem;
  background: rgba(0, 255, 255, 0.05);
  border: 1px solid rgba(0, 255, 255, 0.2);
  border-radius: 10px;
}

.zoom-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  border: 1.5px solid rgba(0, 255, 255, 0.4);
  border-radius: 8px;
  overflow: hidden;
}

.zoom-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: #00ffff;
  font-size: 1rem;
  font-weight: 700;
  font-family: Helvetica, Arial, sans-serif;
  padding: 0.55rem 0.8rem;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  letter-spacing: 0.02em;
}

.zoom-btn:hover {
  background: rgba(0, 255, 255, 0.15);
}

.zoom-btn:active {
  background: rgba(0, 255, 255, 0.3);
}

.zoom-level {
  flex: 1;
  text-align: center;
  color: #ffffff;
  font-size: 0.9rem;
  font-family: 'Lucida Sans', Helvetica, sans-serif;
  font-weight: 600;
  border-left: 1px solid rgba(0, 255, 255, 0.3);
  border-right: 1px solid rgba(0, 255, 255, 0.3);
  padding: 0.55rem 0;
  background: rgba(0,0,0,0.2);
  min-width: 52px;
}


/* Surbrillance temporaire du verset ciblé depuis le Bloc-Notes */
.verse--highlight-goto {
  animation: verseGotoFlash 2s ease-out forwards;
  opacity: 1 !important;
  transform: translateY(0) !important;
}

.verse--highlight-done {
  animation: none !important;
  opacity: 1 !important;
  transform: translateY(0) !important;
}

@keyframes verseGotoFlash {
  0%   { background-color: rgba(0, 255, 255, 0.25); border-radius: 6px; }
  60%  { background-color: rgba(0, 255, 255, 0.15); border-radius: 6px; }
  100% { background-color: transparent; }
}

/* ══════════════════════════════════════════
   TOUTES LES TABLES — Responsive smartphone
   Optimisé Samsung Galaxy A15 (360 × 800 dp)
   ══════════════════════════════════════════ */

/* Wrapper responsive pour TOUTES les tables */
.verse-modal-body table {
  display: table;
  width: 100%;
  max-width: 100%;
  table-layout: fixed;
  box-sizing: border-box;
}

/* TABLE-MONNAIES — 3 colonnes spécifiques */
.verse-modal-body .table-monnaies {
  font-size: 0.80rem;
}

/* Largeurs des 3 colonnes : Unité | Poids | Valeur */
.verse-modal-body .table-monnaies th:nth-child(1),
.verse-modal-body .table-monnaies td:nth-child(1) { width: 40%; }

.verse-modal-body .table-monnaies th:nth-child(2),
.verse-modal-body .table-monnaies td:nth-child(2) { width: 30%; }

.verse-modal-body .table-monnaies th:nth-child(3),
.verse-modal-body .table-monnaies td:nth-child(3) { width: 30%; }

/* En-têtes table-monnaies */
.verse-modal-body .table-monnaies th {
  padding: 8px 5px;
  font-size: 0.70rem;
  letter-spacing: 0.04em;
  white-space: normal;
  word-break: break-word;
  text-align: center;
}

/* Cellules table-monnaies */
.verse-modal-body .table-monnaies td {
  padding: 7px 5px;
  text-align: center;
  white-space: normal;
  word-break: break-word;
  hyphens: auto;
  line-height: 1.35;
  color: #cdd9e8;
}

/* Colonne Unité (1ère) : alignée à gauche */
.verse-modal-body .table-monnaies td:first-child {
  text-align: left;
  padding-left: 7px;
  white-space: normal;
  font-size: 0.79rem;
  color: #cdd9e8;
}

/* "(50 sicles)" sur une ligne séparée */
.verse-modal-body .table-monnaies td:first-child small {
  display: block;
  font-size: 0.67rem;
  opacity: 0.75;
  margin-top: 1px;
  color: #cdd9e8;
}

/* Lignes de groupe OR / ARGENT */
.verse-modal-body .table-monnaies .table-group-header td {
  text-align: left;
  padding: 6px 7px;
  font-size: 0.70rem;
  letter-spacing: 0.10em;
}

/* Ligne equiv franc/euro */
.verse-modal-body .monnaie-equiv {
  font-size: 0.75rem;
  line-height: 1.5;
  word-break: break-word;
}

/* ── Galaxy A15 portrait (≤ 390px) ── */
@media (max-width: 390px) {
  .verse-modal-body table {
    font-size: 0.80rem;
  }
  .verse-modal-body table th {
    font-size: 0.70rem;
    padding: 7px 4px;
    letter-spacing: 0.03em;
  }
  .verse-modal-body table td {
    padding: 7px 4px;
    font-size: 0.80rem;
    color: #cdd9e8;
  }
  .verse-modal-body table td:first-child {
    padding-left: 5px;
    font-size: 0.80rem;
    color: #cdd9e8;
  }
  .verse-modal-body .table-monnaies {
    font-size: 0.76rem;
  }
  .verse-modal-body .table-monnaies th {
    font-size: 0.66rem;
    padding: 7px 3px;
  }
  .verse-modal-body .table-monnaies td {
    padding: 6px 3px;
    font-size: 0.76rem;
    color: #cdd9e8;
  }
  .verse-modal-body .table-monnaies td:first-child {
    padding-left: 5px;
    font-size: 0.75rem;
    color: #cdd9e8;
  }
}


/* ============================================
   WELCOME SCREEN — Menu de navigation
   ============================================ */

.welcome-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    margin: 0;
    text-align: left;
}

.welcome-menu-btn {
    display: block;
    width: 100%;
    padding: 10px 16px;
    background: rgba(255,255,255,0.06);
    color: #ffffff;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    font-size: 0.95rem;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.18s, border-color 0.18s;
    font-family: inherit;
}

.welcome-menu-btn:hover {
    background: rgba(0,255,255,0.12);
    border-color: rgba(0,255,255,0.35);
    color: #00ffff;
}

.welcome-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.welcome-menu-toggle .toggle-icon {
    transition: transform 0.28s cubic-bezier(0.4, 0.0, 0.2, 1);
    flex-shrink: 0;
}

.welcome-menu-toggle[aria-expanded="true"] .toggle-icon {
    transform: rotate(180deg);
}

.welcome-menu-group {
    display: flex;
    flex-direction: column;
}

/* Sous-menu : fermé par défaut */
.welcome-submenu {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 0;
    padding-left: 12px;
    border-left: 2px solid rgba(0,255,255,0.2);
    /* Animation douce */
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.42s cubic-bezier(0.4, 0.0, 0.2, 1),
                opacity 0.30s ease,
                margin-top 0.28s ease;
}

/* Sous-menu ouvert */
.welcome-submenu.is-open {
    max-height: 700px;
    opacity: 1;
    margin-top: 4px;
    overflow-y: auto;
}

/* Scrollbar sous-menu */
.welcome-submenu::-webkit-scrollbar { width: 4px; }
.welcome-submenu::-webkit-scrollbar-track { background: rgba(0,255,255,0.04); border-radius: 4px; }
.welcome-submenu::-webkit-scrollbar-thumb { background: rgba(0,255,255,0.2); border-radius: 4px; }
.welcome-submenu::-webkit-scrollbar-thumb:hover { background: rgba(0,255,255,0.4); }

.welcome-submenu-btn {
    display: block;
    padding: 7px 12px;
    background: rgba(255,255,255,0.04);
    color: #cccccc;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 6px;
    font-size: 0.88rem;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    font-family: inherit;
}

.welcome-submenu-btn:hover {
    background: rgba(0,255,255,0.10);
    color: #00ffff;
    border-color: rgba(0,255,255,0.2);
}

.welcome-submenu-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(0,255,255,0.55);
    padding: 8px 12px 3px;
}

.navigation-hint {
    margin-top: 24px;
}


/* ============================================
   MODALES SOUS-MENUS — Welcome screen
   ============================================ */

.submenu-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9000;
    align-items: flex-end;  /* panel remonte depuis le bas */
    justify-content: center;
}

.submenu-modal.is-open {
    display: flex;
}

/* Fond semi-transparent */
.submenu-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    animation: smOverlayIn 0.25s ease forwards;
}

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

/* Panneau */
.submenu-modal-panel {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 480px;
    max-height: 80vh;
    background: #111418;
    border-top: 2px solid rgba(0, 255, 255, 0.35);
    border-radius: 18px 18px 0 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: smPanelIn 0.32s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

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

/* En-tête de la modale */
.submenu-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.submenu-modal-title {
    font-size: 1rem;
    font-weight: 700;
    color: #00ffff;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.submenu-modal-close {
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 50%;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #ffffff;
    transition: background 0.18s;
    flex-shrink: 0;
}

.submenu-modal-close:hover {
    background: rgba(0, 255, 255, 0.15);
    border-color: rgba(0, 255, 255, 0.3);
    color: #00ffff;
}

/* Corps scrollable */
.submenu-modal-body {
    overflow-y: auto;
    padding: 10px 14px 20px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.submenu-modal-body::-webkit-scrollbar { width: 5px; }
.submenu-modal-body::-webkit-scrollbar-track { background: rgba(0,255,255,0.04); border-radius: 5px; }
.submenu-modal-body::-webkit-scrollbar-thumb { background: rgba(0,255,255,0.22); border-radius: 5px; }
.submenu-modal-body::-webkit-scrollbar-thumb:hover { background: rgba(0,255,255,0.42); }

/* Label de section */
.submenu-modal-label {
    display: block;
    font-size: 0.70rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: rgba(0, 255, 255, 0.50);
    padding: 10px 4px 3px;
}

/* Boutons de lien */
.submenu-modal-btn {
    display: block;
    padding: 9px 14px;
    background: rgba(255,255,255,0.04);
    color: #d0d8e0;
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 8px;
    font-size: 0.90rem;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    font-family: inherit;
}

.submenu-modal-btn:hover {
    background: rgba(0, 255, 255, 0.10);
    color: #00ffff;
    border-color: rgba(0, 255, 255, 0.22);
}

/* ── Animation check SVG Bloc-Notes ── */
@keyframes checkDrawCircle {
    to { stroke-dashoffset: 0; }
}
@keyframes checkDrawMark {
    to { stroke-dashoffset: 0; }
}
@keyframes checkBounce {
    0%   { transform: scale(1); }
    30%  { transform: scale(1.22); }
    55%  { transform: scale(0.93); }
    75%  { transform: scale(1.08); }
    100% { transform: scale(1); }
}
.check-svg-anim {
    display: inline-block;
    vertical-align: middle;
    margin-right: 5px;
    overflow: visible;
}
.check-svg-anim .c-circle {
    fill: none;
    stroke: #22c55e;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-dasharray: 214;
    stroke-dashoffset: 214;
    transform: rotate(-90deg);
    transform-origin: 40px 40px;
    animation: checkDrawCircle 0.35s ease forwards;
}
.check-svg-anim .c-bg {
    fill: none;
    stroke: rgba(34,197,94,0.2);
    stroke-width: 4;
}
.check-svg-anim .c-mark {
    fill: none;
    stroke: #22c55e;
    stroke-width: 6;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 75;
    stroke-dashoffset: 75;
    animation: checkDrawMark 0.3s ease 0.28s forwards;
}
.check-svg-anim {
    animation: checkBounce 0.45s ease 0.58s both;
}

/* ── Compteur SVG animé Bloc-Notes ── */
.bn-counter-svg {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-left: 4px;
}
.bn-counter-svg svg {
  display: block;
  transform: rotate(-90deg);
}
.bn-c-bg {
  fill: rgba(0,229,200,0.15);
  stroke: rgba(0,229,200,0.25);
  stroke-width: 2.5;
}
.bn-c-progress {
  fill: none;
  stroke: #00e5c8;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 87.96; /* 2*PI*14 */
  stroke-dashoffset: 87.96;
  transition: stroke-dashoffset 0.05s;
}
.bn-c-number {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
  font-size: 0.78rem;
  font-weight: 800;
  color: #00e5c8;
  line-height: 1;
  transition: transform 0.16s cubic-bezier(.34,1.56,.64,1);
  pointer-events: none;
  font-family: Helvetica, Arial, sans-serif;
}
