.advent-calendar {
  position: relative;
  overflow: hidden;
  margin: 18px 0;
  padding: clamp(24px, 5vw, 40px) clamp(14px, 4vw, 28px);
  border: 1px solid #d5bd79;
  border-radius: 18px;
  color: #fff4dc;
  background: radial-gradient(ellipse at 50% 3%, #244b76 0%, #101f3d 42%, #060f22 100%);
  font-family: var(--serif);
}
.advent-header, .advent-grid, .advent-footer { position: relative; z-index: 1; }
.advent-header { margin-bottom: 24px; text-align: center; }
.advent-header h2 { margin: 0 0 14px; font-size: clamp(30px, 6vw, 46px); font-weight: 400; line-height: 1.1; }
.advent-header p { max-width: 570px; margin: 0 auto 18px; color: #e5eafa; font-size: 17px; line-height: 1.6; }
.advent-progress { display: inline-flex; align-items: center; gap: 12px; padding: 10px 15px; border: 1px solid #e8c97855; border-radius: 40px; background: #07142b77; color: #f9e1a3; font: 14px var(--sans); }
.advent-track { width: 70px; height: 5px; overflow: hidden; border-radius: 8px; background: #a5bfff38; }
#advent-fill { display: block; width: 0; height: 100%; background: #ffe5a0; transition: width .5s; }
.advent-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.advent-card { display: block; position: relative; width: 100%; aspect-ratio: 2 / 3; padding: 0; border: 0; border-radius: 10px; outline-offset: 4px; background: none; perspective: 900px; cursor: pointer; transition: transform .28s; }
.advent-card:hover { transform: translateY(-4px); }
.advent-card:focus-visible { outline: 2px solid #ffe6a1; }
.advent-inner { display: block; position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .8s cubic-bezier(.2, .8, .2, 1); }
.advent-card.is-open .advent-inner { transform: rotateY(180deg); }
.advent-face { position: absolute; inset: 0; overflow: hidden; border: 1px solid #d9c386aa; border-radius: 10px; backface-visibility: hidden; -webkit-backface-visibility: hidden; box-shadow: 0 7px 18px #0006; }
.advent-front { background: #1b4371 url("./avent-carte.jpg") center / cover no-repeat; }
.advent-front::after { position: absolute; inset: 0; background: linear-gradient(180deg, #091a3333, transparent 35%, transparent 75%, #09162965); content: ""; }
.advent-number { display: grid; position: absolute; z-index: 1; top: 8%; left: 50%; width: 38%; aspect-ratio: 1; place-items: center; transform: translateX(-50%); border: 1px solid #ffe4a0; border-radius: 50%; background: #102c50e6; color: #ffedb9; font-size: clamp(20px, 4vw, 29px); box-shadow: 0 0 14px #f7ce6855; }
.advent-back { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 7px; padding: 9%; transform: rotateY(180deg); background: radial-gradient(ellipse at top, #f8e9be, #b98d47); color: #302443; text-align: center; }
.advent-back::before { position: absolute; inset: 5px; border: 1px solid #68513066; border-radius: 6px; pointer-events: none; content: ""; }
.advent-back small { font-size: 12px; }
.advent-back > span { font-size: 28px; line-height: 1; }
.advent-back strong { font-size: 14px; font-weight: 400; line-height: 1.2; }
.advent-card.is-today .advent-face { border: 2px solid #ffe6a1; box-shadow: 0 0 20px #efc96c77; }
.advent-card.is-today .advent-front::before { position: absolute; z-index: 2; bottom: 5%; left: 50%; padding: 3px 5px; transform: translateX(-50%); border-radius: 12px; background: #ffe4a0; color: #192745; font: 600 10px var(--sans); white-space: nowrap; content: "Aujourd’hui"; }
.advent-footer { margin-top: 24px; color: #bccbe1; font-size: 16px; text-align: center; }
.advent-footer button { min-height: 44px; margin-top: 8px; padding: 6px; border: 0; background: none; color: #f7d88e; font: inherit; text-decoration: underline; cursor: pointer; }
.advent-snow { position: absolute; inset: 0; z-index: 2; overflow: hidden; pointer-events: none; }
.advent-flake { position: absolute; top: -30px; color: #fff; opacity: .65; text-shadow: 0 0 8px #fff; animation: advent-fall linear infinite; }
@keyframes advent-fall { to { transform: translate(40px, 1600px) rotate(180deg); } }
.advent-surprise { width: min(420px, calc(100vw - 28px)); max-width: none; max-height: calc(100dvh - 32px); margin: auto; padding: 35px 28px 30px; overflow: auto; border: 1px solid #e4c479; border-radius: 26px; background: radial-gradient(ellipse at top, #31537a, #10223c 75%); color: #fff3d3; font-family: var(--serif); text-align: center; box-shadow: 0 0 65px #f8d57a40; }
.advent-surprise[open] { animation: advent-appear .38s ease; }
.advent-surprise::backdrop { background: #020a19bb; backdrop-filter: blur(5px); }
@keyframes advent-appear { from { transform: scale(.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.advent-close { position: absolute; top: 7px; right: 7px; width: 44px; height: 44px; padding: 0; border: 0; background: none; color: #fff0cf; font-size: 28px; cursor: pointer; }
.advent-day { color: #f5d894; font: 600 14px var(--sans); letter-spacing: 3px; text-transform: uppercase; }
.advent-gift { margin: 12px 0; font-size: 58px; line-height: 1.3; }
.advent-surprise h3 { margin: 12px 0; font-size: 31px; font-weight: 400; line-height: 1.2; }
.advent-message { margin-bottom: 22px; color: #f1e8d8; font-size: 20px; line-height: 1.55; }
.advent-continue { min-height: 44px; padding: 12px 22px; border: 0; border-radius: 25px; background: #f5d792; color: #1b2944; font: 600 15px var(--sans); cursor: pointer; }
.advent-spark { position: fixed; z-index: 10; color: #fbe2a0; font-size: 20px; pointer-events: none; animation: advent-burst .9s ease-out forwards; }
@keyframes advent-burst { to { transform: translate(var(--spark-x), var(--spark-y)) scale(.3); opacity: 0; } }
@media (max-width: 620px) { .advent-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; } }
@media (max-width: 470px) { .advent-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; } }
@media (prefers-reduced-motion: reduce) {
  .advent-calendar *, .advent-calendar *::before, .advent-calendar *::after, .advent-surprise[open] { animation: none !important; transition: none !important; }
  .advent-snow, .advent-spark { display: none; }
}
