/* ============================================================
   Brieftonic — style.css
   Composants spécifiques à l'outil Brieftonic.
   Les variables, reset, boutons, FAQ, section SEO, footer,
   disclaimer et utilitaires viennent de outils-common.css.
   ============================================================ */


/* ── Header (masqué par nav.js, conservé en fallback) ─────── */

.site-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.header-content {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.brand-name {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
}

.brand-by {
  font-size: 0.85rem;
  color: var(--muted);
}


/* ── Bandeau Tempotonic ───────────────────────────────────── */

.banner {
  padding: 0.7rem 1.5rem;
  background: rgba(251, 186, 50, 0.15);
  border-bottom: 2px solid var(--primary);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--primary);
}

.banner button {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0 0.3rem;
}


/* ── Conteneur principal ──────────────────────────────────── */

.tool-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  width: 100%;
  flex: 1;
}

.tool-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--light);
  text-align: center;
  margin-bottom: 0.3rem;
}

.tool-subtitle {
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 2rem;
}


/* ── Stepper (variante 5 pastilles) ───────────────────────── */

.stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 2.5rem;
  padding: 0 0.5rem;
}

.stepper-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.3rem;
  flex-shrink: 0;
}

.stepper-step[disabled] { cursor: default; }

.stepper-pill {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  border: 2px solid var(--border);
  color: var(--muted);
  background: var(--surface);
  transition: all 0.3s ease;
}

.stepper-label {
  font-size: 0.7rem;
  color: var(--muted);
  transition: color 0.3s ease;
  white-space: nowrap;
}

.stepper-step.active .stepper-pill {
  border-color: var(--primary);
  color: var(--dark);
  background: var(--primary);
}

.stepper-step.active .stepper-label {
  color: var(--primary);
}

.stepper-step.completed .stepper-pill {
  border-color: var(--primary);
  color: var(--primary);
  background: transparent;
}

.stepper-step.completed .stepper-label {
  color: var(--muted);
}

.stepper-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  min-width: 20px;
  max-width: 60px;
  transition: background 0.3s ease;
}

.stepper-line.active {
  background: var(--primary);
}


/* ── Étapes ───────────────────────────────────────────────── */

.step-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

.step-content.active {
  display: block;
}

.step-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--light);
  margin-bottom: 1.5rem;
}


/* ── Champs de formulaire ─────────────────────────────────── */

.field-group {
  margin-bottom: 1.5rem;
}

.field-group.conditional {
  display: none;
}

.field-group.conditional.visible {
  display: block;
}

.field-label {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--light);
  margin-bottom: 0.2rem;
}

.field-label .required {
  color: var(--primary);
  margin-left: 0.15rem;
}

.field-help {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.6rem;
}

.field-input {
  width: 100%;
  padding: 0.7rem 0.9rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--light);
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.2s ease;
}

.field-input:focus {
  outline: none;
  border-color: var(--primary);
}

.field-input::placeholder {
  color: #555;
}

.field-textarea {
  resize: vertical;
  min-height: 80px;
}

.field-select {
  width: 100%;
  padding: 0.7rem 0.9rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--light);
  font-size: 0.95rem;
  font-family: inherit;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  padding-right: 2.5rem;
}

.field-select:focus {
  outline: none;
  border-color: var(--primary);
}

.field-date {
  color-scheme: dark;
}

.field-input.error,
.field-select.error {
  border-color: var(--error);
}


/* ── Cartes cliquables (goal, video_type, platform) ──────── */

.card-grid {
  display: grid;
  gap: 0.6rem;
}

.card-grid.cards-3col {
  grid-template-columns: repeat(3, 1fr);
}

.card-grid.cards-2col {
  grid-template-columns: repeat(2, 1fr);
}

.card-option {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.9rem 0.7rem;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
  user-select: none;
}

.card-option:hover {
  border-color: var(--primary);
}

.card-option.selected {
  border-color: var(--primary);
  background: var(--warning-bg);
}

.card-option .card-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--light);
  display: block;
}

.card-option.selected .card-label {
  color: var(--primary);
}

.card-option .card-help {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.3rem;
  display: block;
}

.card-grid.error .card-option {
  border-color: var(--error);
}


/* ── Pills (script, volume, brand_assets, drone, priority) ── */

.pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pill-option {
  padding: 0.55rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--light);
  transition: all 0.2s ease;
  user-select: none;
  white-space: nowrap;
}

.pill-option:hover {
  border-color: var(--primary);
}

.pill-option.selected {
  border-color: var(--primary);
  background: var(--warning-bg);
  color: var(--primary);
}

.pill-group.error .pill-option {
  border-color: var(--error);
}


/* ── Checkboxes stylisées ─────────────────────────────────── */

.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  padding: 0.45rem 0.8rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: all 0.2s ease;
  user-select: none;
}

.checkbox-item:hover {
  border-color: var(--primary);
}

.checkbox-item.checked {
  border-color: var(--primary);
  background: var(--warning-bg);
}

.checkbox-item input[type="checkbox"] {
  display: none;
}

.checkbox-item .check-mark {
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--muted);
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.checkbox-item.checked .check-mark {
  border-color: var(--primary);
  background: var(--primary);
}

.checkbox-item.checked .check-mark::after {
  content: '';
  width: 4px;
  height: 8px;
  border: solid var(--dark);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin-top: -2px;
}

.checkbox-item .check-label {
  font-size: 0.88rem;
  color: var(--light);
}

.checkbox-item.checked .check-label {
  color: var(--primary);
}


/* ── Lien Tempotonic (champ durée) ────────────────────────── */

.tempotonic-link {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--primary);
  text-decoration: none;
}

.tempotonic-link:hover {
  text-decoration: underline;
}

.tempotonic-duration {
  padding: 0.7rem 0.9rem;
  background: var(--warning-bg);
  border: 1px solid var(--primary);
  border-radius: 6px;
  font-size: 0.95rem;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.link-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: underline;
}

.link-btn:hover { color: var(--light); }


/* ── Navigation étapes ────────────────────────────────────── */

.step-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.btn-next, .btn-prev {
  padding: 0.7rem 1.5rem;
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

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

.btn-next:hover {
  background: var(--primary-dark);
}

.btn-prev {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}

.btn-prev:hover {
  color: var(--light);
  border-color: var(--light);
}

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


/* ── Toast validation ─────────────────────────────────────── */

.validation-toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--error);
  color: var(--light);
  padding: 0.7rem 1.2rem;
  border-radius: 6px;
  font-size: 0.9rem;
  z-index: 100;
  animation: toastIn 0.3s ease;
  max-width: 90%;
  text-align: center;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(10px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}


/* ── Récap ────────────────────────────────────────────────── */

.recap-sections {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.recap-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.2rem;
}

.recap-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.8rem;
}

.recap-section-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary);
}

.recap-edit-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: underline;
}

.recap-edit-btn:hover { color: var(--light); }

.recap-field {
  margin-bottom: 0.5rem;
}

.recap-field:last-child { margin-bottom: 0; }

.recap-field-label {
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.recap-field-value {
  font-size: 0.95rem;
  color: var(--light);
}

.recap-badge {
  display: inline-block;
  font-size: 0.7rem;
  color: var(--primary);
  background: var(--warning-bg);
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  margin-left: 0.4rem;
}

.recap-warnings {
  padding: 0.8rem 1rem;
  background: var(--warning-bg);
  border: 1px solid var(--primary);
  border-radius: 6px;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  color: var(--primary);
}

.recap-warnings p { margin-bottom: 0.3rem; }
.recap-warnings p:last-child { margin-bottom: 0; }

.recap-nav {
  gap: 0.5rem;
  flex-direction: column;
  align-items: stretch;
}

.recap-actions {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

/* Bouton secondaire spécifique Brieftonic (bordure primary) */
.recap-actions .btn-secondary {
  border-color: var(--primary);
  color: var(--primary);
}

.recap-actions .btn-secondary:hover {
  background: var(--warning-bg);
}

.btn-link {
  display: block;
  text-align: center;
  padding: 0.5rem;
  font-size: 0.9rem;
  color: var(--muted);
  text-decoration: none;
}

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


/* ── SEO : overrides spécifiques Brieftonic ───────────────── */
/*    La structure de base (.seo-section, .seo-container,
     .seo-title, .seo-intro, .seo-columns, .seo-column,
     .seo-faq, .faq-item, .faq-question, .faq-answer)
     vient de outils-common.css.
     Brieftonic a quelques légères variations sur les couleurs
     de texte intro et colonnes.                                */

.seo-intro p {
  color: var(--light);
}

.seo-column p {
  color: var(--light);
}


/* ── Responsive mobile ────────────────────────────────────── */

@media (max-width: 768px) {
  .tool-container { padding: 1.5rem 1rem 2rem; }
  .tool-title { font-size: 1.3rem; }

  .stepper { gap: 0; }
  .stepper-label { font-size: 0.6rem; }
  .stepper-pill { width: 30px; height: 30px; font-size: 0.75rem; }
  .stepper-line { min-width: 12px; }

  .card-grid.cards-3col { grid-template-columns: repeat(2, 1fr); }
  .card-grid.cards-2col { grid-template-columns: 1fr; }

  .pill-group { gap: 0.4rem; }
  .pill-option { font-size: 0.82rem; padding: 0.45rem 0.8rem; }

  .step-nav { flex-direction: column-reverse; gap: 0.8rem; }
  .step-nav .btn-next, .step-nav .btn-prev, .step-nav .btn-primary { width: 100%; text-align: center; }
}
