/* Calendrier de l Avent : zone plein ecran, grille de cases, carte ouverte avec coin corne. */
.av-jeu { position: fixed; inset: 0; z-index: 1; overflow-y: auto; padding: 18px 16px 90px; box-sizing: border-box; background: var(--fond, #e0004d); color: var(--couleur-texte, #ffffff); text-align: center; --av-case-de: #ff7a3d; --av-case-a: #ff3d5a; --av-holo: linear-gradient(120deg, #cfe9ff, #ffd6f5, #d9ffe9, #fff4c2, #cfe9ff); }
.av-jeu[hidden] { display: none; }
.av-jeu.av-fin::after { content: ''; position: fixed; inset: 0; background: rgba(0, 0, 0, .55); z-index: 2; }
.av-particules { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.av-logo { position: relative; z-index: 1; height: 40px; max-width: 200px; object-fit: contain; margin: 0 auto 10px; display: block; }
.av-logo[hidden] { display: none; }
.av-titre { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; margin: 0 0 12px; line-height: 1; }
.av-titre-nombre { font-size: clamp(64px, 24vw, 120px); font-weight: 900; }
.av-titre-ligne { margin-top: 4px; font-size: clamp(11px, 3vw, 16px); letter-spacing: .45em; text-transform: uppercase; }
.av-titre-mot { margin-top: 4px; font-size: clamp(24px, 8vw, 40px); font-weight: 900; text-transform: uppercase; }
.av-holo { background: var(--av-holo); background-size: 300% 300%; -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; animation: av-holo 8s ease-in-out infinite; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .15)); }
@keyframes av-holo { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
.av-message { position: relative; z-index: 1; margin: 0 auto 16px; max-width: 470px; font-size: clamp(15px, 4vw, 18px); }
.av-grille { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%; max-width: 680px; margin: 0 auto; }
@media (min-width: 560px) { .av-grille { grid-template-columns: repeat(4, 1fr); gap: 12px; } }
@media (min-width: 820px) { .av-grille { grid-template-columns: repeat(var(--av-colonnes, 6), 1fr); } }
.av-case { position: relative; display: block; width: 100%; aspect-ratio: 1 / 1; padding: 0; border: 0; border-radius: 0; overflow: hidden; cursor: pointer; background: transparent; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
[data-forme="arrondie"] .av-case, [data-forme="arrondie"] .av-carte { border-radius: 12px; }
.av-case:focus-visible, .av-carte:focus-visible { outline: 3px solid var(--couleur-texte, #fff); outline-offset: 3px; }
.av-face { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--av-case-de), var(--av-case-a)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15), 0 6px 18px rgba(0, 0, 0, .18); }
.av-paillettes { position: absolute; inset: 0; pointer-events: none; opacity: .9; background-size: 64px 64px; background-image: radial-gradient(circle at 12% 20%, rgba(255,255,255,.9) 0 1px, transparent 1.5px), radial-gradient(circle at 70% 15%, rgba(255,255,255,.7) 0 .8px, transparent 1.3px), radial-gradient(circle at 85% 60%, rgba(255,255,255,.8) 0 1.2px, transparent 1.8px), radial-gradient(circle at 30% 75%, rgba(255,255,255,.6) 0 .8px, transparent 1.3px), radial-gradient(circle at 55% 45%, rgba(255,255,255,.5) 0 .6px, transparent 1.1px), radial-gradient(circle at 20% 55%, rgba(255,255,255,.7) 0 .7px, transparent 1.2px), radial-gradient(circle at 90% 90%, rgba(255,255,255,.8) 0 1px, transparent 1.5px), radial-gradient(circle at 45% 90%, rgba(255,255,255,.6) 0 .7px, transparent 1.2px); }
.av-etoile { position: absolute; top: 6%; right: 8%; color: #fff; line-height: 1; font-size: clamp(14px, 4vw, 22px); text-shadow: 0 0 8px rgba(255, 255, 255, .9); }
.av-face-grande .av-etoile { font-size: 48px; }
.av-numero { position: relative; font-weight: 900; line-height: 1; font-size: clamp(28px, 9vw, 48px); color: #fff; }
.av-face-grande .av-numero { font-size: clamp(120px, 40vw, 190px); }
.av-badge { position: absolute; bottom: 6%; right: 8%; display: grid; place-items: center; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: #fff; color: #b8860b; font-size: .9rem; font-weight: 800; box-shadow: 0 2px 6px rgba(0, 0, 0, .25); }
.av-badge-perdue { color: #666; }
.av-case[data-etat="disponible"] { animation: av-pulse 2.2s ease-in-out infinite; }
@keyframes av-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .5); } 50% { box-shadow: 0 0 22px 4px rgba(255, 255, 255, .55); } }
.av-face[data-etat="gagnee"] { background: linear-gradient(135deg, #f7d774, #c9962b 60%, #f2c94c); }
.av-face[data-etat="perdue"] { filter: grayscale(1); opacity: .6; }
.av-face[data-etat="manquee"] { filter: saturate(.6); opacity: .85; }
.av-secousse { animation: av-secousse .45s ease-in-out; }
@keyframes av-secousse { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-6px) rotate(-2deg); } 40% { transform: translateX(6px) rotate(2deg); } 60% { transform: translateX(-4px); } 80% { transform: translateX(4px); } }
/* Voile et carte ouverte (dans body) */
.av-voile { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 12px; padding: 0 16px 24px; box-sizing: border-box; background: rgba(0, 0, 0, .7); --av-case-de: #ff7a3d; --av-case-a: #ff3d5a; }
.av-voile[hidden] { display: none; }
.av-carte { position: fixed; overflow: visible; cursor: grab; user-select: none; -webkit-user-select: none; touch-action: none; transition: left 300ms ease, top 300ms ease, width 300ms ease, height 300ms ease, transform 420ms ease-in, opacity 420ms ease-in; }
.av-carte:active { cursor: grabbing; }
.av-carte-envol { transform: translate(60%, -60%) rotate(18deg); opacity: 0; }
.av-dessous { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: #fff; font-weight: 600; background: radial-gradient(circle at 50% 40%, rgba(0, 0, 0, .35), #1a0010 80%); box-shadow: inset 0 0 40px rgba(0, 0, 0, .5); }
.av-dessous-icone { font-size: 48px; }
.av-page { position: absolute; inset: 0; }
.av-ombre { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(var(--av-pli, 45deg), rgba(0, 0, 0, 0) 60%, rgba(0, 0, 0, .35) 100%); }
.av-dos { position: absolute; inset: 0; transform-origin: 0 0; pointer-events: none; background: linear-gradient(135deg, #ffffff 0%, #ececf3 55%, #cfcfdb 100%); filter: drop-shadow(-6px 6px 10px rgba(0, 0, 0, .35)); }
.av-coin { position: absolute; left: 0; bottom: 0; width: 22%; height: 22%; background: linear-gradient(45deg, #1a0010 0%, #1a0010 28%, #ffffff 29%, #e2e2ec 100%); clip-path: polygon(0 0, 100% 100%, 0 100%); filter: drop-shadow(2px -2px 4px rgba(0, 0, 0, .35)); animation: av-coin 1.6s ease-in-out infinite; pointer-events: none; }
@keyframes av-coin { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(3px, -3px); } }
.av-consigne { margin: 0; max-width: 470px; color: #fff; font-size: 15px; }
.av-ouvrir { width: min(82vw, 340px); min-height: 52px; }
.av-fermer { min-height: 44px; padding: 10px 22px; border: 1px solid #fff; border-radius: 6px; background: transparent; color: #fff; font-weight: 600; }
.av-toast { position: fixed; left: 0; right: 0; bottom: 24px; z-index: 70; display: flex; justify-content: center; padding: 0 16px; pointer-events: none; }
.av-toast-texte { padding: 12px 20px; border-radius: 999px; background: rgba(0, 0, 0, .75); color: #fff; font-size: 14px; font-weight: 600; box-shadow: 0 6px 20px rgba(0, 0, 0, .3); }
.av-toast-texte[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .av-holo, .av-case[data-etat="disponible"], .av-coin, .av-secousse { animation: none; } .av-carte { transition: none; } }
