.access-panel {
  max-width: 560px;
  margin: 15vh auto 12vh;
}

.access-panel h1 {
  max-width: 510px;
}

.access-form {
  max-width: 370px;
  margin: 34px 0;
}

.access-form .primary-button {
  width: 100%;
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
}

.calendar-intro {
  display: flex;
  justify-content: space-between;
  align-items: end;
  padding: 86px 0 52px;
}

.calendar-intro h1 {
  margin-bottom: 0;
}

.intro-date {
  color: #1b9856;
  text-shadow:
    -1.5px -1.5px 0 #000,
    1.5px -1.5px 0 #000,
    -1.5px 1.5px 0 #000,
    1.5px 1.5px 0 #000;
}

.calendar-intro h1 em {
  color: var(--gold);
  font-style: normal;
  background-image: linear-gradient(100deg, var(--gold) 35%, #fff8dc 50%, var(--gold) 65%);
  background-size: 250% 100%;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

@media (prefers-reduced-motion: no-preference) {
  .calendar-intro h1 em {
    animation: shine 2.8s linear infinite, sos-flash 6.8s linear infinite;
  }
}

@keyframes shine {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

/* Le texte reste toujours visible : seul l'éclat pulse, au rythme Morse de SOS (3 courts, 3 longs, 3 courts). */
@keyframes sos-flash {
  0%, 2.891% { filter: brightness(1.7) drop-shadow(0 0 6px #fff8dc); }
  2.941%, 5.832% { filter: brightness(1) drop-shadow(0 0 0 transparent); }
  5.882%, 8.774% { filter: brightness(1.7) drop-shadow(0 0 6px #fff8dc); }
  8.824%, 11.715% { filter: brightness(1) drop-shadow(0 0 0 transparent); }
  11.765%, 14.656% { filter: brightness(1.7) drop-shadow(0 0 6px #fff8dc); }
  14.706%, 23.479% { filter: brightness(1) drop-shadow(0 0 0 transparent); }
  23.529%, 32.303% { filter: brightness(1.7) drop-shadow(0 0 6px #fff8dc); }
  32.353%, 35.244% { filter: brightness(1) drop-shadow(0 0 0 transparent); }
  35.294%, 44.068% { filter: brightness(1.7) drop-shadow(0 0 6px #fff8dc); }
  44.118%, 47.009% { filter: brightness(1) drop-shadow(0 0 0 transparent); }
  47.059%, 55.832% { filter: brightness(1.7) drop-shadow(0 0 6px #fff8dc); }
  55.882%, 64.656% { filter: brightness(1) drop-shadow(0 0 0 transparent); }
  64.706%, 67.597% { filter: brightness(1.7) drop-shadow(0 0 6px #fff8dc); }
  67.647%, 70.538% { filter: brightness(1) drop-shadow(0 0 0 transparent); }
  70.588%, 73.479% { filter: brightness(1.7) drop-shadow(0 0 6px #fff8dc); }
  73.529%, 76.421% { filter: brightness(1) drop-shadow(0 0 0 transparent); }
  76.471%, 79.362% { filter: brightness(1.7) drop-shadow(0 0 6px #fff8dc); }
  79.412%, 100% { filter: brightness(1) drop-shadow(0 0 0 transparent); }
}

.intro-note {
  max-width: 250px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  margin: 0 4% 8px 0;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}

.day-card {
  aspect-ratio: 1 / 1.08;
  position: relative;
  padding: 18px;
  color: var(--ink);
  text-decoration: none;
  border: 3px solid var(--line);
  border-radius: var(--radius, 0);
  background-image: linear-gradient(rgba(255, 56, 0, .45), rgba(255, 56, 0, .45)), url("../images/christmas-star.jpg");
  background-size: cover;
  background-position: center;
  transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}

.day-card.state-available,
.day-card.state-current {
  opacity: .88;
}

.day-card.state-available:hover,
.day-card.state-current:hover,
.day-card.state-available:focus-visible,
.day-card.state-current:focus-visible {
  opacity: 1;
  transform: translateY(-5px);
  box-shadow: 0 8px 0 var(--gold);
}

.day-card:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.day-number {
  font-family: 'Baloo 2', sans-serif;
  font-weight: 800;
  font-size: clamp(30px, 4vw, 53px);
  line-height: 1;
}

.day-label {
  position: absolute;
  bottom: 17px;
  left: 18px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
}

.day-icon {
  position: absolute;
  right: 17px;
  bottom: 14px;
  font-size: 23px;
  color: var(--coral);
}

.lock-icon {
  position: absolute;
  right: 20px;
  top: 17px;
  color: var(--gold);
  font-size: 25px;
}

.state-current {
  border-color: var(--coral);
  box-shadow: 0 0 0 2px var(--coral);
}

.state-future {
  opacity: .58;
  cursor: not-allowed;
}

.state-empty {
  filter: saturate(.5);
  cursor: not-allowed;
}

.photo-view {
  max-width: 820px;
  margin: 24px auto 52px;
}

.photo-view .eyebrow {
  font-size: 32px;
  letter-spacing: .04em;
  margin: 0 0 8px;
}

.photo-frame-empty {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  text-align: center;
  color: #fff;
}

.back-link {
  display: inline-block;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 12px;
  text-decoration: none;
}

.photo-frame {
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  background: var(--coral);
  border: 3px solid var(--coral);
  border-radius: var(--radius, 0);
  padding: 12px;
  box-shadow: 15px 15px 0 var(--gold);
}

.photo-frame img {
  max-width: 100%;
  max-height: 70vh;
  display: block;
  margin: 0 auto;
  border-radius: min(var(--radius, 0), 12px);
}

.photo-caption {
  font-family: 'Baloo 2', sans-serif;
  font-weight: 700;
  font-size: 25px;
  margin-top: 42px;
  color: var(--gold);
  text-shadow:
    -1.5px -1.5px 0 #000,
    1.5px -1.5px 0 #000,
    -1.5px 1.5px 0 #000,
    1.5px 1.5px 0 #000;
}

.photo-frame.photo-frame-error {
  background: var(--coral);
}

.photo-frame-error p {
  color: #fff;
  padding: 24px;
  text-align: center;
}
