/* Défi 28 - Styles principaux */
/* Typography: proper French spacing with NBSP handled in JS */

:root {
  --primary: #4338CA;
  --primary-dark: #3730A3;
  --secondary: #BE185D;
  --success: #10B981;
  --text: #1F2937;
  --text-light: #6B7280;
  --bg: #FFFFFF;
  --bg-light: #F9FAFB;
  --border: #E5E7EB;
  --shadow: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text);
  background: var(--bg-light);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Container */
.container {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Quiz specific */
.quiz-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.quiz-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--bg-light);
  z-index: 100;
}

.quiz-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transition: width 0.3s ease;
}

.quiz-screen {
  flex: 1;
  display: none;
  padding: 2rem 1rem;
  opacity: 1;
  color: var(--text);
  animation: fadeIn 0.25s ease;
}

.quiz-screen.active {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

@keyframes fadeIn {
  from { transform: translateY(8px); }
  to { transform: none; }
}

.quiz-question {
  margin-bottom: 2rem;
}

.quiz-question h2 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  line-height: 1.4;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.quiz-option {
  background: white;
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
  font-size: 1rem;
}

.quiz-option:hover {
  border-color: var(--primary);
  transform: translateX(4px);
}

.quiz-option.selected {
  border-color: var(--primary);
  background: #EEF2FF;
}

.quiz-option input[type="checkbox"],
.quiz-option input[type="radio"] {
  margin-right: 0.5rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 1rem 2rem;
  border-radius: 12px;
  font-size: 1.125rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background: white;
  color: var(--text);
  border: 2px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--primary);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

.btn-full {
  width: 100%;
}

/* Input fields */
input[type="text"],
input[type="email"] {
  width: 100%;
  padding: 1rem;
  border: 2px solid var(--border);
  border-radius: 12px;
  font-size: 1rem;
  transition: border-color 0.2s;
}

input[type="text"]:focus,
input[type="email"]:focus {
  outline: none;
  border-color: var(--primary);
}

/* Checkbox */
.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin: 1.5rem 0;
  padding: 1rem;
  background: var(--bg-light);
  border-radius: 8px;
}

.checkbox-group input[type="checkbox"] {
  margin-top: 0.25rem;
}

.checkbox-group label {
  font-size: 0.875rem;
  line-height: 1.5;
}

/* Loading screen */
.loading-screen {
  text-align: center;
}

.loading-items {
  margin: 3rem 0;
  text-align: left;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.loading-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  opacity: 0.3;
  transition: opacity 0.3s;
}

.loading-item.done {
  opacity: 1;
}

.loading-item .check {
  font-size: 1.5rem;
  color: var(--success);
}

.progress-bar-container {
  width: 100%;
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 2rem;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transition: width 0.5s ease;
}

/* Result screen */
.result-card {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}

.result-card h3 {
  color: #3730A3;
  margin-bottom: 1rem;
}

.result-card p,
.plan-detail {
  color: #1F2937;
}

.plan-details {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 1rem 0;
}

.plan-detail {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.plan-detail .icon {
  color: var(--primary);
}

/* Cookie banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  padding: 1.5rem;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
  z-index: 1000;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.cookie-banner.hidden {
  display: none;
}

.cookie-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.cookie-content p {
  flex: 1;
  font-size: 0.875rem;
  margin: 0;
}

.cookie-buttons {
  display: flex;
  gap: 1rem;
}

.cookie-buttons .btn {
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
}

/* Utility */
.hidden {
  display: none !important;
}

.text-center {
  text-align: center;
}

.text-small {
  font-size: 0.875rem;
  color: var(--text-light);
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

/* Responsive */
@media (max-width: 640px) {
  .cookie-content {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .cookie-buttons {
    width: 100%;
  }
  
  .cookie-buttons .btn {
    flex: 1;
  }
}
