/* === Base === */
body {
  margin: 0;
  font-family: 'Cormorant Garamond', serif;
  text-align: center;
  color: gold;
  background: radial-gradient(circle, #1b2a48 0%, #0e1528 100%);
  transition: background 0.3s, color 0.3s;
}
.hidden { display: none !important; }

/* === Header === */
header {
  position: relative;
  text-align: center;
  padding: 10px 0;
}
.logo {
  max-width: 140px;
  height: auto;
  display: inline-block;
  filter: drop-shadow(0 0 10px rgba(255,215,0,0.6));
}
#menu-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  background: rgba(27, 42, 72, 0.5);
  border: 2px solid gold;
  border-radius: 5px;
  color: gold;
  font-size: 1.4rem;
  padding: 5px 10px;
  cursor: pointer;
  transition: all 0.3s ease;
}
#menu-btn:hover { background: gold; color: #1b2a48; }

/* === Écran accueil === */
#home-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 50vh;
}
.mystery-btn {
  font-family: 'MisselText', serif;
  background: rgba(27, 42, 72, 0.6);
  border: 2px solid gold;
  color: gold;
  padding: 12px 24px;
  margin: 10px;
  font-size: 1.3rem;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
}
.mystery-btn:hover:not(:disabled) {
  background: gold;
  color: #1b2a48;
  box-shadow: 0 0 10px gold;
}
.mystery-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* Boutons In Principio / In Fine */
.principio-container, .fine-container {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 15px 0;
  gap: 10px;
}
.principio-btn, .fine-btn {
  background: #1a1a1a;
  border: 2px solid gold;
  border-radius: 8px;
  color: gold;
  font-size: 1.2rem;
  padding: 6px 20px;
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.3);
  transition: all 0.3s ease;
}
.principio-btn:hover, .fine-btn:hover {
  background: gold;
  color: black;
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.7);
  cursor: pointer;
}
.rosace {
  font-size: 1.4rem;
  color: gold;
}

/* === App / Rosaire === */
#app { padding-top: 10px; }
#rosary {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 340px;
  margin: 15px auto;
  gap: 6px;
}
.bead {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #5a3a1a, #2b1b10);
  box-shadow: inset -1px -1px 3px rgba(0,0,0,0.8), 0 0 2px rgba(0,0,0,0.6);
}
.bead.pater { width: 22px; height: 22px; background: radial-gradient(circle at 30% 30%, #4a2d14, #1f1208); }
.bead.active { background: radial-gradient(circle at 30% 30%, #ffd700, #a37c00); box-shadow: 0 0 5px gold; }
.cross {
  width: 18px;
  height: 28px;
  background: linear-gradient(135deg, #3c2b1e, #1d130b);
  margin-bottom: 5px;
  border-radius: 3px;
}
.card {
  background: rgba(0, 0, 0, 0.75);
  border: 1px solid gold;
  border-radius: 18px;
  margin: 20px auto;
  padding: 20px;
  max-width: 90%;
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.15);
}

/* === Overlay de transition (popup) === */
#transition-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.95);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 3000;
}
#transition-overlay.show {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}
.mystery-popup {
  background: rgba(0, 0, 0, 0.9);
  border: 2px solid gold;
  border-radius: 16px;
  max-width: 90%;
  padding: 20px;
  text-align: center;
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
  color: gold;
}
.mystery-popup h2 { margin: 0 0 8px; font-size: 1.5rem; text-transform: uppercase; }
.mystery-popup h3 { margin: 0 0 10px; font-size: 1.2rem; }
.mystery-popup p  { margin: 10px 0; font-size: 1rem; }
.mystery-popup .tap-to-continue { opacity: .75; font-size: .9rem; }

/* === Menu latéral === */
#side-menu {
  position: fixed;
  top: 0; left: 0;
  width: 70%; max-width: 280px; height: 100%;
  background: rgba(0, 0, 0, 0.95);
  color: gold;
  transform: translateX(-100%);
  transition: transform 0.3s ease-in-out;
  z-index: 2500;
  display: flex;
  flex-direction: column;
}
#side-menu.show { transform: translateX(0); }
#menu-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.6);
  opacity: 0; visibility: hidden; transition: opacity 0.3s;
  z-index: 2400;
}
#menu-overlay.show { opacity: 1; visibility: visible; }

/* Bloc utilisateur avec image profil */
.user-section { text-align: center; margin: 20px 0; }
.profile-pic-wrapper { display: flex; justify-content: center; margin: 10px 0; }
#user-pic {
  width: 80px; height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid gold;
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.8);
  display: block;
  margin: 0 auto 10px auto;
}
#user-name { font-size: 1.2rem; margin: 8px 0 15px; color: gold; }
.profile-btn, .logout-btn {
  width: 80%; display: block; margin: 8px auto;
  padding: 10px; border: 1px solid gold; background: none;
  color: gold; border-radius: 6px; cursor: pointer;
}
.profile-btn:hover, .logout-btn:hover { background: gold; color: #1b2a48; }
.logout-btn { border-color: red; color: red; }
.logout-btn:hover { background: red; color: white; }

.menu-separator { width: 90%; margin: 15px auto; border-top: 1px solid rgba(255,215,0,0.4); }
.menu-actions { display: flex; flex-direction: column; gap: 10px; padding: 0 10px; }
.btn-exit, .btn-close {
  border-radius: 6px; padding: 10px; cursor: pointer;
  background: none;
}
.btn-exit { border: 1px solid red; color: red; }
.btn-exit:hover { background: red; color: white; }
.btn-close { border: 1px solid gold; color: gold; }
.btn-close:hover { background: gold; color: #1b2a48; }

/* === Thèmes === */
body.night-mode { background: #000; color: gold; }
body.day-mode { background: #fdfbf7; color: #1d1d1d; }
body.day-mode .card { background: rgba(255,255,255,0.95); border: 1px solid #ccc; color: #1d1d1d; }
body.day-mode .mystery-btn { background: #f0f0f0; color: #1d1d1d; border: 2px solid #555; }
body.day-mode .mystery-btn:hover { background: #1d1d1d; color: white; }

/* === Polices === */
@font-face { font-family: 'MisselInitial'; src: url('fonts/GoudyInitialen.ttf') format('truetype'); }
@font-face { font-family: 'MisselText'; src: url('fonts/IMFellDWPica-Regular.ttf') format('truetype'); }
@font-face { font-family: 'MisselText'; src: url('fonts/IMFellDWPica-Italic.ttf') format('truetype'); font-style: italic; }

/* === Prières === */
.prayer {
  font-family: 'MisselText', serif;
  font-size: 1.3rem;
  line-height: 1.3;
  text-align: justify;
  color: white;
  min-height: 3.5em;
}
.prayer::first-letter {
  font-family: 'MisselInitial';
  font-size: clamp(3rem, 7vw, 4.5rem);
  float: left;
  line-height: 0.9;
  margin-right: 8px;
  color: gold;
}
.mystery-popup {
  background: rgba(0, 0, 0, 0.92);
  border: 2px solid gold;
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  max-width: 95%;
  margin: 0 auto;
  box-shadow: 0 0 25px rgba(255, 215, 0, 0.4);
}

.mystery-popup h2 {
  font-size: 1.3rem;
  margin-bottom: 15px;
  color: gold;
  text-transform: uppercase;
}

.mystery-choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 15px;
}

.mystery-choices .mystery-btn {
  font-size: 1.1rem;
  padding: 10px;
  border-radius: 8px;
  border: 2px solid gold;
  background: rgba(27, 42, 72, 0.8);
  color: gold;
  transition: all 0.3s ease;
}
.mystery-choices .mystery-btn:hover {
  background: gold;
  color: black;
  box-shadow: 0 0 10px gold;
}

/* === Bouton Annuler stylisé === */
.cancel-btn {
  display: block;
  margin: 0 auto;
  font-size: 1rem;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid red;
  background: transparent;
  color: red;
  transition: all 0.3s ease;
}
.cancel-btn:hover {
  background: red;
  color: white;
  box-shadow: 0 0 10px rgba(255, 0, 0, 0.6);
}
.language-selector {
  margin: 10px auto;
  text-align: center;
  color: gold;
}
.language-selector label {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 5px;
}
#language-select {
  background: rgba(27, 42, 72, 0.8);
  border: 1px solid gold;
  border-radius: 6px;
  color: gold;
  padding: 6px;
  font-size: 1rem;
  width: 80%;
}
#language-select:focus {
  outline: none;
  box-shadow: 0 0 6px gold;
}
/* === Correctifs Mode Jour & Boutons === */

/* Texte des prières lisible en mode jour */
body.day-mode .prayer {
  color: #1d1d1d; /* texte sombre */
}
body.day-mode .prayer::first-letter {
  color: #8b6f00; /* doré plus doux pour rester lisible */
}

/* Boutons In Principio / In Fine plus courts */
.principio-btn, .fine-btn {
  padding: 6px 12px; /* réduit la largeur */
  font-size: 1rem;   /* texte un peu plus petit */
  min-width: 120px;  /* largeur uniforme */
  text-align: center;
}
/* === Style pour les V/℣ et R/℟ des prières === */
.prayer .versiculus,
.prayer .responsum {
  font-family: serif;
  font-style: italic;
  font-weight: bold;
  color: gold;
  margin-right: 4px;
}
/* === Bouton de don === */
.donate-btn {
  display: block;
  background: #ffcc33;
  color: #1d1d1d;
  font-weight: bold;
  padding: 10px 15px;
  border-radius: 8px;
  text-align: center;
  margin: 10px auto;
  max-width: 200px;
  box-shadow: 0 0 6px rgba(0,0,0,0.3);
  transition: all 0.3s ease;
}
.donate-btn:hover {
  background: #ffd84d;
  box-shadow: 0 0 10px rgba(255,204,51,0.8);
}

/* === POPUP DON === */
#donate-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none; /* caché par défaut */
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.7);
  z-index: 9999; /* pour passer par-dessus tout */
  opacity: 0;
  transition: opacity 0.3s ease;
}

#donate-overlay.show {
  display: flex;
  opacity: 1;
}

.donate-popup {
  background: #fff;
  color: #000;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  max-width: 90%;
  text-align: center;
  animation: scaleIn 0.3s ease;
}

.donate-popup h2 {
  margin-top: 0;
  font-size: 1.5rem;
}

.donate-popup button {
  margin: 10px 5px 0;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.donate-popup button:first-of-type {
  background: #0070ba;
  color: white;
}

.donate-popup button:last-of-type {
  background: #aaa;
  color: white;
}

/* Petit effet d'apparition */
@keyframes scaleIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
/* === Popup choix des mystères === */
#mystery-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

#mystery-overlay.show {
  display: flex;
}

.mystery-popup-menu {
  background: rgba(20, 20, 20, 0.95);
  border: 2px solid #d4af37; /* doré */
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
  max-width: 320px;
  width: 85%;
}

.mystery-popup-menu h2 {
  color: #d4af37;
  font-size: 1.4rem;
  margin-bottom: 15px;
  text-shadow: 0 0 6px rgba(212,175,55,0.7);
}

.mystery-popup-btn {
  background: transparent;
  border: 2px solid #d4af37;
  color: #d4af37;
  font-size: 1.1rem;
  margin: 8px 0;
  padding: 10px;
  border-radius: 12px;
  width: 100%;
  transition: background 0.2s ease, color 0.2s ease;
}

.mystery-popup-btn:hover {
  background: #d4af37;
  color: #000;
}

.cancel-btn {
  background: #800000;
  border: 2px solid #a00;
  color: white;
  margin-top: 10px;
  padding: 10px;
  border-radius: 12px;
  width: 100%;
  font-size: 1rem;
  transition: background 0.2s ease;
}

.cancel-btn:hover {
  background: #a00;
}
/* Permettre le scroll si le texte de prière est trop long */
.card {
  
  -webkit-overflow-scrolling: touch;
  padding-right: 0.5rem; /* pour éviter que le texte colle à la barre de scroll */
}
/* Affichage traduction en dessous du latin */
.translation-small {
  display: block;
  font-size: 0.85em;
  color: #ddd; /* gris clair pour contraste */
  margin-top: 0.3em;
  font-style: italic;
}
.translation-small {
  display: block;
  font-size: 0.85em;
  color: #ddd;
  margin-top: 0.3em;
  font-style: italic;
  opacity: 0;
  animation: fadeIn 0.5s forwards;
}

@keyframes fadeIn {
  to { opacity: 1; }
}
/* === Bouton aide "passer les Ave" === */
.card {
  position: relative; /* Pour positionner le ? en absolu par rapport à la carte */
}

.skip-info {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #1e88e5; /* Bleu doux */
  color: white;
  font-weight: bold;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  box-shadow: 0 0 4px rgba(0,0,0,0.3);
  user-select: none;
  z-index: 10;
}

.skip-info:hover {
  background: #1565c0;
}
/* === Bouton pour changer le type de Rosaire === */
#reset-mode-btn.btn-reset {
  display: block;
  width: 100%;
  margin: 10px 0;
  padding: 10px 14px;
  border: 2px dashed var(--gold, #ffd700);
  border-radius: 8px;
  background: rgba(255, 215, 0, 0.06);
  color: var(--gold, #ffd700);
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.15s ease, box-shadow 0.25s ease;
}

#reset-mode-btn.btn-reset:hover {
  background: rgba(255, 215, 0, 0.15);
  box-shadow: 0 0 6px rgba(255, 215, 0, 0.35);
  transform: translateY(-1px);
}
.section-title {
  text-align: center;
  font-weight: 700;
  text-transform: uppercase;
  margin: .5rem 0 .25rem;
  letter-spacing: .06em;
}
/* Style général des titres de section */
.section-title {
  display: block;
  text-align: center;
  font-size: 0.85rem;  /* plus petit que le titre de prière */
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0.3rem 0 0.5rem 0;
  opacity: 0.7;       /* plus doux visuellement */
  color: #c8b16a;     /* un doré plus pâle que le titre principal */
  font-style: italic; /* facultatif : donne un côté indicatif */
}
.mystery-list.centered {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  margin-top: 2rem;
}

.mystery-list.centered .mystery-btn {
  min-width: 220px;
  font-size: 1.2rem;
}
#menu { position: fixed; inset: 0 0 auto auto; z-index: 9999; }
#menu-btn:focus-visible { outline: 3px solid currentColor; }



/* Bouton thème (header) */
.theme-toggle{
  position: absolute;
  top: 10px;
  right: 60px;            /* à gauche du bouton menu */
  background: rgba(27,42,72,0.5);
  border: 2px solid gold;
  border-radius: 5px;
  color: gold;
  font-size: 1.2rem;
  padding: 5px 8px;
  cursor: pointer;
  transition: all .2s ease;
}
.theme-toggle:hover{ background: gold; color:#1b2a48; }
/* Bouton jour/nuit sur index : même style que choose-mode */
.mode-toggle{
  position: absolute;
  top: 10px;
  right: 60px;          /* à gauche du menu */
  border: 2px solid var(--gold, #ffd700);
  background: rgba(27, 42, 72, 0.5);
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--gold, #ffd700);
  border-radius: 6px;
  padding: 6px 10px;
  z-index: 1000;
  transition: all .2s ease;
}
.mode-toggle:hover { background: var(--gold, #ffd700); color: #1b2a48; }

/* S’assure que le menu reste au-dessus à droite */
#menu-btn{
  position: absolute;
  top: 10px;
  right: 15px;
  z-index: 1001;
}
/* ======== Harmonisation du bloc haut-droite comme sur choose-mode ======== */
.cm-topright{
  position: fixed;
  right: 12px;
  top: 12px;
  display: flex;
  flex-direction: column;   /* Menu au-dessus, thème en dessous */
  gap: 8px;
  align-items: flex-end;
  z-index: 1100;
}

/* Neutralise le positionnement absolu par défaut quand dans .cm-topright */
.cm-topright #menu-btn,
.cm-topright #theme-toggle{
  position: static !important;
  right: auto !important;
  top: auto !important;
  margin: 0;
  min-width: 44px;   /* confort mobile */
  min-height: 44px;
}

/* Style du bouton jour/nuit (même look que choose-mode) */
.mode-toggle{
  border: 2px solid var(--gold, #ffd700);
  background: rgba(27, 42, 72, 0.5);
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--gold, #ffd700);
  border-radius: 6px;
  padding: 6px 10px;
  transition: all .2s ease;
}
.mode-toggle:hover { background: var(--gold, #ffd700); color: #1b2a48; }

/* S’assure que le menu reste au-dessus à droite hors .cm-topright */
#menu-btn{
  position: absolute;
  top: 10px;
  right: 15px;
  z-index: 1001;
}

/* Ancien positionnement du bouton sur index : conservé par défaut, mais inactif dans .cm-topright */
.mode-toggle{
  position: absolute;
  top: 10px;
  right: 60px;
  z-index: 1000;
}
/* à la fin de style.css */
body.day-mode .logo { filter: none; }
/* S'assurer que le bouton d'accueil est toujours cliquable */
.cm-topright { position: fixed; right: 12px; top: 12px; z-index: 9999; }
#theme-toggle.mode-toggle { pointer-events: auto; }

/* Si un overlay recouvre, le bouton passe au-dessus */
#menu-overlay,
#transition-overlay,
#mystery-overlay,
#donate-overlay {
  z-index: 2000; /* inférieur au 9999 de .cm-topright */
}
/* === Fond Marie priant (commun index / choose-mode) === */
body.home-bg {
  min-height: 100vh;
  background-image: url("img/fond.webp");            /* ou url("img/fond.webp") si le fichier est dans /img */
  background-position: center bottom;
  background-repeat: no-repeat;
  background-size: contain;                      /* garde l'image entière visible */
  background-color: #000;                        /* fallback noir */
}

/* Mode jour : le même fond, mais fond blanc + léger halo */
body.day-mode.home-bg {
  background-color: #fff;
  filter: drop-shadow(0 0 6px rgba(255, 215, 0, 0.4));
}

/* === Menu latéral compact === */
#side-menu {
  padding: 8px 0;
}

.user-section {
  margin: 10px 0;
}

.profile-pic-wrapper {
  margin: 6px 0;
}

.language-selector {
  margin: 6px 0;
}

.profile-btn,
.logout-btn,
.btn-exit,
.btn-reset,
.btn-close,
.donate-btn {
  font-size: 0.9rem;
  padding: 6px 10px;
  margin: 6px auto;
  width: 85%;
}

.menu-separator {
  margin: 8px auto;
}
/* ====== Compact/align menu des chapelets (centre) ====== */
/* Accueil */
#home-screen .principio-container,
#home-screen .fine-container {
  gap: 8px;
  margin: 8px 0;
}
#home-screen .rosace { font-size: 18px; margin: 0 6px; }

#home-screen .principio-btn,
#home-screen .fine-btn {
  padding: 8px 14px;
  font-size: 1rem;
  line-height: 1.2;
}

#home-screen .mystery-list.centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;                   /* était plus grand */
  margin: 10px 0 6px;
}
#home-screen .mystery-btn {
  padding: 10px 14px;
  font-size: 1rem;
  line-height: 1.2;
  max-width: 360px;            /* pour éviter les boutons trop larges */
  width: 90%;
}

/* Popup "Choisir un chapelet" */
#mystery-overlay .mystery-popup-menu {
  padding: 12px 14px;          /* plus compact */
  gap: 8px;
}
#mystery-overlay .mystery-popup-btn {
  padding: 10px 14px;
  font-size: 1rem;
  line-height: 1.2;
}
#mystery-overlay .principio-container,
#mystery-overlay .fine-container { margin-top: 8px; }
#mystery-overlay .rosace { font-size: 18px; margin: 0 6px; }

/* Mobile très étroit : encore un léger compactage */
@media (max-width: 420px) {
  #home-screen .mystery-btn,
  #home-screen .principio-btn,
  #home-screen .fine-btn,
  #mystery-overlay .mystery-popup-btn {
    padding: 8px 12px;
    font-size: 0.95rem;
  }
}

/* ====== Ré-aérer un peu le menu latéral ====== */
#side-menu { padding: 10px 0; } /* était 8px */
.profile-btn, .logout-btn, .btn-exit, .btn-reset, .btn-close, .donate-btn {
  padding: 8px 12px;           /* remonte un peu le confort tactile */
  margin: 8px auto;
  width: 85%;
}
.menu-separator { margin: 8px auto; }

/* Conteneur du logo avec un fond noir transparent */
.logo-wrapper {
  display: inline-block;
  padding: 10px 20px;        /* espace autour du logo */
  background-color: rgba(0, 0, 0, 0.45); /* noir avec 45% d'opacité */
  border-radius: 12px;       /* coins arrondis, optionnel */
  backdrop-filter: blur(2px); /* léger flou derrière pour un effet plus doux */
}

.logo-wrapper img.logo {
  display: block;
  max-width: 100%;  /* ← fixe une largeur max en pixels */
  width: 100%;
  height: auto;
  margin: 0 auto;     /* centre le logo */
}
/* Taille du logo header et menu, priorité forte */
#hero-logo,
#menu-logo {
  max-width: 140px;   /* ajuste 120–160px selon ton goût */
  width: 100%;
  height: auto;
}

/* si tu gardes .logo-wrapper */
.logo-wrapper { width: fit-content; }
/* === Ruban noir derrière le logo avec bords estompés === */
/* === Ruban noir derrière le logo avec bords estompés (uniquement mode nuit) === */
body.night-mode .logo-strip {
  width: 100%;
  padding: 10px 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;

  /* masque de fondu latéral */
  -webkit-mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
          mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
}

/* Fallback si mask non supporté (Firefox sans flag) */
@supports not (mask-image: linear-gradient(#000,#000)) {
  body.night-mode .logo-strip {
    background:
      linear-gradient(to right, transparent, rgba(0,0,0,0.55) 18%, rgba(0,0,0,0.55) 82%, transparent);
    backdrop-filter: blur(2px);
  }
}

/* Désactive complètement le ruban en mode jour */
body.day-mode .logo-strip {
  background: none !important;
  -webkit-mask-image: none !important;
          mask-image: none !important;
  backdrop-filter: none !important;
}
/* Bouton Accueil "maison" sous Menu & Jour/Nuit */
.home-fixed{
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 6px;
  background: #7a1b28;        /* bordeaux (jour) */
  color: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.25);
  text-decoration: none;       /* <a> sans soulignement */
}

.home-fixed svg{
  width: 20px;
  height: 20px;
  fill: currentColor;          /* icône blanche */
}

/* hover/active */
.home-fixed:hover{ filter: brightness(1.08); }
.home-fixed:active{ transform: translateY(1px); }

/* Mode nuit : teinte adaptée */
.night-mode .home-fixed{ background: #c23a3a; }

/* Mobile : un poil plus petit */
@media (max-width: 480px){
  .home-fixed{ width: 32px; height: 32px; }
  .home-fixed svg{ width: 18px; height: 18px; }
}
/* ================== Boutons top-right : harmonisation ================== */
/* Variables de thème (couleurs communes aux 3 boutons) */
.day-mode{
  --ctrl-bg: #0f1a2b;      /* fond navy discret (sur fond blanc) */
  --ctrl-fg: #ffd54a;      /* or doux pour l’icône/texte */
  --ctrl-br: #ffd54a;      /* bordure or */
  --ctrl-bg-hover: #15243a;
}

.night-mode{
  --ctrl-bg: #0b0f16;      /* fond très sombre */
  --ctrl-fg: #f3c74c;      /* or un peu plus chaud */
  --ctrl-br: #f3c74c;      /* bordure or */
  --ctrl-bg-hover: #121a27;
}

/* Pile verticale propre */
.cm-topright{
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 12px !important;                     /* même espacement entre les 3 */
}

/* Style commun aux 3 contrôles (mêmes dimensions/arrondis/bordure) */
.cm-topright #menu-btn,
.cm-topright #theme-toggle,
.cm-topright #home-fixed{
  width: 56px !important;
  height: 56px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: var(--ctrl-bg) !important;
  color: var(--ctrl-fg) !important;
  border: 3px solid var(--ctrl-br) !important;
  border-radius: 12px !important;
  box-shadow: 0 2px 6px rgba(0,0,0,.28) !important;
  padding: 0 !important;
  margin: 0 !important;
  line-height: 1 !important;
  text-decoration: none !important;         /* utile pour le <a> #home-fixed */
  cursor: pointer !important;
}

/* Icône maison en SVG ou emoji : forcer la teinte et la taille */
.cm-topright #home-fixed svg{
  width: 24px !important;
  height: 24px !important;
  fill: currentColor !important;            /* suit var(--ctrl-fg) */
}
.cm-topright #home-fixed{ font-size: 22px !important; } /* si tu utilises 🏠 */

.cm-topright #menu-btn,
.cm-topright #theme-toggle{
  font-size: 22px !important;               /* ☰ & ☀️/🌙 à la même taille visuelle */
}

/* Hover / Active / Focus */
.cm-topright #menu-btn:hover,
.cm-topright #theme-toggle:hover,
.cm-topright #home-fixed:hover{
  background: var(--ctrl-bg-hover) !important;
}
.cm-topright #menu-btn:active,
.cm-topright #theme-toggle:active,
.cm-topright #home-fixed:active{
  transform: translateY(1px);
}
.cm-topright #menu-btn:focus-visible,
.cm-topright #theme-toggle:focus-visible,
.cm-topright #home-fixed:focus-visible{
  outline: 2px dashed var(--ctrl-fg) !important;
  outline-offset: 2px;
}

/* Variante mobile : un peu plus compacts mais toujours identiques */
@media (max-width: 480px){
  .cm-topright #menu-btn,
  .cm-topright #theme-toggle,
  .cm-topright #home-fixed{
    width: 48px !important;
    height: 48px !important;
    border-width: 2.5px !important;
  }
  .cm-topright #home-fixed svg{ width: 22px !important; height: 22px !important; }
  .cm-topright #menu-btn,
  .cm-topright #theme-toggle,
  .cm-topright #home-fixed{ font-size: 20px !important; }
}

/* Si l’ancien bouton "retour" existe encore dans le menu latéral, masque-le */
#return-menu{ display: none !important; }
/* Masquer le logo du bas dans le menu latéral */
#side-menu .logo-wrapper,
#side-menu #menu-logo{
  display: none !important;
}

/* (Optionnel) Si tu veux resserrer le bas du menu après suppression */
#side-menu{ padding-bottom: 12px !important; }
#side-menu .menu-actions{ margin-bottom: 0 !important; }
/* ==== Masquer la photo de profil dans le menu ==== */
#side-menu .profile-pic-wrapper,
#side-menu #user-pic{
  display: none !important;
}

/* ==== Thème (couleurs badge) ==== */
.day-mode{
  --badge-bg: #0f0f10;       /* fond badge jour (noir doux) */
  --badge-fg: #fff;          /* texte blanc */
  --badge-br: #ffd54a;       /* bordure or (comme le reste de l'UI) */
  --badge-sub: #cfcfcf;      /* ligne "Télécharger" */
}

.night-mode{
  --badge-bg: #0a0d12;       /* fond badge nuit */
  --badge-fg: #ffffff;
  --badge-br: #f3c74c;       /* or plus chaud la nuit */
  --badge-sub: #d7d7d7;
}

/* ==== Bloc badge en bas du menu ==== */
#side-menu .store-badge{
  margin: 14px 0 6px;
  padding: 0 12px 12px;
}

#side-menu .store-title{
  text-align: center;
  font-weight: 700;
  margin: 0 0 8px;
  font-size: .95rem;
}

/* Badge "Android · APK" */
#side-menu .gplay-badge{
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--badge-bg);
  color: var(--badge-fg);
  border: 2px solid var(--badge-br);
  border-radius: 10px;
  text-decoration: none;
  padding: 10px 30px;
  width: 100%;
  box-sizing: border-box;
  box-shadow: 0 2px 6px rgba(0,0,0,.28);
}

/* Icône style "play" triangulaire + lueur Android */
#side-menu .gplay-icon{
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: linear-gradient(135deg,#3ddc84,#2fb36a); /* vert Android */
}
#side-menu .gplay-icon::after{
  content: "";
  position: absolute;
  left: 9px; top: 7px;
  border-left: 12px solid #0f0f10;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
}

/* Texte badge */
#side-menu .gplay-text{
  display: grid;
  line-height: 1.15;
}
#side-menu .gplay-text i{
  font-style: normal;
  color: var(--badge-sub);
  font-size: .82rem;
}
#side-menu .gplay-text b{
  font-size: 1.05rem;
  font-weight: 700;
}

/* Responsive menu étroit */
@media (max-width: 420px){
  #side-menu .gplay-badge{ padding: 10px 12px; }
  #side-menu .gplay-icon{ width: 26px; height: 26px; }
  #side-menu .gplay-text b{ font-size: 1rem; }
}
/* Remplace l’icône CSS par une image WebP */
#side-menu .gplay-icon{
  width: 28px;
  height: 28px;
  display: inline-block;
  border-radius: 6px;
  background: center / contain no-repeat;
  /* Hi-DPI : 1x / 2x */
  background-image: image-set(
    url("img/google-play.webp") 1x,
    url("img/google-play@2x.webp") 2x
  );
  /* Safari/WebKit legacy */
  background-image: -webkit-image-set(
    url("img/google-play.webp") 1x,
    url("img/google-play@2x.webp") 2x
  );
}

/* Légère lisibilité selon thème */
.day-mode #side-menu .gplay-icon{
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.25));
}
.night-mode #side-menu .gplay-icon{
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.45));
}

/* (Optionnel) si tu avais encore des styles d’avant avec ::after, on les neutralise */
#side-menu .gplay-icon::before,
#side-menu .gplay-icon::after{ content:none !important; background:none !important; }
/* === HERO LOGO : toujours centré (jour & nuit) ====================== */
.logo-strip{
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  text-align: center !important;
  width: 100% !important;
}

#hero-logo,
.logo-strip .logo{
  display: block !important;
  margin: 0 auto !important;
  float: none !important;
  position: static !important;
  max-width: 140px; /* garde ta taille ; ajuste si besoin */
  height: auto;
}

/* En jour, on avait retiré le fond/masque : on garde le centrage coûte que coûte */
.day-mode .logo-strip{
  display: flex !important;
  justify-content: center !important;
  text-align: center !important;
}
.prayer.pater, .prayer.gloria { display: block; }
/* Police pour ℣ / ℟ */
@font-face {
  font-family: "Noto Sans Symbols 2";
  src: url("fonts/NotoSansSymbols2-Regular.ttf") format("truetype");
  font-display: swap;
}

/* Marqueurs V./R. (versiculus / responsum) */
.preces-line .v,
.preces-line .r {
  font-family: "Noto Sans Symbols 2", "Noto Sans", "DejaVu Sans", system-ui, sans-serif;
  font-weight: 600;
  display: inline-block;
  width: 1.1em;          /* petite colonne alignée */
  text-align: center;
  line-height: 1;
  margin-right: .35em;
}

:root {
  --rosary-font-size: 18px; /* Valeur par défaut */
}

#text.prayer {
  font-size: var(--rosary-font-size);
  line-height: 1.4;
}
/* Bouton du menu avec badge "?" bleu */
#side-menu .btn-help-menu{
  position: relative;
  padding-left: 48px;             /* place pour le badge à gauche */
  border-radius: 12px;
  background: rgba(47,128,237,.12);
  border: 1px solid rgba(47,128,237,.35);
  color: var(--g-text, #fff);
  font-weight: 700;
}
.day-mode #side-menu .btn-help-menu{
  background: rgba(47,128,237,.10);
  color: #193b78;
}
#side-menu .btn-help-menu::before{
  content:"?";
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 26px; height: 26px; border-radius: 50%;
  display:grid; place-items:center;
  background: linear-gradient(180deg,#2f80ed,#1c65d8);
  color:#fff; font-weight: 800;
  box-shadow: 0 4px 10px rgba(31,93,207,.35);
}
#side-menu .btn-help-menu:hover{ filter: brightness(1.05); }
#side-menu .btn-help-menu:active{ transform: translateY(1px); }
/* === Bouton "Prière en latin" (menu latéral) === */
#open-prayers {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 11px 10px;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.1s ease;
}

/* Mode nuit → vert lumineux sur fond sombre */
body.night-mode #open-prayers {
  background: rgba(0, 128, 0, 0.15);   /* vert discret */
  color: #6eff8b;                      /* vert lumineux */
  border: 1px solid rgba(0, 128, 0, 0.25);
}
body.night-mode #open-prayers:hover {
  background: rgba(0, 128, 0, 0.25);
  transform: translateX(2px);
}

/* Mode jour → vert foncé sur fond clair */
body.day-mode #open-prayers {
  background: rgba(0, 128, 0, 0.08);
  color: #0a660a;
  border: 1px solid rgba(0, 128, 0, 0.15);
}
body.day-mode #open-prayers:hover {
  background: rgba(0, 128, 0, 0.18);
  transform: translateX(2px);
}

/* Petit effet focus accessible */
#open-prayers:focus {
  outline: 2px solid #3fbf3f;
  outline-offset: 2px;
}
/* === PRIORITÉ MAXIMALE : Boutons secondaires === */
a.secondary-btn,
button.secondary-btn {
  display: block !important;
  width: 90% !important;
  max-width: 280px !important;
  margin: 10px auto !important;
  padding: 12px 15px !important;
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid gold !important;
  border-radius: 10px !important;
  color: gold !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  text-align: center !important;
  text-decoration: none !important;
  box-shadow: 0 0 6px rgba(255, 215, 0, 0.2) !important;
  cursor: pointer !important;
  transition: background 0.3s ease, transform 0.2s ease !important;
}

a.secondary-btn:hover,
button.secondary-btn:hover {
  background: rgba(255, 215, 0, 0.15) !important;
  transform: scale(1.03) !important;
}
#swipe-hint {
  margin-top: 12px;
  text-align: center;
  font-size: 14px;
  color: #ccc;
  background: rgba(0,0,0,0.6);
  padding: 6px 12px;
  border-radius: 20px;
  font-style: italic;
  user-select: none;
  display: inline-block;
}

.day-mode #swipe-hint {
  background: rgba(255,255,255,0.8);
  color: #333;
}

