/* =========================================================================
   ÉCRAN 1 : MA FAMILLE (GESTION INTUITIVE ET PARTICIPANTS)
   ========================================================================= */
.members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.member-card {
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid #e2e8f0;
  padding: 18px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transition: all var(--transition-fast);
}

.member-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  border-color: var(--color-gold);
}

.member-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.member-avatar-box {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #fef3c7;
  border: 2px solid var(--color-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  flex-shrink: 0;
}

.member-name {
  font-weight: 800;
  font-size: 1.2rem;
  color: #0f172a;
}

.member-foyer-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  margin-top: 2px;
}

.member-pin-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  font-family: monospace;
  font-weight: 800;
  background: #f1f5f9;
  color: #475569;
  padding: 3px 8px;
  border-radius: 4px;
  margin-top: 6px;
}

.member-exclusions-list {
  background: #f8fafc;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin: 10px 0;
  font-size: 0.85rem;
}

.member-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

/* =========================================================================
   ÉCRAN 2 : LE TIRAGE AU SORT (MACHINE DE NOËL)
   ========================================================================= */
.draw-hero-card {
  text-align: center;
  padding: 40px 24px;
  max-width: 820px;
  margin: 0 auto;
}

.draw-hat-animation {
  font-size: 4.5rem;
  margin-bottom: 16px;
  animation: hatBounce 1.8s ease-in-out infinite;
}

@keyframes hatBounce {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-12px) rotate(4deg); }
}

.draw-rules-checklist {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin: 24px 0;
  text-align: left;
}

.rule-check-item {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #e2e8f0;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #334155;
}

.rule-check-item.valid {
  border-color: #10b981;
  background: #f0fdf4;
  color: #166534;
}

/* OVERLAY D'ANIMATION DU TIRAGE */
.draw-anim-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(14px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.draw-anim-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.draw-anim-card {
  background: #ffffff;
  border: 2px solid var(--color-gold);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  max-width: 540px;
  width: 90%;
  text-align: center;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
}

.anim-ticker {
  font-size: 1.4rem;
  font-weight: 800;
  color: #991b1b;
  background: #fef2f2;
  border: 2px dashed #fca5a5;
  padding: 14px;
  border-radius: var(--radius-md);
  margin: 18px 0;
  font-family: monospace;
}

/* =========================================================================
   ÉCRAN 3 : PARTAGE & DISTRIBUTION (WHATSAPP ET LIENS)
   ========================================================================= */
.share-modes-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.share-banner-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(254, 243, 199, 0.92));
  border: 2px solid var(--color-gold);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.share-member-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: all var(--transition-fast);
}

.share-member-row:hover {
  border-color: var(--color-gold);
  background: #fffbeb;
  transform: translateX(4px);
}

@media (max-width: 640px) {
  .share-member-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .share-member-actions {
    width: 100%;
    display: flex;
    gap: 8px;
    margin-top: 8px;
  }
  .share-member-actions .btn {
    flex: 1;
  }
}

/* =========================================================================
   ÉCRAN 4 : GUEST / MODE DÉBALLAGE DU PROCHE (#personal= ou #family=)
   ========================================================================= */
.guest-view-container {
  max-width: 620px;
  margin: 30px auto;
  text-align: center;
}

.guest-card {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  border: 2px solid var(--color-gold);
  border-radius: var(--radius-lg);
  padding: 36px 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

/* PIN BOX */
.pin-input-large {
  font-size: 1.8rem;
  letter-spacing: 8px;
  text-align: center;
  max-width: 220px;
  margin: 0 auto;
  font-weight: 800;
  font-family: monospace;
}

/* =========================================================================
   ANIMATION SUSPENSE DU TIRAGE AU SORT (CHAPEAU MAGIQUE & ROULETTE)
   ========================================================================= */
.draw-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeInOverlay 0.3s ease-out;
}

@keyframes fadeInOverlay {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.draw-modal-card {
  background: linear-gradient(145deg, #881337 0%, #4c0519 100%);
  border: 2px solid #fde047;
  border-radius: 24px;
  box-shadow: 0 0 60px rgba(253, 224, 71, 0.35), 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  max-width: 490px;
  width: 100%;
  padding: 36px 24px;
  text-align: center;
  color: #ffffff;
  position: relative;
  overflow: hidden;
}

.draw-anim-hat-box {
  position: relative;
  width: 90px;
  height: 90px;
  margin: 0 auto 14px auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.draw-anim-hat {
  font-size: 4.2rem;
  animation: hatMagicalWiggle 0.6s ease-in-out infinite alternate;
  filter: drop-shadow(0 4px 12px rgba(253, 224, 71, 0.6));
}

@keyframes hatMagicalWiggle {
  0% { transform: translateY(0) rotate(-8deg) scale(1); }
  100% { transform: translateY(-10px) rotate(8deg) scale(1.08); }
}

.draw-sparkles-aura {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(253, 224, 71, 0.35) 0%, transparent 70%);
  animation: auraPulse 1.2s ease-in-out infinite;
}

@keyframes auraPulse {
  0%, 100% { transform: scale(0.85); opacity: 0.5; }
  50% { transform: scale(1.2); opacity: 0.9; }
}

.draw-roulette-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(253, 224, 71, 0.4);
  border-radius: 14px;
  padding: 14px 12px;
  margin: 20px 0;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.4);
}

.draw-reel-card {
  flex: 1;
  background: #ffffff;
  color: #0f172a;
  padding: 10px 8px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 46px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: transform 0.08s ease-out;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.draw-reel-arrow {
  color: #fde047;
  font-size: 1.3rem;
  font-weight: 900;
  animation: pulseArrow 0.8s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes pulseArrow {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; text-shadow: 0 0 10px #fde047; }
}

.draw-progress-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 14px;
}

.draw-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #f59e0b, #fde047, #10b981);
  border-radius: 999px;
  transition: width 0.3s ease-out;
}

/* =========================================================================
   SÉLECTEUR D'EXCLUSIONS AVANCÉ (LIBRE / SENS UNIQUE / RÉCIPROQUE)
   ========================================================================= */
.exclusion-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #ffffff;
  padding: 9px 12px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  transition: all 0.2s ease;
}

.exclusion-row:hover {
  border-color: #cbd5e1;
}

.exclusion-row-person {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: #1e293b;
  font-size: 0.92rem;
  min-width: 0;
}

.exclusion-pills-group {
  display: flex;
  gap: 3px;
  background: #f1f5f9;
  padding: 3px;
  border-radius: 6px;
  flex-shrink: 0;
}

.excl-pill-btn {
  border: 1px solid transparent;
  background: transparent;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  color: #64748b;
  transition: all 0.15s ease;
  user-select: none;
  white-space: nowrap;
}

.excl-pill-btn:hover {
  color: #1e293b;
}

.excl-pill-btn.active-none {
  background: #ffffff;
  color: #166534;
  font-weight: 800;
  border-color: #86efac;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.excl-pill-btn.active-unilateral {
  background: #fef3c7;
  color: #92400e;
  font-weight: 800;
  border-color: #fde68a;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.excl-pill-btn.active-reciprocal {
  background: #fee2e2;
  color: #991b1b;
  font-weight: 800;
  border-color: #fca5a5;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

@media (max-width: 480px) {
  .exclusion-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .exclusion-pills-group {
    width: 100%;
    justify-content: space-between;
  }
  .excl-pill-btn {
    flex: 1;
    text-align: center;
    padding: 5px 4px;
    font-size: 0.75rem;
  }
}

