/* ==== STYLES GÉNÉRAUX ==== */
body {
  margin: 0;
  padding: 0;
  font-family: 'Marcellus', serif;
  background: radial-gradient(circle at center, #1c1f3a 0%, #0d0f1a 100%);
  color: #f0f0f0;
}

h1 {
  color: #d8cfff;
  font-size: 2.8em;
  text-shadow: 0 0 4px #6b4cae;
  margin: 0;
}

.subtitle {
  font-style: italic;
  font-size: 1.2em;
  color: #bcaeff;
  margin-top: 10px;
  line-height: 1.3;
}

.hidden {
  display: none;
}

/* ==== HEADER ==== */
header {
  text-align: center;
  padding: 15px 0 10px;
}

#header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.title-block {
  flex: 1;
}

#datetime-lunaire {
  width: fit-content;
  max-width: 90%;
  margin: 20px auto 15px;
  padding: 15px 20px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(4px);
  font-size: 1.1em;
  text-align: center;
  box-shadow: 0 0 8px rgba(120, 90, 190, 0.3);
  text-shadow: 0 0 4px #5a4a90;
  color: #eae6ff;
}

#daily-sign {
  display: block;
  margin-top: 8px;
  font-weight: bold;
  font-size: 1.3em;
  color: #ffe680;
  text-shadow: 0 0 5px #7a66b3;
}

/* ==== FORMULAIRE ==== */

.form-container {
  position: relative;
}

.form-logo {
  position: absolute;
  top: 0px;
  left: 0px;
  width: 60px;
  height: 60px;
  z-index: 10;
  pointer-events: none;
  filter: drop-shadow(0 0 6px gold);
  animation: pulse-glow 3s infinite ease-in-out, rotate-slow 20s linear infinite;
}

main {
  text-align: center;
  padding: 20px 20px;
}

.form-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(6px);
  border-radius: 14px;
  padding: 30px 20px;
  box-shadow: 0 0 10px rgba(130, 100, 200, 0.2);
  width: 95%;
  max-width: 500px;
  margin: 0 auto 30px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

label {
  font-size: 1.05em;
  margin-top: 10px;
  color: #d8cfff;
  display: block;
}

input[type="text"],
input[type="date"] {
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #f0f0ff;
  text-align: center;
  padding: 8px;
  font-size: 1em;
  border-radius: 5px;
  margin: 0px;
  width: 200px;
}

input:focus {
  outline: none;
  box-shadow: 0 0 5px #bfaaff;
}

/* ==== BOUTONS ==== */
button {
  padding: 10px 20px;
  font-size: 1em;
  background-color: #5e4b8b;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
}

button:hover {
  background-color: #6e5ca5;
}

#generate-btn.inactive {
  background-color: #2c2540;
  color: #bbb;
  cursor: default; /* Plus de curseur interdit */
  border: 1px solid #6e5ca5;
  box-shadow: inset 0 0 4px rgba(110, 92, 165, 0.4);
  opacity: 0.85;
  font-style: italic;
  position: relative;
}

#generate-btn.inactive::after {
  content: "Entrez votre prénom et votre date ✨";
  position: absolute;
  bottom: 120%;
  left: 50%;
  transform: translateX(-50%);
  background: #1c1a2e;
  color: #ffd966;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.85em;
  white-space: nowrap;
  box-shadow: 0 0 6px rgba(255, 217, 102, 0.3);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 10;
}

#generate-btn.inactive:hover::after {
  opacity: 1;
}


#generate-btn.don-mode {
  background-color: gold;
  color: black;
  font-weight: bold;
  box-shadow: 0 0 10px gold;
  animation: glow-pulse 2s infinite ease-in-out;
}


#don-confirm-btn {
  padding: 6px 14px;
  font-size: 0.95em;
  border-radius: 6px;
  background-color: #1c1a2e;
  color: #ffd966; /* doré doux */
  border: 1px solid #ffd966;
  cursor: pointer;
  font-weight: bold;
  box-shadow: 0 0 6px rgba(255, 217, 102, 0.3);
  transition: all 0.3s ease;
}

#don-confirm-btn:hover {
  background-color: #2a2545;
  box-shadow: 0 0 12px rgba(255, 217, 102, 0.6);
}

/* ==== RÉSULTATS ==== */
#result {
  margin-top: 30px;
}

.draw-block {
  margin-bottom: 30px;
}

.draw-numbers {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
  justify-content: center;
  margin-top: 10px;
  font-size: 1.5em;
  font-weight: bold;
  letter-spacing: 3px;
  text-align: center;
}

.draw-numbers span {
  opacity: 0;
  animation: fadeIn 0.6s ease forwards;
  font-size: 1.3em;
  font-weight: bold;
  padding: 10px;
  background: #ffffffaa;
  border-radius: 8px;
  box-shadow: 0 0 5px #ccc;
}

.draw-numbers span.star {
  background-color: #f5d442;
}

/* ==== DON ==== */
.don-container {
  display: inline-block;
  text-align: center;
  padding: 15px 20px;
  padding-top: 5px;
  margin: 20px auto;
  border: 1px solid rgba(255, 217, 102, 0.3);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  box-shadow: 0 0 10px rgba(255, 217, 102, 0.15);
  backdrop-filter: blur(3px);
}

.don-message {
  font-style: italic;
  color: #ccc;
  margin-bottom: 5px;
}

#don-hint {
  font-style: italic;
  font-size: 0.95em;
  color: #777;
  margin-top: 8px;
}

/* ==== FOOTER ==== */
footer {
  text-align: center;
  padding: 20px;
  font-size: 0.9em;
  color: #999;
}

/* ==== UTILITAIRES & ANIMATIONS ==== */
@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

/* ==== POPUP DON ==== */
#don-popup {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.popup-content {
  background: #1f1a30;
  border: 1px solid #ffd966;
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  color: #f0e8ff;
  box-shadow: 0 0 15px rgba(255, 217, 102, 0.4);
  max-width: 400px;
  position: relative;
}

.popup-content h3 {
  color: #ffd966;
  margin-top: 0;
}

.popup-content p {
  font-size: 0.95em;
  margin-bottom: 20px;
}

.paypal-btn {
  background-color: #ffd966;
  color: #1f1a30;
  font-weight: bold;
  padding: 10px 20px;
  border-radius: 6px;
  text-decoration: none;
  display: inline-block;
  transition: background-color 0.3s ease;
}

.paypal-btn:hover {
  background-color: #ffcc33;
}

#close-popup {
  position: absolute;
  top: 10px;
  right: 14px;
  cursor: pointer;
  font-size: 1.2em;
  color: #ccc;
}

.hidden {
  display: none !important;
}


/* ==== BLOC SEO EN BAS DE PAGE ==== */
.seo-info {
  padding: 30px 20px;
  margin: 40px auto 20px;
  max-width: 800px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 12px;
  color: #ccc;
  font-size: 0.95em;
  line-height: 1.6;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.03);
}

.seo-info h2 {
  font-size: 1.3em;
  color: #ffe680;
  margin-bottom: 15px;
  text-shadow: 0 0 4px #7a66b3;
}

/* ==== FAQ ==== */
.faq-block {
  padding: 40px 20px;
  margin: 0 auto 30px;
  max-width: 800px;
  background: rgba(255, 255, 255, 0.015);
  border-radius: 12px;
  color: #ddd;
  font-size: 0.95em;
  line-height: 1.6;
  border: 1px solid rgba(255, 255, 255, 0.04);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.02);
}

.faq-block h2 {
  font-size: 1.3em;
  color: #ffd966;
  margin-bottom: 20px;
  text-shadow: 0 0 4px #7a66b3;
  text-align: left;
}

.faq-item {
  margin-bottom: 20px;
}

.faq-item h3 {
  font-size: 1.05em;
  color: #bfaaff;
  margin-bottom: 5px;
}

.faq-item p {
  margin: 0;
  color: #bbb;
}

/*------- logo anim ---------*/

@keyframes pulse-glow {
  0%, 100% {
    filter: drop-shadow(0 0 6px gold);
  }
  50% {
    filter: drop-shadow(0 0 14px gold);
  }
}

@keyframes rotate-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* anim don */
@keyframes glow-pulse {
  0%, 100% {
    box-shadow: 0 0 10px gold;
  }
  50% {
    box-shadow: 0 0 25px gold;
  }
}

/*=== karma bar === */

#karma-bar-container {
  width: 90%;
  max-width: 400px;
  margin: 30px auto 0;
  text-align: center;
}

#karma-bar {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  overflow: hidden;
  height: 16px;
  width: 100%;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.1);
  margin-bottom: 5px;
}

#karma-fill {
  background: linear-gradient(90deg, #ffd966, #ffcc33);
  height: 100%;
  width: 0%;
  transition: width 0.5s ease;
}

#karma-label {
  font-size: 0.9em;
  color: #ffd966;
  text-shadow: 0 0 4px rgba(255, 217, 102, 0.6);
}

/* === Karma levels === */

#karma-bar-container.level-25 #karma-bar {
  box-shadow: 0 0 10px rgba(255, 217, 102, 0.4);
}

#karma-bar-container.level-50 #karma-bar {
  box-shadow: 0 0 12px rgba(255, 217, 102, 0.6);
  background: linear-gradient(90deg, #ffe680, #ffcc33);
}

#karma-bar-container.level-75 #karma-bar {
  box-shadow: 0 0 14px rgba(255, 245, 140, 0.7), 0 0 20px rgba(255, 255, 200, 0.3);
  background: linear-gradient(90deg, #fff3a0, #ffd966);
  position: relative;
}

#karma-bar-container.level-75::after {
  content: '☀️';
  font-size: 1.2em;
  position: absolute;
  right: -25px;
  top: -2px;
}

#karma-bar-container.level-100 #karma-bar {
  background: linear-gradient(90deg, #ffffff, #ffe680);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.8), 0 0 40px rgba(255, 230, 128, 0.5);
  animation: glow-pulse-100 2s infinite ease-in-out;
}

@keyframes glow-pulse-100 {
  0%, 100% {
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
  }
  50% {
    box-shadow: 0 0 30px rgba(255, 255, 255, 1);
  }
}

#cosmic-flash {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, rgba(255,255,255,0.9), rgba(255,230,128,0.2));
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  animation: flashCosmic 1.5s ease-out forwards;
}

@keyframes flashCosmic {
  0% {
    opacity: 0;
    transform: scale(1);
  }
  30% {
    opacity: 1;
    transform: scale(1.02);
  }
  100% {
    opacity: 0;
    transform: scale(1);
  }
}

#don-popup img {
  display: block;
  margin: 10px auto;
}

/* ==== RESPONSIVE ==== */

/* Mobile portrait */
@media (max-width: 500px) {
  .form-logo {
    width: 45px;
    height: 45px;
    top: 5px;
    left: 5px;
  }

  .draw-numbers {
    grid-template-columns: repeat(4, 1fr);
    font-size: 1.2em;
  }

  .seo-info, .faq-block {
    font-size: 0.9em;
  }
}

/* Petites tablettes */
@media (max-width: 600px) {
  .form-container {
    margin: 0 auto 30px !important;
    width: 90% !important;
    box-sizing: border-box;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .form-logo {
    top: 10px;
    left: 10px;
    width: 45px;
    height: 45px;
    transform: none;
  }
}


