/* /assets/css/form-wizard.css */

/* INTRO SCREEN */
.intro-screen {
  text-align: center;
  padding: var(--space-xl) var(--space-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
}

.intro-screen .logo {
  height: 80px;
  margin-bottom: var(--space-lg);
}

.intro-screen h1 {
  margin-bottom: var(--space-sm);
}

.intro-screen p {
  max-width: 600px;
  color: var(--zebra-slate);
  margin-bottom: var(--space-lg);
}

/* WIZARD CONTAINER */
#cdc-form-container {
  display: none;
}

/* PROGRESS BAR */
.progress-container {
  margin-bottom: var(--space-xl);
}

.progress-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--space-xs);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--zebra-brown);
}

.progress-bar {
  height: 8px;
  background: var(--zebra-beige);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--zebra-brown);
  width: 0%;
  transition: width var(--transition-slow);
}

/* STEP TRANSITIONS */
#form-steps {
  min-height: 300px;
  animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* TOOLTIPS */
.tooltip-trigger {
  display: inline-flex;
  align-items: center;
  margin-left: var(--space-xs);
  color: var(--zebra-slate);
  /* Plus sombre pour être visible */
  opacity: 0.6;
  cursor: help;
  position: relative;
  vertical-align: middle;
  transition: all var(--transition-fast);
}

.tooltip-trigger:hover {
  color: var(--zebra-brown);
  opacity: 1;
}

.tooltip-bubble {
  position: absolute;
  bottom: 110%;
  /* Un peu plus haut */
  left: 50%;
  transform: translateX(-50%) translateY(0);
  background-color: #73493f !important;
  /* Marron Zebra forcé */
  color: #ffffff !important;
  /* Blanc pur forcé */
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px !important;
  line-height: 1.4;
  width: 240px;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transition: all 0.2s ease;
  z-index: 2000;
  /* Très haut */
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.tooltip-bubble::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #73493f transparent transparent transparent;
}

.tooltip-trigger:hover .tooltip-bubble {
  opacity: 1;
  transform: translateX(-50%) translateY(-5px);
}

/* RECAP STYLES */
.recap-container h2 {
  margin-bottom: var(--space-lg);
}

.recap-step {
  margin-bottom: var(--space-xl);
  padding: var(--space-md);
  background: #f8f7f4;
  border-radius: var(--radius-md);
}

.recap-step-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--zebra-beige);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-xs);
}

.recap-step-header h3 {
  margin: 0;
  font-size: var(--text-lg);
}

.recap-item {
  margin-bottom: var(--space-sm);
}

.recap-question {
  display: block;
  font-weight: var(--font-semibold);
  font-size: var(--text-sm);
  color: var(--zebra-slate);
}

.recap-answer {
  display: block;
  font-size: var(--text-base);
  color: var(--zebra-dark);
}

/* FORM ACTIONS */
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-md);
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--zebra-gray-light);
}

/* CHOOSE OPTION STYLE (Grid for radio/checkbox) */
.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--space-md);
}

.option-card {
  border: 1px solid var(--zebra-gray-light);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  background: white;
  position: relative;
  box-shadow: var(--shadow-sm);
}

.option-card:hover {
  border-color: var(--zebra-brown-light);
  background: var(--zebra-beige);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  z-index: 50;
  /* Garantit que le tooltip passe devant les autres cartes */
}

.option-card.active {
  border-color: var(--zebra-brown);
  background: rgba(115, 73, 63, 0.03);
  box-shadow: 0 0 0 1px var(--zebra-brown);
}

/* Hide default input */
.option-card input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

/* Custom indicator */
.option-card::before {
  content: '';
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border: 2px solid var(--zebra-gray-light);
  background: white;
  transition: all var(--transition-fast);
  margin-top: 2px;
}

/* Specific to radio */
.option-card:has(input[type="radio"])::before {
  border-radius: 50%;
}

/* Specific to checkbox */
.option-card:has(input[type="checkbox"])::before {
  border-radius: 4px;
}

/* Active indicator */
.option-card.active::before {
  border-color: var(--zebra-brown);
  background: var(--zebra-brown);
  box-shadow: inset 0 0 0 4px white;
}

.option-card span {
  font-size: var(--text-base);
  line-height: 1.4;
  color: var(--zebra-dark);
}

.option-card.active span {
  font-weight: var(--font-semibold);
}

.has-error {
  border: 1px solid var(--color-error);
  padding: var(--space-sm);
  border-radius: var(--radius-md);
}

.form-hint {
  display: block;
  font-size: var(--text-xs);
  color: var(--zebra-slate);
  margin-top: -4px;
  margin-bottom: var(--space-sm);
  font-weight: var(--font-regular);
  opacity: 0.8;
}

/* AUTOSAVE CONSENT */
.autosave-consent {
  margin-top: var(--space-md);
  padding: var(--space-xs) var(--space-sm);
  background: var(--zebra-beige);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  color: var(--zebra-brown);
}

.checkbox-container {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  cursor: pointer;
}

.checkbox-container input {
  width: 18px;
  height: 18px;
  accent-color: var(--zebra-brown);
}

/* MANUAL SAVE BTN */
.btn-save {
  position: relative;
}

.save-status {
  position: absolute;
  top: -25px;
  left: 50%;
  transform: translateX(-50%);
  background: #10B981;
  color: white;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: bold;
  white-space: nowrap;
  display: none;
}

.save-status::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -4px;
  border-width: 4px;
  border-style: solid;
  border-color: #10B981 transparent transparent transparent;
}