/* ============================================
   Variables & Reset
   ============================================ */
:root {
  --pink-light: #FFE4E1;
  --pink-medium: #FFB6C1;
  --rose-deep: #E91E63;
  --rose-dark: #C2185B;
  --white: #FFFFFF;
  --gold: #FFD700;
  --text-dark: #333333;
  --text-medium: #666666;
  --text-light: #999999;
  --font-heading: 'Dancing Script', cursive;
  --font-body: 'Poppins', sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background: linear-gradient(135deg, var(--pink-light) 0%, #FFF0F5 50%, var(--white) 100%);
  min-height: 100vh;
  color: var(--text-dark);
}

a {
  color: var(--rose-deep);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ============================================
   Coeurs flottants en arriere-plan
   ============================================ */
.hearts-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.heart {
  position: absolute;
  bottom: -60px;
  opacity: 0;
  font-size: 24px;
  animation: floatHeart linear infinite;
}

.heart::after {
  content: '❤';
  display: block;
}

.heart-1  { left: 5%;  font-size: 16px; animation-duration: 12s; animation-delay: 0s; }
.heart-2  { left: 12%; font-size: 22px; animation-duration: 14s; animation-delay: 2s; }
.heart-3  { left: 22%; font-size: 14px; animation-duration: 11s; animation-delay: 4s; }
.heart-4  { left: 35%; font-size: 20px; animation-duration: 15s; animation-delay: 1s; }
.heart-5  { left: 45%; font-size: 18px; animation-duration: 13s; animation-delay: 3s; }
.heart-6  { left: 55%; font-size: 12px; animation-duration: 12s; animation-delay: 5s; }
.heart-7  { left: 65%; font-size: 24px; animation-duration: 14s; animation-delay: 0.5s; }
.heart-8  { left: 75%; font-size: 16px; animation-duration: 11s; animation-delay: 2.5s; }
.heart-9  { left: 85%; font-size: 20px; animation-duration: 13s; animation-delay: 4.5s; }
.heart-10 { left: 92%; font-size: 14px; animation-duration: 15s; animation-delay: 1.5s; }

.heart-1::after, .heart-4::after, .heart-7::after { color: var(--rose-deep); }
.heart-2::after, .heart-5::after, .heart-8::after { color: var(--pink-medium); }
.heart-3::after, .heart-6::after, .heart-9::after { color: #FF6B81; }
.heart-10::after { color: var(--rose-deep); }

@keyframes floatHeart {
  0%   { bottom: -60px; opacity: 0; transform: translateX(0) rotate(0deg); }
  10%  { opacity: 0.7; }
  30%  { transform: translateX(30px) rotate(15deg); }
  50%  { opacity: 0.9; }
  70%  { transform: translateX(-20px) rotate(-10deg); }
  90%  { opacity: 0.3; }
  100% { bottom: 110vh; opacity: 0; transform: translateX(15px) rotate(5deg); }
}

/* ============================================
   Page Valentine (publique)
   ============================================ */
.valentine-page {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem 1rem;
}

.valentine-content {
  max-width: 620px;
  width: 100%;
  text-align: center;
}

.envelope-icon {
  font-size: 4rem;
  margin-bottom: 0.5rem;
  animation: bounceIn 0.8s ease;
}

@keyframes bounceIn {
  0%   { transform: scale(0); opacity: 0; }
  50%  { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}

.valentine-title {
  font-family: var(--font-heading);
  font-size: 3rem;
  color: var(--rose-deep);
  margin-bottom: 2rem;
  text-shadow: 2px 2px 4px rgba(233, 30, 99, 0.15);
  animation: fadeInUp 1s ease 0.3s both;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.letter-card {
  background: var(--white);
  border-radius: 16px;
  padding: 2.5rem;
  margin-bottom: 2.5rem;
  box-shadow: 0 10px 40px rgba(233, 30, 99, 0.1);
  border: 1px solid rgba(255, 182, 193, 0.5);
  position: relative;
  animation: fadeInUp 1s ease 0.6s both;
}

.letter-card::before {
  content: '';
  position: absolute;
  top: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--gold), #FFA000, var(--gold));
  border-radius: 2px;
}

.letter-text {
  font-size: 1.1rem;
  line-height: 1.9;
  color: var(--text-dark);
  font-style: italic;
}

.question {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  color: var(--rose-deep);
  margin-bottom: 2rem;
  animation: fadeInUp 1s ease 0.9s both;
}

/* ============================================
   Boutons Oui / Non
   ============================================ */
.buttons-container {
  display: flex;
  gap: 2rem;
  justify-content: center;
  align-items: center;
  min-height: 80px;
  position: relative;
  animation: fadeInUp 1s ease 1.2s both;
}

.btn {
  padding: 16px 40px;
  border: none;
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.btn-yes {
  background: linear-gradient(135deg, var(--rose-deep), var(--rose-dark));
  color: var(--white);
  box-shadow: 0 6px 25px rgba(233, 30, 99, 0.4);
  font-size: 1.2rem;
  padding: 18px 48px;
}

.btn-yes:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 30px rgba(233, 30, 99, 0.5);
}

@keyframes pulse {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.08); }
  100% { transform: scale(1); }
}

.btn-yes.pulsing {
  animation: pulse 0.5s ease;
}

.btn-no {
  background: var(--white);
  color: var(--text-medium);
  border: 2px solid #DDD;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  font-size: 1rem;
  padding: 14px 32px;
}

.btn-no:hover {
  border-color: var(--pink-medium);
}

.dodge-message {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--rose-deep);
  margin-top: 1.5rem;
  min-height: 2em;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.dodge-message.visible {
  opacity: 1;
}

/* ============================================
   Pages Done (Confirmation)
   ============================================ */
.done-page {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem;
  text-align: center;
}

.done-content {
  max-width: 600px;
  width: 100%;
}

.big-heart {
  font-size: 6rem;
  animation: heartBeat 1.2s ease infinite;
  margin-bottom: 1rem;
}

@keyframes heartBeat {
  0%, 100% { transform: scale(1); }
  15%      { transform: scale(1.15); }
  30%      { transform: scale(1); }
  45%      { transform: scale(1.1); }
  60%      { transform: scale(1); }
}

.done-title {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  color: var(--rose-deep);
  margin-bottom: 0.5rem;
  animation: fadeInUp 0.8s ease both;
}

.done-subtitle {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--rose-dark);
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.8s ease 0.2s both;
}

.done-text {
  font-size: 1.2rem;
  line-height: 1.8;
  color: var(--text-dark);
  animation: fadeInUp 0.8s ease 0.4s both;
}

.done-hearts {
  font-size: 2rem;
  margin-top: 2rem;
  letter-spacing: 8px;
  animation: fadeInUp 0.8s ease 0.6s both;
}

/* Confettis CSS */
.confetti-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.confetti {
  position: absolute;
  top: -20px;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  opacity: 0;
  animation: confettiFall linear forwards;
}

.confetti-1  { left: 5%;  background: #E91E63; animation-duration: 3s; animation-delay: 0.0s; width: 8px; height: 12px; }
.confetti-2  { left: 15%; background: #FFD700; animation-duration: 3.5s; animation-delay: 0.2s; width: 12px; height: 8px; }
.confetti-3  { left: 25%; background: #FF6B81; animation-duration: 2.8s; animation-delay: 0.4s; width: 6px; height: 14px; }
.confetti-4  { left: 35%; background: #FFB6C1; animation-duration: 3.2s; animation-delay: 0.1s; width: 10px; height: 10px; }
.confetti-5  { left: 45%; background: #E91E63; animation-duration: 3.8s; animation-delay: 0.3s; width: 14px; height: 6px; }
.confetti-6  { left: 55%; background: #FFD700; animation-duration: 2.6s; animation-delay: 0.5s; width: 8px; height: 8px; }
.confetti-7  { left: 65%; background: #FF6B81; animation-duration: 3.4s; animation-delay: 0.15s; width: 12px; height: 12px; }
.confetti-8  { left: 72%; background: #FFB6C1; animation-duration: 3.0s; animation-delay: 0.35s; width: 6px; height: 10px; }
.confetti-9  { left: 80%; background: #E91E63; animation-duration: 3.6s; animation-delay: 0.25s; width: 10px; height: 6px; }
.confetti-10 { left: 88%; background: #FFD700; animation-duration: 2.9s; animation-delay: 0.45s; width: 8px; height: 14px; }
.confetti-11 { left: 40%; background: #C2185B; animation-duration: 3.3s; animation-delay: 0.6s; width: 12px; height: 8px; }
.confetti-12 { left: 60%; background: #FF4081; animation-duration: 3.1s; animation-delay: 0.55s; width: 6px; height: 12px; }

@keyframes confettiFall {
  0%   { top: -20px; opacity: 1; transform: translateX(0) rotate(0deg); }
  25%  { transform: translateX(30px) rotate(90deg); }
  50%  { transform: translateX(-20px) rotate(180deg); opacity: 1; }
  75%  { transform: translateX(15px) rotate(270deg); }
  100% { top: 110vh; transform: translateX(-10px) rotate(360deg); opacity: 0; }
}

/* ============================================
   Pages Admin
   ============================================ */
.admin-page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1rem;
}

.admin-container {
  max-width: 900px;
  width: 100%;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.admin-header h1 {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  color: var(--rose-deep);
}

.admin-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.admin-card {
  background: var(--white);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.login-card {
  max-width: 400px;
  width: 100%;
  text-align: center;
  margin-top: 10vh;
}

.login-icon {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.login-card h1 {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--rose-deep);
  margin-bottom: 0.5rem;
}

.subtitle {
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

/* Formulaires */
.form-group {
  margin-bottom: 1.25rem;
  text-align: left;
}

.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.4rem;
  color: var(--text-dark);
  font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #EEE;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border-color 0.3s ease;
  outline: none;
  background: #FAFAFA;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--pink-medium);
  background: var(--white);
}

.form-group textarea {
  resize: vertical;
  min-height: 150px;
}

/* Boutons generiques */
.btn-primary {
  background: linear-gradient(135deg, var(--rose-deep), var(--rose-dark));
  color: var(--white);
  box-shadow: 0 4px 15px rgba(233, 30, 99, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(233, 30, 99, 0.4);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--rose-deep);
  border: 2px solid var(--rose-deep);
}

.btn-outline:hover {
  background: var(--pink-light);
}

.btn-full {
  width: 100%;
  text-align: center;
}

.btn-small {
  padding: 8px 16px;
  font-size: 0.85rem;
}

.btn-copy {
  background: var(--pink-light);
  color: var(--rose-deep);
  border: 1px solid var(--pink-medium);
}

.btn-copy:hover {
  background: var(--pink-medium);
  color: var(--white);
}

.btn-back {
  background: var(--white);
  color: var(--rose-deep);
  border: 2px solid var(--rose-deep);
  margin-top: 1rem;
}

/* Alertes */
.alert {
  padding: 14px 20px;
  border-radius: 10px;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  line-height: 1.5;
}

.alert ul {
  margin: 0;
  padding-left: 1.2rem;
}

.alert-success {
  background: #E8F5E9;
  color: #2E7D32;
  border: 1px solid #A5D6A7;
}

.alert-warning {
  background: #FFF3E0;
  color: #E65100;
  border: 1px solid #FFCC80;
}

.alert-error {
  background: #FFEBEE;
  color: #C62828;
  border: 1px solid #EF9A9A;
}

/* Tableau des invitations */
.table-wrapper {
  overflow-x: auto;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.invites-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
}

.invites-table th,
.invites-table td {
  padding: 14px 16px;
  text-align: left;
  font-size: 0.9rem;
}

.invites-table thead {
  background: linear-gradient(135deg, var(--rose-deep), var(--rose-dark));
  color: var(--white);
}

.invites-table th {
  font-weight: 500;
  white-space: nowrap;
}

.invites-table tbody tr {
  border-bottom: 1px solid #F5F5F5;
  transition: background 0.2s;
}

.invites-table tbody tr:hover {
  background: #FFF8F9;
}

.email-cell {
  font-size: 0.85rem;
  color: var(--text-medium);
}

/* Badges */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
}

.badge-sent {
  background: #E8F5E9;
  color: #2E7D32;
}

.badge-pending {
  background: #FFF3E0;
  color: #E65100;
}

.badge-yes {
  background: #FCE4EC;
  color: #C2185B;
}

.badge-no {
  background: #ECEFF1;
  color: #546E7A;
}

.badge-waiting {
  background: #F3E5F5;
  color: #7B1FA2;
}

/* Etat vide */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--white);
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.empty-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.empty-state p {
  color: var(--text-medium);
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

/* Page erreur */
.error-page {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 2rem;
}

.error-card {
  text-align: center;
  background: var(--white);
  padding: 3rem;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  max-width: 400px;
}

.error-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.error-card h1 {
  font-family: var(--font-heading);
  color: var(--rose-deep);
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.error-card p {
  color: var(--text-medium);
  margin-bottom: 1.5rem;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 600px) {
  .valentine-title {
    font-size: 2.2rem;
  }

  .question {
    font-size: 1.6rem;
  }

  .letter-card {
    padding: 1.5rem;
  }

  .letter-text {
    font-size: 1rem;
  }

  .btn-yes {
    padding: 14px 32px;
    font-size: 1rem;
  }

  .btn-no {
    padding: 12px 24px;
    font-size: 0.9rem;
  }

  .buttons-container {
    gap: 1rem;
  }

  .done-title {
    font-size: 2.5rem;
  }

  .done-subtitle {
    font-size: 1.5rem;
  }

  .admin-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .invites-table th,
  .invites-table td {
    padding: 10px 8px;
    font-size: 0.8rem;
  }
}
