/* ============================================================
   PromptMaker BNTIC — charte graphique alignée sur bntic.com
   Signature : dégradé bleu #0d6efd → orange #ff6b35,
   cartes hover-lift arrondies, effets glass, typographie éditoriale.
   ============================================================ */

:root {
  --bntic-blue: #0d6efd;
  --bntic-orange: #ff6b35;
  --bntic-dark: #0b1220;
  --bntic-gradient: linear-gradient(135deg, var(--bntic-blue), var(--bntic-orange));
  --bntic-radius: 14px;
  --bntic-shadow: 0 6px 24px rgba(11, 18, 32, 0.08);
  --bntic-shadow-lift: 0 12px 32px rgba(11, 18, 32, 0.16);
}

html { scroll-behavior: smooth; }

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  background-color: #f6f8fb;
}

::selection { background: rgba(13, 110, 253, 0.3); color: inherit; }

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bs-body-bg); }
::-webkit-scrollbar-thumb { background: #ced4da; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--bntic-blue); }

/* --- Barre signature en haut de page --- */
.bntic-topbar {
  height: 4px;
  background: var(--bntic-gradient);
}

/* --- Marque : B en pastille + PromptMaker + News italique --- */
.brand-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  background: var(--bntic-gradient);
  color: #fff;
  font-weight: 800;
  font-size: 1.05rem;
}

.text-gradient {
  background: var(--bntic-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* --- Navigation --- */
.navbar-bntic {
  background: var(--bntic-dark);
}

.navbar-bntic .nav-link {
  font-weight: 500;
  border-radius: 8px;
  padding-inline: 0.75rem;
}

.navbar-bntic .nav-link:hover,
.navbar-bntic .nav-link:focus {
  background: rgba(255, 255, 255, 0.08);
}

/* --- Héros --- */
.hero-bntic {
  background: var(--bntic-dark);
  background-image:
    radial-gradient(1000px 380px at 85% -10%, rgba(13, 110, 253, 0.45), transparent 60%),
    radial-gradient(700px 320px at 5% 110%, rgba(255, 107, 53, 0.35), transparent 60%);
  border-radius: var(--bntic-radius);
  color: #fff;
  overflow: hidden;
}

.hero-bntic .badge-flash {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(10px);
  border-radius: 999px;
  font-weight: 500;
}

/* --- Boutons --- */
.btn-bntic {
  background: var(--bntic-gradient);
  border: none;
  color: #fff;
  font-weight: 600;
  border-radius: 10px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn-bntic:hover, .btn-bntic:focus {
  color: #fff;
  filter: brightness(1.06);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(255, 107, 53, 0.35);
}

.btn-outline-bntic {
  border: 2px solid var(--bntic-blue);
  color: var(--bntic-blue);
  font-weight: 600;
  border-radius: 10px;
  background: transparent;
}

.btn-outline-bntic:hover, .btn-outline-bntic:focus {
  background: var(--bntic-blue);
  color: #fff;
}

/* --- Cartes hover-lift (signature bntic.com) --- */
.card {
  border: 1px solid rgba(11, 18, 32, 0.06);
  border-radius: var(--bntic-radius);
  box-shadow: var(--bntic-shadow);
}

.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover, .hover-lift:focus-within {
  transform: translateY(-5px);
  box-shadow: var(--bntic-shadow-lift);
}

/* --- Cartes de domaines colorées --- */
.cat-card {
  --cat-color: var(--bntic-blue);
  border-top: 4px solid var(--cat-color);
  text-align: center;
  height: 100%;
}

.cat-card .cat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 12px;
  font-size: 1.5rem;
  color: var(--cat-color);
  background: color-mix(in srgb, var(--cat-color) 12%, #ffffff);
}

.cat-card:hover .cat-icon { color: #fff; background: var(--cat-color); }

.cat-chip {
  --cat-color: var(--bntic-blue);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--cat-color);
  background: color-mix(in srgb, var(--cat-color) 12%, #ffffff);
}

/* --- Gabarits : bordure éditoriale gauche (comme bntic.com) --- */
.template-card { border-left: 4px solid var(--cat-color, var(--bntic-blue)); }

/* --- Assistant : stepper élégant --- */
.wizard-steps { display: flex; gap: 0.5rem; }

.wizard-step {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.75rem;
  border-radius: 10px;
  background: #fff;
  border: 1px solid rgba(11, 18, 32, 0.08);
  color: #6c757d;
  font-size: 0.85rem;
  font-weight: 600;
}

.wizard-step .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: #e9ecef;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.wizard-step.active {
  color: #fff;
  background: var(--bntic-gradient);
  border-color: transparent;
  box-shadow: 0 6px 18px rgba(13, 110, 253, 0.3);
}

.wizard-step.active .num { background: rgba(255, 255, 255, 0.25); color: #fff; }

.wizard-step.done { color: var(--bntic-blue); border-color: rgba(13, 110, 253, 0.35); }
.wizard-step.done .num { background: rgba(13, 110, 253, 0.12); color: var(--bntic-blue); }

/* --- Boîtes d'exemple dynamiques --- */
.hint-box {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  padding: 0.65rem 0.9rem;
  margin-bottom: 0.5rem;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(13, 110, 253, 0.07), rgba(255, 107, 53, 0.07));
  border: 1px dashed rgba(13, 110, 253, 0.35);
  font-size: 0.875rem;
  color: #35507a;
}

.hint-box .bi { color: var(--bntic-orange); flex-shrink: 0; margin-top: 0.1rem; }

/* --- Récapitulatif du besoin dans l'assistant --- */
.recap-box {
  background: #fff;
  border-radius: var(--bntic-radius);
  border: 1px solid rgba(11, 18, 32, 0.08);
  padding: 0.9rem 1.1rem;
}

.recap-box .recap-item { font-size: 0.85rem; color: #495057; }
.recap-box .recap-item strong { color: var(--bntic-dark); }

/* --- Résultat : encadré prompt --- */
.prompt-output {
  background: var(--bntic-dark);
  color: #e9ecef;
  border-radius: var(--bntic-radius);
  padding: 1.5rem;
}

.prompt-output pre {
  white-space: pre-wrap;
  word-break: break-word;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0;
  color: inherit;
}

pre.text-wrap {
  white-space: pre-wrap;
  word-break: break-word;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.9rem;
  line-height: 1.55;
}

/* --- Sections avec numéro (comment ça marche) --- */
.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--bntic-gradient);
  color: #fff;
  font-weight: 700;
  font-size: 1.2rem;
}

/* --- Pied de page --- */
.footer-bntic {
  background: var(--bntic-dark);
}

.footer-bntic a { text-decoration: none; }
.footer-bntic a:hover { color: var(--bntic-orange) !important; }

/* --- Divers --- */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

a:focus-visible, button:focus-visible,
.form-control:focus-visible, .form-select:focus-visible {
  outline: 3px solid var(--bntic-orange);
  outline-offset: 2px;
}

.form-control, .form-select { border-radius: 10px; }

.form-control:focus, .form-select:focus {
  border-color: var(--bntic-blue);
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.2);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  header, footer, .btn, form, .wizard-steps { display: none !important; }
  .prompt-output { background: #fff; color: #000; border: 1px solid #000; }
}

/* ============================================================
   Itération « IA temps réel » : boutons OK, chip de domaine,
   animations et typographie Inter.
   ============================================================ */

body {
  font-family: "InterVariable", "Inter", system-ui, -apple-system,
    "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}

h1, h2, h3, .navbar-brand { letter-spacing: -0.02em; }

/* --- Bouton « ↵ OK » de validation de champ --- */
.btn-field-ok {
  background: rgba(13, 110, 253, 0.08);
  border: 1px solid rgba(13, 110, 253, 0.35);
  color: var(--bntic-blue);
  font-weight: 600;
  font-size: 0.85rem;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease;
}

.btn-field-ok:hover, .btn-field-ok:focus {
  background: var(--bntic-gradient);
  border-color: transparent;
  color: #fff;
}

.input-group > .btn-field-ok { border-top-right-radius: 10px; border-bottom-right-radius: 10px; }

/* --- Chip « domaine détecté » par le modèle IA --- */
.domain-detected {
  animation: chipPop 0.35s ease-out;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--cat-color) 30%, transparent);
}

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

/* --- Icône de chargement pendant l'appel IA --- */
.spin { display: inline-block; animation: spin 0.8s linear infinite; }

@keyframes spin { to { transform: rotate(360deg); } }

/* --- Apparitions douces (signature bntic.com) --- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in-up { animation: fadeInUp 0.55s ease-out both; }

/* --- Touche clavier stylée --- */
kbd {
  background: var(--bntic-dark);
  color: #fff;
  border-radius: 6px;
  padding: 0.15rem 0.45rem;
  font-size: 0.8em;
  box-shadow: inset 0 -2px 0 rgba(255, 255, 255, 0.2);
}

/* --- Hint box : transition douce quand l'exemple change --- */
.hint-box span[data-hint-field] { transition: opacity 0.25s ease; }

/* --- Sélecteurs et zones de saisie dans les input-groups --- */
.input-group .form-control, .input-group .form-select { border-right: 0; }
