/* ------------------------------
   RESET DE BASE
------------------------------ */

body {
  margin: 0;
  padding: 0;
  font-family: system-ui, sans-serif;
  background: #f7f7f7;
  color: #222;
  line-height: 1.55;
}

/* Conteneur principal */
#container {
  max-width: 600px;
  margin: 4rem auto;
  padding: 0 1.5rem;
  text-align: center;
}

/* ------------------------------
   TITRES
------------------------------ */

h1 {
  font-size: 2rem;
  margin: 2rem 0 1rem;
}

h2 {
  margin: 0.5rem 0 2rem;
  font-weight: 400;
  color: #444;
}

/* ------------------------------
   BOUTONS
------------------------------ */

button {
  padding: 0.6rem 1.2rem;
  font-size: 1rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  background: #333;
  color: white;
  transition: background 0.2s;
}

button:hover {
  background: #555;
}

#lang-select button.active {
  background: #0077cc;
}

/* ------------------------------
   CARTE DU DÉFI
------------------------------ */

#challenge {
  background: white;
  padding: 2rem 1.8rem;
  margin-top: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  text-align: left; /* meilleure lisibilité */
  min-height: 150px;
  opacity: 0;
}

/* Animation fade-in */
.fade-in {
  animation: fadeIn 0.5s ease forwards;
}

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

/* ------------------------------
   SECTIONS DU DÉFI
------------------------------ */

.challenge-type {
  margin-bottom: 0.8rem;
  font-size: 1.05rem;
  color: #666;
}

.challenge-description {
  margin-bottom: 1.4rem;
  font-size: 1.45rem;
  font-weight: 500;
  line-height: 1.4;
  border-bottom: 1px solid #eee;
  padding-bottom: 1rem;
}

.challenge-tips {
  text-align: right;
  margin-top: 1rem;
  font-size: 1.15rem;
  line-height: 1.45;
}

.challenge-tips .label {
  display: block;       /* force "Trucs:" sur sa propre ligne */
  text-align: left;     /* le label reste aligné à gauche */
  margin-bottom: 0.3rem;
}

.tips-content {
  display: block;
  margin-top: 0.4rem;
  padding-right: 0.5rem; 
   text-align: left; 
}
.tips-content a {
  color: #0077cc;
  text-decoration: none;
}

.tips-content a:hover {
  text-decoration: underline;
}

/* ------------------------------
   TOGGLES (Références + Contact)
------------------------------ */

.toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  padding: 0.6rem 0;
  font-weight: 600;
  border-top: 1px solid #ddd;
  user-select: none;
  margin-top: 2rem;
}

.toggle .arrow {
  transition: transform 0.25s ease;
}

.toggle.open .arrow {
  transform: rotate(180deg);
}

/* ------------------------------
   SECTION RÉFÉRENCES
------------------------------ */

#references {
  display: none;
  margin-top: 1rem;
  font-size: 0.95rem;
  color: #444;
  padding-left: 0.5rem;
  border-left: 2px solid #eee;
  animation: fadeIn 0.25s ease;
}

#references-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-start;
}

.reference-item {
  padding: 0.5rem 0;
  border-bottom: 1px solid #eee;
}

.reference-item h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.reference-item p {
  margin: 0.2rem 0;
  line-height: 1.4;
}

.reference-item a {
  color: #0077cc;
  text-decoration: none;
}

.reference-item a:hover {
  text-decoration: underline;
}

#references-list ul {
  margin: 0.3rem 0 0.8rem 1rem;
  padding: 0;
}

#references-list li {
  margin: 0.2rem 0;
}

#references,
#references * {
  text-align: left;
}
/* ------------------------------
   SECTION MINDSET
------------------------------ */
#mindset-section {
  margin-top: 1rem;
  font-size: 0.95rem;
  color: #444;
  padding-left: 0.5rem;
  border-left: 2px solid #eee;
  animation: fadeIn 0.25s ease;
}
#mindset-section ul {
  margin: 0.3rem 0 1rem 1rem;
  padding: 0;
}

#mindset-section li {
  margin: 0.3rem 0;
}
#mindset-section p {
  font-weight: 700;
  margin-top: 1rem;
}
.mindset-title {
  font-weight: 700;
  margin-top: 1rem;
  color: #222;
}
/* ------------------------------
   SECTION CONTACT
------------------------------ */

#contact-section {
  display: none;
  margin-top: 1rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
  width: 100%;
  padding: 0.6rem;
  font-size: 1rem;
  border-radius: 6px;
  border: 1px solid #ccc;
  background: #fff;
  color: #333;
  resize: vertical;
}

.contact-form textarea {
  min-height: 120px;
}

.contact-form label {
  font-size: 0.95rem;
  color: #444;
}

.contact-form button {
  align-self: flex-start;
  padding: 0.6rem 1.2rem;
  background: #333;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.contact-form button:hover {
  background: #555;
}

/* ------------------------------
   RESPONSIVE
------------------------------ */

@media (max-width: 480px) {
  .challenge-description {
    font-size: 1.3rem;
  }
  .challenge-tips {
    font-size: 1.1rem;
  }
  #challenge {
    padding: 1.6rem;
  }
}

