/* Widget Tavernier - bandeau narratif compact */

.tavernier-widget {
  display: none;
  position: relative;
  width: min(100%, 980px);
  min-height: 172px;
  margin-bottom: 18px;
  border-radius: 14px;
  border: 1px solid rgba(223,171,92,.34);
  background:
    radial-gradient(ellipse at 8% 35%, rgba(245,171,72,.2) 0%, rgba(184,115,51,.08) 32%, transparent 62%),
    linear-gradient(145deg, rgba(54,31,12,.98) 0%, rgba(29,17,8,.98) 58%, rgba(17,11,7,.99) 100%);
  box-shadow:
    0 8px 34px rgba(0,0,0,.5),
    inset 0 1px 0 rgba(255,215,142,.08),
    inset 0 -1px 0 rgba(0,0,0,.32);
  overflow: hidden;
  transition: opacity .35s, transform .35s;
}

@media (min-width: 1100px) {
  .tavernier-widget {
    margin-right: auto;
  }
}

.tavernier-widget.tavernier-visible { display: flex; }
.tavernier-close-btn { display: none !important; }
.tavernier-widget.tavernier-closing {
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
}

.tavernier-portrait-col {
  width: 172px;
  min-width: 172px;
  position: relative;
  align-self: stretch;
  overflow: visible;
  flex-shrink: 0;
}

.tavernier-portrait-col::before {
  content: '';
  position: absolute;
  inset: 8px 6px 8px 10px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 48% 42%, rgba(255,190,92,.3), rgba(184,115,51,.12) 42%, transparent 68%);
  filter: blur(6px);
  pointer-events: none;
}

.tavernier-portrait-col img {
  position: relative;
  z-index: 1;
  width: 158px;
  height: calc(100% - 12px);
  min-height: 160px;
  margin: 6px 0 6px 8px;
  object-fit: cover;
  object-position: top center;
  border-radius: 18px;
  border: 1px solid rgba(223,171,92,.22);
  box-shadow: 0 14px 30px rgba(0,0,0,.36);
}

.tavernier-portrait-fallback {
  position: relative;
  z-index: 1;
  width: 158px;
  height: calc(100% - 12px);
  min-height: 160px;
  margin: 6px 0 6px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 56px;
  border-radius: 18px;
  border: 1px solid rgba(223,171,92,.22);
  background:
    radial-gradient(circle at 50% 30%, rgba(184,115,51,.3), transparent 65%),
    linear-gradient(180deg, rgba(48,30,12,1) 0%, rgba(28,16,6,1) 100%);
}

.tavernier-portrait-col::after {
  content: '';
  position: absolute;
  top: 0;
  right: -22px;
  bottom: 0;
  width: 70px;
  z-index: 2;
  background: linear-gradient(to right, transparent 0%, rgba(37,22,9,.9) 65%, rgba(37,22,9,0) 100%);
  pointer-events: none;
}

.tavernier-dialogue-col {
  flex: 1;
  min-width: 0;
  padding: 18px 20px 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.tavernier-header {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.tavernier-name {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  color: #f0c870;
  text-transform: uppercase;
  letter-spacing: .12em;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tavernier-name svg {
  width: 13px;
  height: 13px;
  opacity: .85;
}

.tavernier-emotion-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: rgba(255,215,142,.66);
  text-transform: uppercase;
  letter-spacing: .1em;
  padding: 3px 9px;
  border: 1px solid rgba(255,215,142,.22);
  border-radius: 999px;
  background: rgba(255,215,142,.06);
  transition: color .4s, border-color .4s, background .4s;
}

.tavernier-unread-badge {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: #f3d58a;
  background: rgba(184,115,51,.24);
  border: 1px solid rgba(223,171,92,.36);
  border-radius: 999px;
  padding: 2px 8px;
  white-space: nowrap;
}

.tavernier-emotion-excite   { color: #ff9a4a; border-color: rgba(255,154,74,.42);  background: rgba(255,154,74,.08); }
.tavernier-emotion-ravi     { color: #ff85b0; border-color: rgba(255,133,176,.42); background: rgba(255,133,176,.08); }
.tavernier-emotion-surpris  { color: #85c8ff; border-color: rgba(133,200,255,.42); background: rgba(133,200,255,.08); }
.tavernier-emotion-inquiet  { color: #90c88a; border-color: rgba(144,200,138,.42); background: rgba(144,200,138,.08); }
.tavernier-emotion-curieux  { color: #c8a8ff; border-color: rgba(200,168,255,.42); background: rgba(200,168,255,.08); }
.tavernier-emotion-sage     { color: #e8c47a; border-color: rgba(232,196,122,.42); background: rgba(232,196,122,.08); }
.tavernier-emotion-complice { color: #ffcc55; border-color: rgba(255,204,85,.42);  background: rgba(255,204,85,.08); }
.tavernier-emotion-calme    { color: #88c8a0; border-color: rgba(136,200,160,.42); background: rgba(136,200,160,.08); }
.tavernier-emotion-fatigue  { color: #b8afa6; border-color: rgba(184,175,166,.42); background: rgba(184,175,166,.08); }
.tavernier-emotion-neutre   { color: rgba(255,215,142,.6); border-color: rgba(255,215,142,.22); }

.tavernier-bubble {
  position: relative;
  padding: 13px 17px 14px 20px;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(90,54,20,.9), rgba(54,32,14,.72)),
    rgba(255,235,190,.08);
  border: 1px solid rgba(255,215,142,.28);
  border-left: 3px solid rgba(245,199,103,.8);
  box-shadow:
    inset 0 1px 0 rgba(255,244,220,.08),
    0 10px 22px rgba(0,0,0,.18);
}

.tavernier-bubble::before {
  content: '\AB';
  position: absolute;
  top: 5px;
  left: 7px;
  font-size: 26px;
  line-height: 1;
  color: rgba(255,226,165,.18);
  font-family: Georgia, serif;
  pointer-events: none;
}

.tavernier-bubble::after {
  content: '\BB';
  position: absolute;
  right: 10px;
  bottom: 2px;
  font-size: 26px;
  line-height: 1;
  color: rgba(255,226,165,.16);
  font-family: Georgia, serif;
  pointer-events: none;
}

.tavernier-text {
  min-height: 42px;
  font-size: 17.5px;
  line-height: 1.55;
  color: #fff2d2;
  font-style: italic;
  font-weight: 500;
  text-shadow: 0 2px 6px rgba(0,0,0,.72);
}

@keyframes tvTextIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.tavernier-text.tv-in { animation: tvTextIn .3s ease forwards; }
.tavernier-text.tv-out {
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .18s, transform .18s;
}

.tavernier-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  flex-wrap: wrap;
}

.tavernier-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.tavernier-dots {
  display: flex;
  gap: 7px;
  align-items: center;
}

.tavernier-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(255,215,142,.24);
  box-shadow: 0 0 0 1px rgba(255,215,142,.08);
  transition: background .25s, width .25s, transform .25s;
  cursor: pointer;
}

.tavernier-dot.active {
  width: 22px;
  background: rgba(232,196,122,.95);
  box-shadow: 0 0 14px rgba(232,196,122,.22);
}

.tavernier-dot:hover:not(.active) {
  background: rgba(255,215,142,.48);
  transform: scale(1.12);
}

.tavernier-counter {
  font-family: var(--font-mono);
  font-size: 10px;
  color: rgba(217,196,154,.58);
  text-transform: uppercase;
  letter-spacing: .08em;
  white-space: nowrap;
}

.tavernier-bottom-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.tavernier-feed-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,215,142,.22);
  background: rgba(255,215,142,.055);
  color: rgba(255,230,185,.72);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, transform .12s;
}

.tavernier-feed-btn svg {
  width: 13px;
  height: 13px;
}

.tavernier-feed-btn:hover {
  background: rgba(255,215,142,.13);
  border-color: rgba(255,215,142,.45);
  color: #ffd88e;
  transform: translateY(-1px);
}

.tavernier-cta-btn {
  font-size: 11px !important;
  padding: 6px 15px !important;
  background: rgba(184,115,51,.2) !important;
  border: 1px solid rgba(223,171,92,.42) !important;
  color: #e8c47a !important;
  border-radius: 999px !important;
  text-decoration: none;
  white-space: nowrap;
  font-family: var(--font-mono);
  letter-spacing: .04em;
  transition: background .2s, border-color .2s, color .2s, transform .12s;
}

.tavernier-cta-btn:hover {
  background: rgba(184,115,51,.38) !important;
  border-color: rgba(223,171,92,.72) !important;
  color: #ffd88e !important;
  transform: translateY(-1px);
}

.tavernier-nav-btns {
  display: flex;
  gap: 6px;
}

.tavernier-nav-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255,215,142,.28);
  background: rgba(255,215,142,.08);
  color: rgba(255,215,142,.78);
  cursor: pointer;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: background .15s, border-color .15s, color .15s, transform .1s;
  padding: 0;
}

.tavernier-nav-btn:hover:not(:disabled) {
  background: rgba(255,215,142,.18);
  border-color: rgba(255,215,142,.58);
  color: #ffd88e;
  transform: scale(1.08);
}

.tavernier-nav-btn:disabled {
  opacity: .25;
  cursor: default;
}

.tavernier-widget.tavernier-etat-final {
  border-color: rgba(223,171,92,.42);
  box-shadow:
    0 8px 40px rgba(0,0,0,.58),
    0 0 0 1px rgba(223,171,92,.08),
    inset 0 1px 0 rgba(255,215,142,.12);
}

.tavernier-widget.tavernier-etat-final .tavernier-bubble {
  border-left-color: rgba(223,171,92,.72);
  background: linear-gradient(90deg, rgba(255,215,142,.08), rgba(255,215,142,.03));
}

.tavernier-widget.tavernier-etat-final .tavernier-text {
  color: rgba(255,247,226,1);
}

@media (max-width: 680px) {
  .tavernier-widget {
    width: 100%;
    min-height: 144px;
    margin-bottom: 14px;
  }

  .tavernier-portrait-col {
    width: 112px;
    min-width: 112px;
  }

  .tavernier-portrait-col img,
  .tavernier-portrait-fallback {
    width: 106px;
    min-height: 128px;
    margin-left: 6px;
    border-radius: 15px;
  }

  .tavernier-dialogue-col {
    padding: 12px 13px 11px 10px;
    gap: 7px;
  }

  .tavernier-name {
    font-size: 10px;
  }

  .tavernier-emotion-label {
    font-size: 9px;
    padding: 2px 8px;
  }

  .tavernier-bubble {
    padding: 9px 11px 9px 15px;
  }

  .tavernier-text {
    min-height: 34px;
    font-size: 14.8px;
    line-height: 1.45;
  }

  .tavernier-footer {
    align-items: flex-end;
  }

  .tavernier-counter {
    display: none;
  }

  .tavernier-dot.active {
    width: 16px;
  }

  .tavernier-cta-btn {
    padding: 5px 11px !important;
    font-size: 10px !important;
  }

  .tavernier-feed-btn {
    height: 29px;
    padding: 0 9px;
  }

  .tavernier-nav-btn {
    width: 29px;
    height: 29px;
  }
}

/* Journal complet des rumeurs */
.tavernier-rumors-modal {
  max-width: 760px;
}

.tavernier-rumors-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.tavernier-rumors-head .modal-title {
  margin-bottom: 4px;
}

.tavernier-rumors-subtitle {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--forge-stone);
  text-transform: uppercase;
  letter-spacing: .07em;
}

.tavernier-rumors-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: min(62vh, 620px);
  overflow-y: auto;
  padding-right: 4px;
}

.tavernier-rumor-item {
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid rgba(223,171,92,.16);
  background: rgba(255,255,255,.025);
}

.tavernier-rumor-item.is-unread {
  border-color: rgba(245,199,103,.42);
  background:
    linear-gradient(90deg, rgba(184,115,51,.16), rgba(255,255,255,.025)),
    rgba(255,255,255,.02);
}

.tavernier-rumor-item.is-read {
  opacity: .72;
}

.tavernier-rumor-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 7px;
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.tavernier-rumor-state {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255,215,142,.1);
  color: #f3d58a;
}

.tavernier-rumor-item.is-read .tavernier-rumor-state {
  color: var(--forge-stone);
  background: rgba(255,255,255,.04);
}

.tavernier-rumor-emotion {
  color: rgba(255,230,185,.72);
}

.tavernier-rumor-date {
  margin-left: auto;
  color: var(--forge-stone);
}

.tavernier-rumor-item p {
  margin: 0;
  color: var(--forge-cream);
  font-size: 16px;
  line-height: 1.45;
}

.tavernier-rumor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.tavernier-rumor-link,
.tavernier-rumor-mark {
  border: 0;
  background: transparent;
  color: var(--forge-amber);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}

.tavernier-rumor-link:hover,
.tavernier-rumor-mark:hover {
  color: #fff0bf;
}

.tavernier-rumors-empty {
  display: grid;
  place-items: center;
  gap: 10px;
  padding: 30px 16px;
  color: var(--forge-stone);
  text-align: center;
}

.tavernier-rumors-empty svg {
  width: 28px;
  height: 28px;
  color: var(--forge-copper);
}

@media (max-width: 680px) {
  .tavernier-rumors-head {
    flex-direction: column;
    align-items: stretch;
  }

  .tavernier-rumor-date {
    margin-left: 0;
  }
}
