/* ========================================
   ROSAIRE INTERACTIF — Styles
   ======================================== */

/* Container */
.rosary-view {
  padding-bottom: 80px;
}

.rosary-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.rosary-header h2 {
  font-size: 1.15rem;
  margin: 0;
  flex: 1;
}

/* Progress bar */
.rosary-progress-bar {
  width: 100%;
  height: 4px;
  background: var(--color-border, #e0d5c1);
  border-radius: 2px;
  margin-bottom: 20px;
  overflow: hidden;
}

.rosary-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #c9b037, #dfc95f);
  border-radius: 2px;
  transition: width 0.4s ease;
}

/* ---- SVG Chapelet ---- */
.rosary-chapelet-container {
  display: flex;
  justify-content: center;
  margin: 0 auto 20px;
  max-width: 300px;
}

.rosary-chapelet-container svg {
  width: 100%;
  height: auto;
  max-width: 280px;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.08));
}

/* Grains SVG */
.rosary-grain {
  transition: all 0.3s ease;
  cursor: pointer;
}

.rosary-grain circle,
.rosary-grain ellipse {
  transition: fill 0.3s ease, stroke 0.3s ease, opacity 0.3s ease;
}

.rosary-grain.grain-future circle,
.rosary-grain.grain-future ellipse {
  fill: var(--color-surface, #f5f0e8);
  stroke: #b8a87a;
  stroke-width: 1;
  opacity: 0.6;
}

.rosary-grain.grain-passed circle,
.rosary-grain.grain-passed ellipse {
  fill: #d4c78f;
  stroke: #b8a87a;
  stroke-width: 1;
  opacity: 0.45;
}

.rosary-grain.grain-active circle,
.rosary-grain.grain-active ellipse {
  fill: #c9b037;
  stroke: #a08520;
  stroke-width: 2;
  filter: drop-shadow(0 0 6px rgba(201, 176, 55, 0.6));
}

/* Animation pulse pour le grain actif */
@keyframes rosary-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

.rosary-grain.grain-active {
  animation: rosary-pulse 2s ease-in-out infinite;
  transform-origin: center;
}

/* Croix SVG */
.rosary-cross line,
.rosary-cross rect {
  stroke: #8b7355;
  stroke-width: 2;
}

.rosary-cross.cross-active line,
.rosary-cross.cross-active rect {
  stroke: #c9b037;
  filter: drop-shadow(0 0 4px rgba(201, 176, 55, 0.5));
}

.rosary-cross.cross-passed line,
.rosary-cross.cross-passed rect {
  stroke: #b8a87a;
  opacity: 0.5;
}

/* ---- Zone de texte de prière ---- */
.rosary-prayer-zone {
  background: var(--color-surface, #f5f0e8);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1px solid var(--color-border, #e0d5c1);
}

.rosary-mystery-announce {
  text-align: center;
  margin-bottom: 12px;
}

.rosary-mystery-number {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-muted, #8b7355);
  margin-bottom: 4px;
}

.rosary-mystery-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: #c9b037;
  margin-bottom: 4px;
}

.rosary-mystery-fruit {
  font-style: italic;
  font-size: 0.85rem;
  color: var(--color-muted, #8b7355);
  margin-bottom: 8px;
}

.rosary-mystery-meditation {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--color-text, #2c2416);
  text-align: center;
  margin-bottom: 12px;
  font-style: italic;
}

.rosary-prayer-type {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #c9b037;
  text-align: center;
  margin-bottom: 8px;
  font-weight: 600;
}

.rosary-prayer-text {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text, #2c2416);
  text-align: center;
}

/* Compteur dizaine / grain */
.rosary-counter {
  text-align: center;
  font-size: 0.8rem;
  color: var(--color-muted, #8b7355);
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--color-border, #e0d5c1);
}

/* ---- Contrôles ---- */
.rosary-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 16px 0;
}

.rosary-btn-next {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #c9b037, #a08520);
  color: white;
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(201, 176, 55, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.rosary-btn-next:active {
  transform: scale(0.92);
  box-shadow: 0 2px 8px rgba(201, 176, 55, 0.25);
}

.rosary-btn-prev {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--color-border, #e0d5c1);
  background: var(--color-surface, #f5f0e8);
  color: var(--color-muted, #8b7355);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.rosary-btn-prev:active {
  transform: scale(0.92);
}

.rosary-btn-prev:disabled {
  opacity: 0.3;
  cursor: default;
}

/* Bouton terminer */
.rosary-btn-end {
  display: block;
  margin: 8px auto 0;
  padding: 8px 20px;
  border: 1px solid var(--color-border, #e0d5c1);
  border-radius: 8px;
  background: transparent;
  color: var(--color-muted, #8b7355);
  font-size: 0.85rem;
  cursor: pointer;
}

/* ---- Dark theme overrides ---- */
.dark .rosary-prayer-zone {
  background: #2a2520;
  border-color: #3a3530;
}

.dark .rosary-grain.grain-future circle,
.dark .rosary-grain.grain-future ellipse {
  fill: #3a3530;
  stroke: #5a5040;
}

.dark .rosary-grain.grain-passed circle,
.dark .rosary-grain.grain-passed ellipse {
  fill: #5a5030;
  stroke: #6a6040;
}

.dark .rosary-cross line,
.dark .rosary-cross rect {
  stroke: #6a6040;
}

.dark .rosary-btn-prev {
  background: #3a3530;
  border-color: #4a4540;
}

/* ---- Sepia theme overrides ---- */
.sepia .rosary-prayer-zone {
  background: #f0e6d0;
  border-color: #d8cbb0;
}

/* ---- Responsive ---- */
@media (max-width: 360px) {
  .rosary-chapelet-container svg {
    max-width: 240px;
  }

  .rosary-btn-next {
    width: 64px;
    height: 64px;
    font-size: 1.5rem;
  }

  .rosary-prayer-zone {
    padding: 14px;
  }
}

/* Transition douce entre les grains */
.rosary-prayer-zone {
  transition: opacity 0.2s ease;
}

.rosary-prayer-fade {
  opacity: 0.5;
}
