/* L'Offrande du jour (offrande.js). Préfixe of-.
   Une chandelle votive : éteinte, elle attend ; allumée, le jour est reçu. Le septième jour brille de la lumière bleue du Serment. */

.of {
  --of-or: #E9C066;
  position: relative; justify-self: center; width: min(100%, 560px); display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; min-height: 68px; color: var(--encre, #EDE3D1); text-align: left; text-decoration: none; font: inherit;
  background: radial-gradient(ellipse 50% 140% at 0% 50%, rgba(255, 200, 110, .16), transparent 70%), linear-gradient(180deg, #1F1712, #120C0B);
  border: 1px solid rgba(233, 192, 102, .4); border-left: 3px solid var(--of-or);
  box-shadow: 0 10px 30px -14px rgba(0, 0, 0, .8); cursor: pointer;
}
.of:focus-visible { outline: 2px solid var(--serment, #F0D9A0); outline-offset: 3px; }
.of--invite { border-left-color: #6B5A4A; }
.of-texte { flex: 1; display: grid; gap: 3px; min-width: 0; }
.of-sur { font: 400 .72rem/1.1 var(--etiquette, serif); letter-spacing: .12em; text-transform: uppercase; color: var(--of-or); }
.of-titre { font: 600 1.12rem/1.15 var(--titre, serif); color: var(--serment, #F0D9A0); }
.of-accroche { font-size: .9rem; line-height: 1.35; color: var(--encre-att, #A8998A); }
.of-gain { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.of-gain svg { width: 18px; height: 18px; }
.of-cta {
  flex: none; padding: 8px 14px; font: 600 .95rem/1 var(--titre, serif); color: #1A0F08;
  background: linear-gradient(180deg, #F6DD97, #C99231); border: 1px solid #7A4C0E;
}
.of:hover .of-titre { text-decoration: underline; text-underline-offset: 3px; }

/* Sur l'accueil, la place ne compte pas dans la mise en page */
.accueil-offrande { display: contents; }

/* La chandelle */
.of-chandelle { flex: none; width: 26px; height: 36px; }
.of-cire { fill: #D9CBB0; }
.of-flamme { fill: #3A2C24; transition: fill .4s; }
.of--prete .of-flamme, .of-jour--aujourdhui .of-flamme { fill: #6B4A2A; }
.of--prete .of-chandelle { filter: drop-shadow(0 0 6px rgba(255, 190, 90, .45)); }
.of-jour--recu .of-flamme { fill: #FFC85A; filter: drop-shadow(0 0 4px #FF9E2E); }
.of-jour--septieme.of-jour--recu .of-flamme { fill: #BFE9FF; filter: drop-shadow(0 0 5px #4FA8FF); }

/* Le parchemin */
.of-voile {
  position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px;
  background: rgba(6, 3, 4, .78); backdrop-filter: blur(3px);
}
.of-parchemin {
  position: relative; width: min(100%, 620px); max-height: calc(100dvh - 32px); overflow: auto; padding: 22px 18px 18px;
  color: var(--encre, #EDE3D1);
  background: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(233, 192, 102, .12), transparent 70%), linear-gradient(180deg, #211814, #140D0C);
  border: 1px solid rgba(233, 192, 102, .45); box-shadow: 0 30px 80px -20px #000;
}
.of-x {
  position: absolute; top: 4px; right: 4px; width: 44px; height: 44px; border: 0; background: none; cursor: pointer;
  color: var(--encre-att, #A8998A); font: 300 1.7rem/1 var(--titre, serif);
}
.of-p-sur { margin: 0; text-align: center; font: 400 .74rem/1.2 var(--etiquette, serif); letter-spacing: .14em; text-transform: uppercase; color: #E9C066; }
.of-parchemin h2 { text-align: center; font-size: 1.7rem; color: var(--serment, #F0D9A0); margin: 4px 0 8px; }
.of-intro { margin: 0 auto 14px; max-width: 46ch; text-align: center; font-size: .92rem; line-height: 1.45; color: var(--encre-att, #A8998A); }

.of-jours { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.of-jour {
  display: grid; justify-items: center; align-content: start; gap: 4px; padding: 10px 4px; text-align: center;
  background: rgba(255, 240, 200, .03); border: 1px solid rgba(233, 192, 102, .16);
}
.of-jour .of-chandelle { width: 22px; height: 30px; }
.of-num { font: 400 .68rem/1 var(--etiquette, serif); letter-spacing: .1em; text-transform: uppercase; color: var(--encre-att, #A8998A); }
.of-nom { font: 600 .82rem/1.15 var(--titre, serif); min-height: 2.3em; }
.of-jour .of-gain { font-size: .82rem; }
.of-jour .of-gain svg { width: 15px; height: 15px; }
.of-jour--recu { opacity: .78; border-color: rgba(233, 192, 102, .3); }
.of-jour--aujourdhui { border-color: #E9C066; background: rgba(233, 192, 102, .1); box-shadow: inset 0 0 18px rgba(233, 192, 102, .14); }
.of-jour--aujourdhui .of-num { color: #E9C066; }
.of-jour--demain { border-style: dashed; border-color: rgba(233, 192, 102, .45); }
.of-jour--demain .of-num::after { content: " · demain"; }
.of-jour--septieme { grid-column: span 2; border-color: rgba(111, 195, 255, .45); background: radial-gradient(ellipse at 50% 30%, rgba(111, 195, 255, .14), transparent 70%); }
.of-jour--septieme .of-nom { color: #CFEFFF; }
.of-jour--allume { animation: of-allume .9s ease-out; opacity: 1; }
@keyframes of-allume { 0% { transform: scale(1); } 35% { transform: scale(1.08); box-shadow: 0 0 30px rgba(255, 200, 100, .5); } 100% { transform: scale(1); } }

.of-serie { margin: 14px 0 0; text-align: center; font-size: .95rem; display: flex; justify-content: center; align-items: center; gap: 4px; flex-wrap: wrap; }
.of-serie svg { width: 16px; height: 16px; }
.of-actions { display: grid; justify-items: center; gap: 8px; margin-top: 14px; }
.of-revenir { margin: 0; color: var(--encre-att, #A8998A); font-style: italic; }

@media (max-width: 420px) {
  .of-jours { grid-template-columns: repeat(3, 1fr); }
  .of-jour--septieme { grid-column: span 3; }
  .of-cta { padding: 8px 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .of-jour--allume { animation: none; }
  .of-flamme { transition: none; }
}
