/* ══════════════════════════════════════
   NOXUS — module-rose.css
   La Rose Noire — Fil rouge narratif
   ══════════════════════════════════════ */

/* ════════════════════════════════════════
   LAYOUT PRINCIPAL
   ════════════════════════════════════════ */

#module-rose {
  display: none;
  flex-direction: column;
  gap: 0;
  height: 100%;
  overflow-y: auto;
  background: var(--bg-main, #0a0a0f);
}

#module-rose.active {
  display: flex;
}

/* ════════════════════════════════════════
   BANDEAU HAUT — IMAGE + JAUGE
   ════════════════════════════════════════ */

.rose-header {
  position: relative;
  height: 220px;
  overflow: hidden;
  flex-shrink: 0;
}

.rose-header-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  opacity: 0.45;
  filter: saturate(0.6);
}

.rose-header-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10, 5, 15, 0.3) 0%,
    rgba(10, 5, 15, 0.6) 60%,
    rgba(10, 5, 15, 0.98) 100%
  );
}

.rose-header-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 32px 24px;
  gap: 12px;
}

.rose-header-title {
  font-family: 'Cinzel', serif;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: #e8d5b5;
  text-shadow: 0 0 20px rgba(180, 60, 60, 0.5);
}

.rose-header-subtitle {
  font-family: 'Crimson Text', serif;
  font-style: italic;
  font-size: 13px;
  color: rgba(200, 160, 120, 0.7);
  letter-spacing: 0.04em;
}

/* ════════════════════════════════════════
   JAUGE DU REVENANT
   ════════════════════════════════════════ */

.rose-jauge-section {
  padding: 20px 32px 8px;
  flex-shrink: 0;
}

.rose-jauge-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 8px;
}

.rose-jauge-name {
  font-family: 'Cinzel', serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(200, 100, 100, 0.8);
}

.rose-jauge-pct {
  font-family: 'Cinzel', serif;
  font-size: 11px;
  font-weight: 600;
  color: rgba(220, 120, 120, 0.9);
  letter-spacing: 0.08em;
}

.rose-jauge-track {
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid rgba(150, 50, 50, 0.25);
  position: relative;
}

.rose-jauge-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1),
              background 1s ease;
  background: linear-gradient(90deg, #4a1a6b, #8b2be2);
  position: relative;
}

/* Lueur pulsante en bout de jauge */
.rose-jauge-fill::after {
  content: '';
  position: absolute;
  right: -1px;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  filter: blur(3px);
  opacity: 0.8;
  animation: rose-pulse 2s ease-in-out infinite;
}

@keyframes rose-pulse {
  0%, 100% { opacity: 0.4; transform: translateY(-50%) scale(1); }
  50%       { opacity: 1;   transform: translateY(-50%) scale(1.4); }
}

.rose-jauge-label {
  margin-top: 8px;
  font-family: 'Crimson Text', serif;
  font-style: italic;
  font-size: 12px;
  color: rgba(180, 130, 100, 0.6);
  letter-spacing: 0.02em;
}

/* ════════════════════════════════════════
   SÉPARATEUR
   ════════════════════════════════════════ */

.rose-separator {
  height: 1px;
  margin: 20px 32px;
  background: linear-gradient(90deg, transparent, rgba(150, 50, 50, 0.3), transparent);
  flex-shrink: 0;
}

.rose-section-title {
  padding: 0 32px 12px;
  font-family: 'Cinzel', serif;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(180, 100, 100, 0.5);
  flex-shrink: 0;
}

/* ════════════════════════════════════════
   QUÊTE ACTIVE
   ════════════════════════════════════════ */

#rose-quete-active {
  padding: 0 20px 4px;
  flex-shrink: 0;
}

.rose-quete-card {
  background: rgba(80, 20, 20, 0.12);
  border: 1px solid rgba(180, 60, 60, 0.25);
  border-radius: 6px;
  padding: 18px 20px 16px;
  position: relative;
  overflow: hidden;
}

.rose-quete-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, #c03030, #6b1a4a);
}

.rose-quete-eyebrow {
  font-family: 'Cinzel', serif;
  font-size: 8px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(200, 80, 80, 0.6);
  margin-bottom: 6px;
}

.rose-quete-titre {
  font-family: 'Cinzel', serif;
  font-size: 13px;
  font-weight: 700;
  color: #e8d5b5;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.rose-quete-lore {
  font-family: 'Crimson Text', serif;
  font-style: italic;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(190, 155, 120, 0.7);
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(150, 50, 50, 0.15);
}

.rose-quete-conditions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rose-cond {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.rose-cond-icon {
  font-size: 12px;
  width: 18px;
  flex-shrink: 0;
  padding-top: 1px;
}

.rose-cond-ok .rose-cond-icon {
  color: #6db86d;
}

.rose-cond-pending .rose-cond-icon {
  color: rgba(200, 100, 80, 0.6);
}

.rose-cond-body {
  flex: 1;
  min-width: 0;
}

.rose-cond-label {
  font-family: 'Crimson Text', serif;
  font-size: 13px;
  font-weight: 600;
  color: rgba(220, 195, 160, 0.9);
  margin-bottom: 4px;
}

.rose-cond-ok .rose-cond-label {
  color: rgba(160, 210, 160, 0.75);
}

.rose-cond-status {
  font-size: 11px;
  color: rgba(160, 120, 100, 0.5);
  font-style: italic;
}

.rose-cond-ok .rose-cond-status {
  color: rgba(120, 180, 120, 0.6);
}

.rose-cond-progress-track {
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 4px;
  border: 1px solid rgba(150, 50, 50, 0.2);
}

.rose-cond-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #6b1a1a, #c03030);
  border-radius: 2px;
  transition: width 0.6s ease;
}

.rose-cond-progress-label {
  font-size: 10px;
  color: rgba(160, 120, 100, 0.55);
  font-family: 'Cinzel', serif;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.rose-cond-btn {
  background: rgba(139, 32, 32, 0.2);
  border: 1px solid rgba(180, 60, 60, 0.4);
  color: rgba(210, 160, 130, 0.9);
  padding: 5px 12px;
  border-radius: 3px;
  font-family: 'Cinzel', serif;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.rose-cond-btn:hover {
  background: rgba(139, 32, 32, 0.4);
  color: #e0c0c0;
  border-color: rgba(220, 80, 80, 0.6);
}

.rose-cond-btn-partial {
  background: rgba(80, 50, 20, 0.2);
  border-color: rgba(160, 110, 40, 0.35);
  color: rgba(200, 160, 80, 0.8);
}

.rose-cond-btn-partial:hover {
  background: rgba(100, 70, 20, 0.35);
  color: #d4b060;
  border-color: rgba(200, 140, 50, 0.5);
}

.rose-cond-manque {
  font-size: 10px;
  color: rgba(140, 80, 80, 0.6);
  font-style: italic;
}

.rose-quete-terminee {
  padding: 16px 20px;
  font-family: 'Crimson Text', serif;
  font-style: italic;
  font-size: 13px;
  color: rgba(120, 180, 120, 0.55);
  text-align: center;
}

/* ════════════════════════════════════════
   LISTE DES DOSSIERS / TRANSMISSIONS
   ════════════════════════════════════════ */

.rose-chapitres {
  flex: 1;
  padding: 0 20px 40px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rose-dossier {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(150, 60, 60, 0.18);
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
  position: relative;
  overflow: hidden;
}

.rose-dossier::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, #8b2020, #4a1a4a);
  opacity: 0;
  transition: opacity 0.15s ease;
}

.rose-dossier:hover {
  background: rgba(139, 32, 32, 0.1);
  border-color: rgba(180, 60, 60, 0.35);
}

.rose-dossier:hover::before {
  opacity: 1;
}

.rose-dossier-locked {
  cursor: default;
  opacity: 0.5;
}

.rose-dossier-locked:hover {
  background: rgba(255, 255, 255, 0.025);
  border-color: rgba(150, 60, 60, 0.18);
}

.rose-dossier-locked:hover::before {
  opacity: 0;
}

.rose-dossier-left {
  flex-shrink: 0;
}

.rose-dossier-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(139, 32, 32, 0.2);
  border: 1px solid rgba(139, 32, 32, 0.4);
  border-radius: 3px;
  font-size: 13px;
  color: #c06060;
}

.rose-lock-icon {
  background: rgba(60, 60, 80, 0.2);
  border-color: rgba(100, 100, 140, 0.25);
  color: rgba(120, 100, 140, 0.5);
}

.rose-dossier-info {
  flex: 1;
  min-width: 0;
}

.rose-dossier-titre {
  font-family: 'Crimson Text', serif;
  font-size: 14px;
  font-weight: 600;
  color: #d4c4a8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.rose-dossier-date {
  font-size: 10px;
  color: rgba(160, 120, 100, 0.55);
  margin-top: 3px;
  font-style: italic;
  letter-spacing: 0.03em;
}

.rose-dossier-arrow {
  font-size: 18px;
  color: rgba(180, 80, 80, 0.4);
  flex-shrink: 0;
  transition: transform 0.15s ease, color 0.15s ease;
}

.rose-dossier:hover .rose-dossier-arrow {
  transform: translateX(3px);
  color: rgba(200, 100, 100, 0.7);
}

.rose-empty {
  padding: 32px 16px;
  font-family: 'Crimson Text', serif;
  font-style: italic;
  font-size: 13px;
  color: rgba(160, 120, 100, 0.4);
  text-align: center;
  line-height: 1.7;
}

/* ════════════════════════════════════════
   READER OVERLAY — VUE COMICS
   ════════════════════════════════════════ */

#rose-reader-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: stretch;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  background: rgba(5, 3, 8, 0.92);
  backdrop-filter: blur(8px);
}

#rose-reader-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.rose-reader-inner {
  display: flex;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  height: 100%;
  overflow: hidden;
}

/* ── Colonne image ── */
.rose-reader-visual {
  flex: 0 0 45%;
  position: relative;
  overflow: hidden;
  background: #050305;
}

.rose-reader-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    transparent 70%,
    rgba(5, 3, 8, 0.95) 100%
  );
  pointer-events: none;
}

#rose-reader-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: none; /* masqué jusqu'au chargement */
}

/* Placeholder si pas d'image */
.rose-reader-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  opacity: 0.15;
  color: #8b2020;
}

/* ── Colonne texte ── */
.rose-reader-text {
  position: relative;
  flex: 1;
  padding: 48px 40px 32px 36px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(139, 32, 32, 0.3) transparent;
}

.rose-reader-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  border: 1px solid rgba(180, 60, 60, 0.3);
  color: rgba(200, 150, 130, 0.7);
  width: 32px;
  height: 32px;
  border-radius: 3px;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  z-index: 10;
}

.rose-reader-close:hover {
  background: rgba(139, 32, 32, 0.3);
  color: #e0c0c0;
  border-color: rgba(200, 80, 80, 0.5);
}

.rose-reader-eyebrow {
  font-family: 'Cinzel', serif;
  font-size: 9px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(180, 80, 80, 0.6);
  margin-bottom: 10px;
}

#rose-reader-titre {
  font-family: 'Cinzel', serif;
  font-size: 18px;
  font-weight: 900;
  color: #e8d5b5;
  line-height: 1.3;
  margin-bottom: 6px;
  letter-spacing: 0.04em;
}

#rose-reader-date {
  font-family: 'Crimson Text', serif;
  font-style: italic;
  font-size: 12px;
  color: rgba(180, 140, 110, 0.5);
  margin-bottom: 28px;
  letter-spacing: 0.04em;
}

.rose-reader-divider {
  height: 1px;
  background: linear-gradient(90deg, rgba(139, 32, 32, 0.4), transparent);
  margin-bottom: 28px;
  flex-shrink: 0;
}

#rose-reader-texte {
  font-family: 'Crimson Text', serif;
  font-size: 16px;
  line-height: 1.8;
  color: rgba(220, 200, 175, 0.85);
  flex: 1;
}

#rose-reader-texte p {
  margin: 0 0 16px;
}

#rose-reader-texte p:last-child {
  margin-bottom: 0;
}

#rose-reader-texte blockquote {
  margin: 20px 0;
  padding: 12px 16px;
  border-left: 2px solid rgba(139, 32, 32, 0.6);
  background: rgba(139, 32, 32, 0.07);
  border-radius: 0 3px 3px 0;
  font-style: italic;
  color: rgba(210, 170, 140, 0.9);
  font-size: 15px;
  line-height: 1.7;
}

#rose-reader-texte em {
  color: rgba(180, 140, 110, 0.75);
}

/* ── Navigation ── */
.rose-reader-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid rgba(100, 40, 40, 0.2);
  flex-shrink: 0;
}

.rose-reader-nav button {
  background: rgba(139, 32, 32, 0.15);
  border: 1px solid rgba(139, 32, 32, 0.3);
  color: rgba(200, 150, 130, 0.8);
  padding: 7px 16px;
  border-radius: 3px;
  font-family: 'Cinzel', serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: all 0.15s ease;
}

.rose-reader-nav button:hover:not(:disabled) {
  background: rgba(139, 32, 32, 0.3);
  color: #e0c0c0;
  border-color: rgba(200, 80, 80, 0.5);
}

.rose-reader-nav button:disabled {
  opacity: 0.25;
  cursor: default;
}

#rose-reader-nav-info {
  flex: 1;
  text-align: center;
  font-family: 'Cinzel', serif;
  font-size: 9px;
  letter-spacing: 0.15em;
  color: rgba(160, 100, 100, 0.4);
}

/* ── Mobile ── */
@media (max-width: 700px) {
  .rose-reader-inner {
    flex-direction: column;
  }
  .rose-reader-visual {
    flex: 0 0 220px;
  }
  .rose-reader-visual::after {
    background: linear-gradient(to bottom, transparent 70%, rgba(5, 3, 8, 0.95) 100%);
  }
  .rose-reader-text {
    padding: 24px 20px 20px;
  }
  .rose-jauge-section,
  .rose-chapitres,
  .rose-separator,
  .rose-section-title {
    padding-left: 16px;
    padding-right: 16px;
  }
}

/* ════════════════════════════════════════
   SCROLL LOCK quand reader ouvert
   ════════════════════════════════════════ */

body.rose-reader-open {
  overflow: hidden;
}
