/* Reset général */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  background-image: url('../photos/conseil/FondParcours.png');
  background-size: auto;
  background-repeat: repeat;
  background-position: top left;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column; 
  background-image: url('../photos/conseil/FondParcours.png');
  background-size: auto;
  background-repeat: repeat;
  background-position: top left;
  padding: 20px;
}

@keyframes gradientAnimation {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.container {
  background: #f5ebe0;
  border-radius: 18px;
  padding: 48px 32px 40px 32px;
  margin: 40px auto;
  max-width: 960px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

h1 {
  color: #4a536b;
  margin-bottom: 18px;
  font-size: 2.2rem;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center; 
  text-align: center;  
}

p {
  color: #4a536b;
  font-size: 1.05rem;
  margin-bottom: 20px;
  line-height: 1.7;
  justify-content: center; 
  text-align: center;  
}

#countdown {
  font-weight: bold;
  font-size: 1.12rem;
  color: #4a536b;
  margin-bottom: 22px;
  letter-spacing: 0.5px;
  text-align: center;
}

#start-zone {
  display: flex;
  justify-content: center;
  margin-top: 40px;
}

button {
  background-color: #d5bdaf;
  color: #4a536b;
  padding: 14px 34px;
  font-size: 1.07rem;
  border: none;
  border-radius: 10px;
  margin-top: 30px;
  cursor: pointer;
  font-weight: bold;
  box-shadow: 0 3px 12px rgba(44,49,80,0.06);
  transition: background 0.3s, box-shadow 0.3s;
}

button:hover {
  background-color: #d5bdaf;
}

.back-button {
  position: absolute;
  top: 24px;
  left: 24px;
  text-decoration: none;
  font-size: 1.07rem;
  background-color: #d5bdaf;
  color: #4a536b;
  font-weight: bold;
  padding: 9px 16px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.10);
  z-index: 10;
  border: 1px solid #ddd;
}

.memorisation-columns {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  margin-top: 24px;
}

.column {
  width: 48%;
  padding: 18px 12px 18px 12px;
  border-radius: 13px;
  min-height: 220px;
  background: #fefcf9;
  box-shadow: 0 2px 8px rgba(100,100,100,0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.column h2 {
  font-size: 1.22rem;
  color: #02084b;
  margin-bottom: 13px;
  text-align: center;
  font-weight: bold;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 7px;
}

ul {
  width: 100%;
  padding: 0;
  list-style: none;
}

li {
  width: 100%;
  background-color: #f7f7f7;
  padding: 13px 14px;
  border-radius: 8px;
  margin: 8px 0;
  font-weight: 500;
  font-size: 1.06rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  text-align: left;
  transition: background 0.2s, color 0.2s;
}

.green li {
  background-color: #d6f5db !important;
  color: #1c4b2e !important;
  border: 1.5px solid #b3eac2;
}

.red li {
  background-color: #f8d1d1 !important;
  color: #6d1c1c !important;
  border: 1.5px solid #f2b1b1;
}

#sorting-zone {
  margin-top: 30px;
}

#sorting-zone h2 {
  margin-bottom: 18px;
  font-size: 1.25rem;
  color: #02084b;
  text-align: left;
}

.columns {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 28px;
}

.drop-zone {
  background: #fff;
  border: 2.3px dashed #d8d8d8;
  border-radius: 12px;
  min-height: 170px;
  padding: 10px 14px;
  flex: 1;
  margin: 0 6px;
  transition: background 0.2s, border-color 0.2s;
  box-shadow: 0 2px 8px rgba(160,160,160,0.04);
}

.drop-zone h3 {
  font-size: 1.07rem;
  font-weight: bold;
  margin-bottom: 8px;
  color: #222050;
  letter-spacing: 0.5px;
}

.drop-zone:hover, .drop-zone.dragover {
  background-color: #f7f3e6;
  border-color: #c2baa6;
}

.choices {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-top: 20px;
  min-height: 48px;
}

.choice {
  background: #f0f0f0;
  padding: 12px 18px;
  border-radius: 9px;
  font-size: 1.03rem;
  cursor: grab;
  border: 1.3px solid #e3d5ca;
  box-shadow: 0 2px 5px rgba(0,0,0,0.09);
  font-weight: 500;
  margin-bottom: 6px;
  user-select: none;
  transition: background 0.2s, border 0.2s;
}

.choice:active {
  background: #e3d5ca;
  border-color: #c8b6a6;
}

.score {
  font-size: 1.28rem;
  font-weight: bold;
  color: #02084b;
  margin-top: 26px;
  text-align: center;
}

/* Responsive */
@media (max-width: 820px) {
  .container { padding: 25px 4vw; }
  .memorisation-columns, .columns { flex-direction: column; gap: 0; }
  .column, .drop-zone { width: 100%; margin: 12px 0; }
  .choices { flex-direction: column; gap: 10px; }
}

@media (max-width: 520px) {
  .container { padding: 10px 0; }
  .back-button { left: 8px; top: 8px; font-size: 1rem;}
  h1 { font-size: 1.14rem; }
}

.hidden {
  display: none !important;
}

.choice {
  background: #f5f5f5;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 15px;
  cursor: grab;
  border: 1px solid #ccc;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  font-weight: 500;
  color: #222;
  user-select: none;
}

.choice.dragging {
  opacity: 1 !important; 
  transform: scale(1.02);
  background-color: #f0eae1;
  border: 2px solid #4a536b;
}


.drag-preview {
  padding: 12px 18px;
  background-color: #e3d5ca;
  border: 2px solid #4a536b;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: bold;
  color: #4a536b;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.correct {
  background-color: #d6f5db !important;
  color: #1c4b2e !important;
  border: 1.5px solid #b3eac2 !important;
}

.incorrect {
  background-color: #f8d1d1 !important;
  color: #6d1c1c !important;
  border: 1.5px solid #f2b1b1 !important;
}

#error-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3); 
  display: flex;
  justify-content: center;
  align-items: flex-start;      
  overflow-y: auto;
  padding: 60px 20px;           
  box-sizing: border-box;
  z-index: 1000;
}


.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(30, 30, 30, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.modal-content {
  background: #fff8f0;
  padding: 30px 24px;
  border-radius: 14px;
  max-width: 600px;
  width: 90%;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  text-align: center;

  margin: 60px auto; 
}


.modal-content p {
  font-size: 1.1rem;
  color: #4a536b;
  margin-bottom: 20px;
  line-height: 1.6;
}

.modal-content button {
  background-color: #d5bdaf;
  color: #4a536b;
  border: none;
  padding: 12px 22px;
  font-size: 1rem;
  border-radius: 8px;
  margin: 10px 6px 0;
  cursor: pointer;
  font-weight: bold;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: background-color 0.3s ease;
}

.modal-content button:hover {
  background-color: #d5bdaf;
}

#next-part-btn-container,
#back-home-btn-container {
  text-align: center;
  margin-top: 20px;
}

#next-part-btn,
#back-home-btn {
  background-color: #d5bdaf;
  color: #4a536b;
  padding: 14px 34px;
  font-size: 1.07rem;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: bold;
  box-shadow: 0 3px 12px rgba(44, 49, 80, 0.06);
  transition: background 0.3s, box-shadow 0.3s;
}

#next-part-btn:hover,
#back-home-btn:hover {
  background-color: #d5bdaf;
}

#back-home-btn-container {
  margin-top: 10px;
}

.correct-correction {
  background-color: #d6f5db !important;
  color: #1c4b2e !important;
  border: 1.5px solid #b3eac2;
}

.incorrect-correction {
  background-color: #f8d1d1 !important;
  color: #6d1c1c !important;
  border: 1.5px solid #f2b1b1;
}

#answer-buttons {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin: 30px 0;
}

#choose-good,
#choose-bad {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  font-size: 1.05rem;
  font-weight: 600;
  border: none;
  border-radius: 14px;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
  color: white;
  transition: transform 0.2s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

#choose-good {
  background: linear-gradient(135deg, #43a047, #66bb6a);
}

#choose-bad {
  background: linear-gradient(135deg, #e53935, #ef5350);
}

#choose-good:hover,
#choose-bad:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.15);
}

#classification-title {
  width: 100%;
  max-width: 800px;
  margin: 30px auto;        
  text-align: center;        
  font-size: 1.8rem;
  color: #10003a;           
  font-weight: bold;
  letter-spacing: 0.5px;
  display: block;
}

.explication-img {
  display: block;
  max-width: 280px;
  width: 100%;
  height: auto;
  margin: 20px auto 0;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.phrase-layout {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
  margin: 20px 0;
  flex-wrap: wrap; /* pour que ça passe bien sur petit écran */
}

.phrase-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 300px;
  text-align: center;
}

.classement-img {
  max-width: 120px;
  width: 100%;
  height: auto;
  margin-top: 12px;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.btn-group {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.btn-group button {
  padding: 14px 22px;
  font-size: 1rem;
  border-radius: 10px;
  font-weight: bold;
  cursor: pointer;
  background-color: #d5bdaf;
  color: #4a536b;
  border: none;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  transition: background-color 0.3s ease;
}

.btn-group button:hover {
  background-color: #2f364d;
}
