/* ===========================
   GLOBAL STYLES
   =========================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Poppins", sans-serif;
}

.font-poppins {
  font-family: "Poppins", sans-serif;
}

.liste_a_puce{
  padding: 0 0 0 20px;
  margin-top: 10px;
}
.liste_a_puce li{
  list-style-type: initial;
  margin-bottom: 10px;
}
.text_left{
  text-align: left;
}
.liste_a_puce.text_left{
    width: fit-content;
    margin: 10px auto;
}
.liste_a_puce.text_left li{
  margin-bottom: 0;
}
/* ===========================
   ANIMATIONS KEYFRAMES
   =========================== */

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* ===========================
   ANIMATION UTILITY CLASSES
   =========================== */

.animate-fadeIn {
  animation: fadeIn 0.5s ease-in-out;
}

.animate-fadeInUp,
.animate-fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

.animate-fadeInDown {
  animation: fadeInDown 0.6s ease-out;
}

.animate-slideInLeft {
  animation: slideInLeft 0.6s ease-out;
}

.animate-slideInRight {
  animation: slideInRight 0.6s ease-out;
}

.animate-bounce {
  animation: bounce 1s infinite;
}

.animate-pulse {
  animation: pulse 2s ease-in-out infinite;
}

.animate-spin {
  animation: spin 1s linear infinite;
}

/* ===========================
   MEMORY GAME - 3D CARD FLIP
   =========================== */

.perspective {
  perspective: 1000px;
}

.transform-style-3d {
  transform-style: preserve-3d;
}

.backface-hidden {
  backface-visibility: hidden;
}

.rotate-y-180 {
  transform: rotateY(180deg);
}

.memory-card {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s;
  transform-style: preserve-3d;
  cursor: pointer;
}

.memory-card.flipped {
  transform: rotateY(180deg);
}

.memory-card-face {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 500;
  text-align: center;
  padding: 1rem;
}

.memory-card-front {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.memory-card-back {
  background: white;
  color: #1f2937;
  transform: rotateY(180deg);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  border: 2px solid #10b981;
}

.memory-card.matched {
  opacity: 1;
  cursor: default;
}

.memory-card.matched .memory-card-back {
  border: 3px solid #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.3);
}

/* ===========================
   DRAG & DROP STYLES
   =========================== */

.draggable-card {
  cursor: grab;
  transition: all 0.2s ease;
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 1rem;
  margin: 0.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.draggable-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.draggable-card.dragging {
  opacity: 0.5;
  cursor: grabbing;
  transform: rotate(5deg);
}

.drop-zone {
  min-height: 120px;
  border: 2px dashed #d1d5db;
  border-radius: 0.5rem;
  padding: 1rem;
  background: #f9fafb;
  transition: all 0.3s ease;
}

.drop-zone.drag-over {
  background: #d1fae5;
  border-color: #10b981;
  border-style: solid;
  box-shadow: inset 0 0 0 2px #10b981;
}

.drop-zone .draggable-card {
  border-color: #10b981;
  background: #ecfdf5;
}

/* ===========================
   SCROLLBAR CUSTOM
   =========================== */

/* Pour Webkit browsers (Chrome, Safari, Edge) */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #10b981 0%, #059669 100%);
  border-radius: 10px;
  border: 2px solid #f1f5f9;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #059669 0%, #047857 100%);
}

/* Pour Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: #10b981 #f1f5f9;
}

/* ===========================
   MODAL OVERLAY
   =========================== */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.3s ease-in-out;
}

.modal-content {
  background: white;
  border-radius: 1rem;
  max-width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow:
    0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
  animation: fadeInUp 0.4s ease-out;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ef4444;
  color: white;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10;
}

.modal-close:hover {
  background: #dc2626;
  transform: scale(1.1);
}

/* ===========================
   BUTTONS & INTERACTIVE
   =========================== */

.btn-primary {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  padding: 0.75rem 2rem;
  border-radius: 0.5rem;
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(16, 185, 129, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(16, 185, 129, 0.4);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: white;
  color: #10b981;
  border: 2px solid #10b981;
  padding: 0.75rem 2rem;
  border-radius: 0.5rem;
  font-weight: 600;
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn-secondary:hover {
  background: #10b981;
  color: white;
  transform: translateY(-2px);
}

/* ===========================
   PROGRESS BAR EMERALD THEME
   =========================== */

.progress-step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

.progress-step-circle {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  border: 3px solid #d1d5db;
  background: white;
  color: #9ca3af;
  transition: all 0.3s ease;
  z-index: 2;
}

.progress-step.active .progress-step-circle {
  border-color: #10b981;
  background: #10b981;
  color: white;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
}

.progress-step.completed .progress-step-circle {
  border-color: #10b981;
  background: #10b981;
  color: white;
}

.progress-step-line {
  position: absolute;
  top: 1.5rem;
  left: 50%;
  right: -50%;
  height: 3px;
  background: #d1d5db;
  z-index: 1;
}

.progress-step.completed .progress-step-line {
  background: #10b981;
}

/* ===========================
   CARDS & CONTAINERS
   =========================== */

.card {
  background: white;
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.card:hover {
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.card-emerald {
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  border: 2px solid #10b981;
}

/* ===========================
   QUIZ STYLES
   =========================== */

.quiz-option {
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 1rem 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.quiz-option:hover {
  border-color: #10b981;
  background: #f0fdf4;
  transform: translateX(4px);
}

.quiz-option.selected {
  border-color: #10b981;
  background: #d1fae5;
}

.quiz-option.correct {
  border-color: #10b981;
  background: #d1fae5;
}

.quiz-option.incorrect {
  border-color: #ef4444;
  background: #fee2e2;
}

/* ===========================
   QUIZ IMAGE LOADER
   =========================== */

.quiz-image-container {
  position: relative;
  background: #f9fafb;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 60px !important;

}

.quiz-image-loader {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f9fafb;
  z-index: 10;
}

.quiz-image-loader .spinner {
  width: 3rem;
  height: 3rem;
  border: 3px solid #e5e7eb;
  border-top-color: #10b981;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.quiz-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0.5rem;
}

.quiz-image.hidden {
  opacity: 0;
  visibility: hidden;
}

/* ===========================
   CAROUSEL STYLES
   =========================== */

.carousel-container {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
}

.carousel-slide {
  animation: fadeInUp 0.5s ease-out;
}

.carousel-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
  color: #10b981;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  z-index: 10;
}

.carousel-nav-btn:hover {
  background: white;
  transform: translateY(-50%) scale(1.1);
}

.carousel-nav-btn.prev {
  left: 1rem;
}

.carousel-nav-btn.next {
  right: 1rem;
}

/* ===========================
   RESPONSIVE UTILITIES
   =========================== */

@media (max-width: 768px) {
  .modal-content {
    max-width: 95%;
    padding: 1rem;
  }

  .memory-card-face {
    font-size: 0.75rem;
    padding: 0.5rem;
  }

  .progress-step-circle {
    width: 2.5rem;
    height: 2.5rem;
  }
}

/* ===========================
   LOADING SPINNER
   =========================== */

.loading-spinner {
  display: inline-block;
  width: 3rem;
  height: 3rem;
  border: 4px solid #e5e7eb;
  border-top-color: #10b981;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* ===========================
   BADGES & TAGS
   =========================== */

.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
}

.badge-emerald {
  background: #d1fae5;
  color: #065f46;
}

.badge-success {
  background: #d1fae5;
  color: #047857;
}

.badge-error {
  background: #fee2e2;
  color: #991b1b;
}

.badge-warning {
  background: #fef3c7;
  color: #92400e;
}

/* ===========================
   TRANSITIONS
   =========================== */

.transition-all {
  transition: all 0.3s ease;
}

.transition-fast {
  transition: all 0.15s ease;
}

.transition-slow {
  transition: all 0.5s ease;
}

/* Vue transitions */
.fade-enter-active,
.fade-leave-active {
  transition: opacity 0.3s ease;
}

.fade-enter-from,
.fade-leave-to {
  opacity: 0;
}

/* ===========================
   CONFETTI ANIMATION (Step 6)
   =========================== */

.confetti-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 999;
  overflow: hidden;
}

.confetti {
  position: absolute;
  width: 10px;
  height: 10px;
  background: #10b981;
  top: -10%;
  animation: confetti-fall 5s linear infinite;
  opacity: 0;
}

.confetti:nth-child(2n) {
  background: #fbbf24;
}

.confetti:nth-child(3n) {
  background: #3b82f6;
}

.confetti:nth-child(4n) {
  background: #ef4444;
}

.confetti:nth-child(5n) {
  background: #8b5cf6;
}

@keyframes confetti-fall {
  0% {
    top: -10%;
    opacity: 1;
    transform: translateX(0) rotateZ(0deg);
  }
  100% {
    top: 110%;
    opacity: 0;
    transform: translateX(calc(100vw * (var(--random, 0.5) - 0.5)))
      rotateZ(720deg);
  }
}

/* ===========================
   ZOOM ICON ON PLANT IMAGE IN MEMORY MODAL
   =========================== */

/* Zoom icon on plant image in memory modal */
.zoom-icon {
  position: absolute;
  bottom: 24px;
  right: 8px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
  pointer-events: none;
}

.plant-image-container:hover .zoom-icon {
  background: rgba(0, 0, 0, 0.7);
}


body.to-teal-100{
  background: url(/images/patern-fond.png) no-repeat bottom right #f1f7ed;
  background-size: contain;  
}
.step3-containter {
    white-space: pre-line; /* C'est la propriété magique */
}
.text-emerald-800, .text-emerald-900{
  color: #394e2d !important;
}
.text-emerald-600{
 color: #546f3d !important; 
}
.text-emerald-700,.text-emerald-700,.text-green-700{
  color: #546f3d !important;
}
.bg-emerald-50{
  background: #f1f7ed !important;
}
.border-emerald-600, .hover\:border-emerald-400:hover, .border-emerald-500  {
  border-color: #546f3d !important;;
}

.bg-emerald-500{
   background: #546f3d !important;
}
.bg-emerald-600{
   background: #90a14e !important;
}
.bg-emerald-700{
 background: #394e2d !important; 
}
.fa-check-circle:before, .fa-circle-check:before {
  color: #546f3d !important;
}
.ring-emerald-300 {
    --tw-ring-color: rgb(110 231 183 / var(--tw-ring-opacity, 1));
}
.ring-emerald-300 {
    --tw-ring-opacity: 1;
    --tw-ring-color: rgb(144 161 74) !important;
}
.to-emerald-600{
    --tw-gradient-to: #90a14e var(--tw-gradient-to-position) !important;
}
.barre-progress.from-emerald-500, .barre-progress.to-emerald-600 barre-progress{
  background: #90a14e !important;
}
.bg-red-600 {
  background-color: rgb(167 74 54) !important;
}
.memory-card-front {
  background: linear-gradient(135deg, #90a14e 0%, #546f3d 100%) !important;
}
.memory-card-back, .memory-card.matched .memory-card-back {
  border: 2px solid #90a14e;
}

.bloc-resultat-bg{
  background: #f1f7ed !important;
  border-color: #90a14e !important;
}

/* ===========================
   WELCOME MODAL
   =========================== */

/* Overlay avec fond flou */
.welcome-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeIn 0.3s ease-in-out;
  padding: 20px;
}

/* Contenu du modal */
.welcome-modal-content {
  background: white;
  border-radius: 0;
  max-width: 1200px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: fadeInUp 0.5s ease-in-out;
}

/* Grille principale */
.welcome-modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 600px;
}

/* Colonne gauche */
.welcome-modal-left {
  background: url('../images/home.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  padding: 0 30px 30px 30px;
  display: flex;
  flex-direction: column;
}

.welcome-modal-logo-top {
  margin-bottom: 20px;
  text-align: center;
}

.logo-code-conduite {
  height: 120px;
  width: auto;
  margin: 0 auto;
  display: block;
}

.welcome-modal-plant-image {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.plant-image-placeholder {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Colonne droite */
.welcome-modal-right {
  background: white url('../images/decoration.png') no-repeat bottom right;
  background-size: auto 200px;
  padding: 60px 50px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Header du modal */
.welcome-modal-header {
  text-align: center;
  margin-bottom: 50px;
}

.welcome-modal-title {
  font-size: 52px;
  font-weight: 700;
  color: #90a14e;
  line-height: 1.1;
  margin-bottom: 20px;
  letter-spacing: -1px;
}

.welcome-modal-subtitle {
  font-size: 24px;
  font-weight: 300;
  color: #333;
  line-height: 1.4;
}

/* Typologies */
.welcome-modal-typologies {
  text-align: center;
  margin-bottom: 50px;
}

.logo-typologies {
  height: auto;
  max-height: 150px;
  max-width: 350px;
  margin: 0 auto;
}

/* Bouton */
.welcome-modal-button-container {
  text-align: center;
  margin-bottom: 30px;
}

.welcome-modal-start-button {
  background: #90a14e;
  color: white;
  font-size: 22px;
  font-weight: 600;
  padding: 18px 60px;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 4px 15px rgba(144, 161, 78, 0.3);
}

.welcome-modal-start-button:hover {
  background: #546f3d;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(144, 161, 78, 0.4);
}

.welcome-modal-start-button:active {
  transform: translateY(0);
}

/* Logo Valhor */
.welcome-modal-logo-bottom {
  text-align: center;
}

.logo-valhor {
    height: 110px;
    width: auto;
    margin: 0 auto;
}

/* Décoration végétale */
.welcome-modal-decoration {
  position: absolute;
  bottom: 20px;
  right: 20px;
}

.decoration-plant {
  height: 150px;
  width: auto;
  opacity: 0.3;
}



/* Responsive */
@media (max-width: 1024px) {
  .welcome-modal-grid {
    grid-template-columns: 1fr;
  }

  .welcome-modal-left {
    display: none;
  }

  .welcome-modal-right {
    padding: 40px 30px;
  }

  .welcome-modal-title {
    font-size: 40px;
  }

  .welcome-modal-subtitle {
    font-size: 20px;
  }

  .welcome-modal-categories {
    gap: 20px;
  }

  .category-icon {
    width: 60px;
    height: 60px;
  }

  .category-icon img {
    width: 35px;
    height: 35px;
  }

  /* Repositionner les flèches de navigation du carrousel plus haut */
  .carousel-nav-arrow {
    top: 20% !important;
  }

  /* Cacher les textes du jeu de mémoire pour gagner de la place */
  .memory-card-text {
    display: none !important;
  }
}

@media (max-width: 640px) {
  .welcome-modal-title {
    font-size: 32px;
  }

  .welcome-modal-subtitle {
    font-size: 18px;
  }

  .welcome-modal-categories {
    flex-direction: column;
    gap: 15px;
  }

  .welcome-modal-start-button {
    font-size: 18px;
    padding: 14px 40px;
  }

  /* Réduire la taille du header pour éviter les superpositions */
  header h1 {
    font-size: 1rem !important;
  }

  header .container img {
    height: 2rem;
  }

  header .container {
    gap: 0.5rem;
  }

  header .container > div {
    gap: 0.5rem;
  }
}

/* Media query spécifique pour la barre de progression mobile */
@media (max-width: 600px) {
  .mobile-progress {
    display: block !important;
  }

  .desktop-progress {
    display: none !important;
  }
}