@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&family=Dancing+Script:wght@600&display=swap');

/* 
   Palette Printanière :
   - Vert frais : #A8E063
   - Rose fleur : #FF9A9E
   - Bleu ciel : #74EBD5
*/

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

body {
  font-family: 'Inter', sans-serif;
  /* Dégradé évoquant un matin de printemps */
  background: linear-gradient(135deg, rgba(168, 224, 99, 0.7), rgba(116, 235, 213, 0.7)),
              url('https://images.unsplash.com/photo-1490750967868-88aa4486c946?w=1600&q=80') center/cover fixed;
  color: #2d5a27;
  min-height: 100vh;
  padding: 2rem 1rem;
  position: relative;
  overflow-x: hidden;
}

/* Élément flottant : remplacé par une fleur de cerisier ou pétale */
.bg-zen {
  position: fixed;
  top: 10%;
  right: -50px;
  width: 300px;
  height: 300px;
  background: url('https://images.unsplash.com/photo-1522748906645-95d8adfd52c7?w=600&q=80') center/contain no-repeat;
  opacity: 0.4;
  filter: drop-shadow(0 0 10px white);
  animation: floatSpring 15s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes floatSpring {
  0%, 100% { transform: translate(0, 0) rotate(0deg) scale(1); }
  33% { transform: translate(-40px, 20px) rotate(10deg) scale(1.1); }
  66% { transform: translate(-20px, -30px) rotate(-5deg) scale(0.9); }
}

.container { max-width: 900px; margin: 0 auto; position: relative; z-index: 2; }

header {
  text-align: center;
  margin-bottom: 3rem;
  color: #1b4332;
}

header h1 {
  font-size: 3.2rem;
  font-family: 'Dancing Script', cursive; /* Touche organique */
  font-weight: 700;
  margin-bottom: 0.5rem;
  text-shadow: 2px 2px 0px rgba(255,255,255,0.8);
}

header p {
  color: #2d6a4f;
  font-size: 1.2rem;
  padding: 0.5rem 1.5rem;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 50px;
  display: inline-block;
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  padding: 2rem;
  border-radius: 24px;
  box-shadow: 0 10px 40px rgba(45, 90, 39, 0.1);
  margin-bottom: 1.5rem;
  border: 2px solid rgba(255, 255, 255, 0.6);
  transition: transform 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
}

h2 {
  margin: 0 0 1.5rem 0;
  color: #2d6a4f;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

h2::before {
  content: '🌱'; /* Icône printanière */
}

h3 {
  color: #1b4332;
  font-size: 2.2rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

label {
  display: block;
  margin: 1.2rem 0 0.5rem 0;
  color: #40916c;
  font-weight: 600;
  font-size: 0.95rem;
}

input, textarea {
  width: 100%;
  padding: 0.9rem;
  border-radius: 12px;
  border: 2px solid rgba(168, 224, 99, 0.3);
  background: rgba(255, 255, 255, 0.9);
  transition: all 0.3s ease;
  font-family: inherit;
  color: #1b4332;
}

input:focus, textarea:focus {
  outline: none;
  border-color: #74EBD5;
  box-shadow: 0 0 0 4px rgba(116, 235, 213, 0.2);
  background: #fff;
}

button {
  border: none;
  cursor: pointer;
  font-weight: 700;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border-radius: 12px;
}

button.primary {
  background: linear-gradient(135deg, #A8E063 0%, #56ab2f 100%);
  color: white;
  font-size: 1.2rem;
  width: 100%;
  box-shadow: 0 8px 25px rgba(86, 171, 47, 0.3);
  margin-top: 1.5rem;
  padding: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

button.primary:hover {
  transform: scale(1.02);
  box-shadow: 0 12px 30px rgba(86, 171, 47, 0.4);
}

button.small {
  background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
  color: #7209b7;
  padding: 0.8rem 1.5rem;
  margin-top: 1rem;
}

.ligne {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1rem;
  background: rgba(168, 224, 99, 0.05);
  padding: 10px;
  border-radius: 15px;
}

.ligne button {
  background: #ff4d4d;
  color: white;
  padding: 0.85rem;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hidden { display: none !important; }

#loading {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
}

#loading.active { opacity: 1; pointer-events: auto; }

.lutin { font-size: 8rem; animation: bounce 2s infinite; }

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

.message-lutin { 
  font-size: 2rem; 
  color: #2d6a4f; 
  font-family: 'Dancing Script', cursive;
}

#resultat ul { list-style: none; }
#resultat li {
  padding: 1rem 0;
  display: flex;
  justify-content: space-between;
  border-bottom: 1px dashed rgba(168, 224, 99, 0.4);
}

#resultat span { color: #56ab2f; font-weight: 800; font-size: 1.1rem; }

.btn-container {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.upload-area {
  border: 2px dashed #A8E063;
  border-radius: 16px;
  padding: 2.5rem;
  text-align: center;
  cursor: pointer;
  background: rgba(168, 224, 99, 0.05);
  color: #2d6a4f;
  transition: all 0.3s;
}

.upload-area:hover {
  background: rgba(168, 224, 99, 0.1);
  border-color: #56ab2f;
}

#previewImage {
  max-width: 200px;
  margin-top: 1rem;
  display: none;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

