/*
 * CSS des pages assistants — aligné sur src/blog/blog.css et les tokens de
 * HomePage.vue (.landing-root).
 *
 * Fichier PLAT et séparé : les blocs <style> des SFC ne sont pas extraits par
 * ssrLoadModule. build-assistants.mjs le hashe et le copie dans dist/blog-assets/.
 *
 * Tous les sélecteurs sont préfixés .as-root pour éviter toute fuite. Les tokens
 * sont dupliqués volontairement (mêmes valeurs que .blog-root / .landing-root) :
 * la landing les scope à son composant, ils ne sont pas globaux.
 */

.as-root {
  /* Brand */
  --brand-purple: #7c4dff;
  --brand-blue: #536dfe;
  --brand-soft: #667eea;
  --accent-cyan: #00e5ff;
  --accent-pink: #ff3d9a;

  /* Surfaces */
  --bg-0: #08081a;
  --bg-1: #0d0d22;
  --bg-2: #12122e;
  --glass: rgba(255, 255, 255, 0.05);
  --glass-strong: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.18);

  /* Text */
  --text-1: #f4f4fb;
  --text-2: #b8b8d0;
  --text-3: #7a7aa0;

  /* Fonts */
  --font-display: 'Bricolage Grotesque Variable', system-ui, sans-serif;
  --font-serif: 'Instrument Serif', Georgia, serif;
  --font-body: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'Geist Mono Variable', ui-monospace, monospace;

  /* Radius */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;

  --as-max: 800px;

  font-family: var(--font-body);
  background: var(--bg-0);
  color: var(--text-1);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

.as-root *,
.as-root *::before,
.as-root *::after {
  box-sizing: border-box;
}

.as-root a {
  color: inherit;
  text-decoration: none;
}

.as-root img {
  display: block;
  max-width: 100%;
}

/* Focus clavier visible partout (accessibilité) */
.as-root a:focus-visible,
.as-root button:focus-visible,
.as-root input:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 3px;
}

/* ========== AMBIANCE (identique au blog) ========== */

.as-root .grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.06;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.8'/%3E%3C/svg%3E");
}

.as-root .halo {
  position: fixed;
  top: -25%;
  left: 50%;
  transform: translateX(-50%);
  width: 1000px;
  height: 700px;
  max-width: 150vw;
  background: radial-gradient(ellipse at center, rgba(124, 77, 255, 0.18), transparent 65%);
  pointer-events: none;
  z-index: 0;
}

/* ========== NAV (pilule flottante) ========== */

.as-root .as-nav-bar {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  width: calc(100% - 32px);
  max-width: 1220px;
  background: rgba(13, 13, 34, 0.65);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 10px 12px 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.as-root .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.02em;
}

.as-root .brand-mark {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  filter: drop-shadow(0 6px 20px rgba(124, 77, 255, 0.45));
}

.as-root .brand-dot-ai {
  color: var(--brand-soft);
}

.as-root .nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.as-root .nav-link {
  padding: 8px 14px;
  font-size: 14px;
  color: var(--text-2);
  border-radius: 100px;
  transition: all 0.2s ease;
}

.as-root .nav-link:hover {
  color: var(--text-1);
  background: var(--glass);
}

.as-root .lp-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 100px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.as-root .lp-btn-primary {
  background: linear-gradient(135deg, var(--brand-purple), var(--brand-blue));
  color: #fff;
  box-shadow:
          0 4px 16px -4px rgba(124, 77, 255, 0.6),
          inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.as-root .lp-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow:
          0 10px 30px -5px rgba(124, 77, 255, 0.7),
          inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.as-root .lp-btn-ghost {
  background: var(--glass);
  border: 1px solid var(--border-strong);
  color: var(--text-1);
}

.as-root .lp-btn-ghost:hover {
  background: var(--glass-strong);
  transform: translateY(-2px);
}

/* ========== LAYOUT ========== */

.as-root .as-main {
  flex: 1;
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--as-max);
  margin: 0 auto;
  padding: 128px clamp(20px, 5vw, 24px) 96px;
}

/* ========== BREADCRUMB ========== */

.as-root .as-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-3);
  margin-bottom: 32px;
}

.as-root .as-breadcrumb a:hover {
  color: var(--text-1);
}

.as-root .as-breadcrumb [aria-current='page'] {
  color: var(--text-2);
}

/* ========== HÉROS ========== */

.as-root .as-hero {
  text-align: center;
  margin-bottom: 72px;
}

.as-root .as-hero-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  border-radius: var(--r-md);
  filter: drop-shadow(0 10px 30px rgba(124, 77, 255, 0.4));
}

/* Dégradés repris à l'identique de blog.css (.blog-article h1 / .blog-excerpt)
   pour que les deux univers se répondent. */
.as-root .as-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(32px, 6vw, 48px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.035em;
  margin: 0 0 16px;
  background: linear-gradient(135deg, #fff 0%, #bcd2ff 35%, #b79cff 65%, #ffb0dc 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.as-root .as-intro {
  font-family: var(--font-serif);
  font-size: clamp(17px, 2.4vw, 20px);
  font-style: italic;
  line-height: 1.5;
  max-width: 620px;
  margin: 0 auto 36px;
  background: linear-gradient(135deg, var(--brand-purple) 0%, var(--accent-cyan) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ── Signature de la page : la barre de prompt ───────────────────── */

.as-root .as-prompt {
  max-width: 720px;
  margin: 0 auto;
}

/* Label présent pour l'accessibilité, masqué visuellement (le placeholder
   porte l'exemple concret). */
.as-root .as-prompt-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.as-root .as-prompt-field {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px 10px 26px;
  /* Fond plus marqué que le reste de la page : la barre est l'élément
     signature, elle doit se détacher nettement du halo. */
  background: rgba(20, 20, 48, 0.94);
  border: 1px solid var(--border-strong);
  border-radius: 100px;
  box-shadow:
          0 0 0 1px rgba(124, 77, 255, 0.18),
          0 24px 70px -20px rgba(124, 77, 255, 0.6);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.as-root .as-prompt-field:focus-within {
  background: rgba(24, 24, 56, 0.97);
  border-color: rgba(124, 77, 255, 0.6);
  box-shadow:
          0 0 0 1px rgba(124, 77, 255, 0.4),
          0 28px 80px -18px rgba(124, 77, 255, 0.75);
}

.as-root .as-prompt-input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: none;
  color: var(--text-1);
  font-family: var(--font-body);
  font-size: 17px; /* 16px minimum : évite le zoom auto sur iOS */
  padding: 17px 0;
}

.as-root .as-prompt-input::placeholder {
  color: var(--text-3);
}

.as-root .as-prompt-send {
  flex-shrink: 0;
  border: 0;
  cursor: pointer;
  padding: 15px 30px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  border-radius: 100px;
  background: linear-gradient(135deg, var(--brand-purple), var(--brand-blue));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
}

.as-root .as-prompt-send:hover {
  transform: translateY(-1px);
  box-shadow:
          0 8px 24px -6px rgba(124, 77, 255, 0.7),
          inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* Paramètres optionnels (langue cible, format, genre…). Partent dans la même
   requête GET que le prompt : toujours zéro JS. */
.as-root .as-params {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-top: 16px;
}

.as-root .as-param {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-3);
}

.as-root .as-param-select {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-1);
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 7px 12px;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.as-root .as-param-select:hover {
  background: var(--glass-strong);
  border-color: var(--border-strong);
}

/* Les <option> héritent du fond système : forcer un fond sombre lisible. */
.as-root .as-param-select option {
  background: var(--bg-1);
  color: var(--text-1);
}

/* Ligne d'aide sous le formulaire — porte notamment la mention explicite
   « le fichier se dépose dans l'app » pour les assistants à fichier. */
.as-root .as-input-hint {
  font-size: 14px;
  color: var(--text-2);
  margin: 18px 0 0;
}

.as-root .as-trust {
  font-size: 13px;
  color: var(--text-3);
  margin: 16px 0 0;
}

/* ========== SECTIONS ========== */

.as-root .as-section {
  margin: 0 0 64px;
}

.as-root .as-section > h2 {
  font-family: var(--font-display);
  font-size: clamp(22px, 3.4vw, 28px);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 0 0 24px;
}

.as-root .as-section h3 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 0 0 8px;
}

.as-root .as-section p {
  color: var(--text-2);
  margin: 0;
}

/* ── Exemples de prompts ─────────────────────────────────────────── */

.as-root .as-example-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.as-root .as-example-list a {
  display: inline-block;
  padding: 10px 18px;
  font-size: 14px;
  color: var(--text-2);
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 100px;
  transition: all 0.2s ease;
}

.as-root .as-example-list a:hover {
  color: var(--text-1);
  background: var(--glass-strong);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

/* ── Comment ça marche (vraie séquence) ──────────────────────────── */

.as-root .as-step-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 20px;
}

.as-root .as-step-list li {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.as-root .as-step-num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--brand-soft);
  background: var(--glass);
  border: 1px solid var(--border-strong);
  border-radius: 50%;
}

/* ── Cas d'usage ─────────────────────────────────────────────────── */

.as-root .as-cards {
  display: grid;
  gap: 16px;
}

.as-root .as-card {
  padding: 24px;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}

/* ── Pourquoi noov.ai ────────────────────────────────────────────── */

.as-root .as-why {
  padding: 28px;
  background:
          radial-gradient(ellipse at top left, rgba(0, 229, 255, 0.08), transparent 70%),
          var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}

.as-root .as-why > h2 {
  margin-bottom: 12px;
}

/* ── FAQ (encadrée, comme le blog) ───────────────────────────────── */

.as-root .as-faq {
  padding: 32px;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}

.as-root .as-faq-item {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}

.as-root .as-faq-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

/* ── Assistants liés (maillage interne) ──────────────────────────── */

.as-root .as-related-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.as-root .as-related-list a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  font-weight: 600;
  font-size: 15px;
  transition: all 0.2s ease;
}

.as-root .as-related-list a:hover {
  background: var(--glass-strong);
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.as-root .as-related-list img {
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  flex-shrink: 0;
}

/* ========== CTA FINAL ========== */

.as-root .as-cta {
  margin: 0;
  padding: 40px 32px;
  border-radius: var(--r-xl);
  background:
          radial-gradient(ellipse at top, rgba(124, 77, 255, 0.22), transparent 70%),
          var(--bg-1);
  border: 1px solid var(--border-strong);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.as-root .as-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(120deg, transparent, rgba(0, 229, 255, 0.06), transparent);
}

.as-root .as-cta-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 0 0 10px;
  position: relative;
}

.as-root .as-cta-text {
  color: var(--text-2);
  margin: 0 0 28px;
  position: relative;
}

.as-root .as-cta-actions {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.as-root .as-cta .lp-btn {
  padding: 14px 32px;
  font-size: 15px;
}

/* ========== HUB /{lang}/assistants ========== */

.as-root .as-main.is-index {
  max-width: 1000px;
}

.as-root .as-index-head {
  text-align: center;
  margin-bottom: 64px;
}

.as-root .as-index-head h1 {
  font-family: var(--font-display);
  font-size: clamp(32px, 6vw, 46px);
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -0.035em;
  margin: 0 0 16px;
  background: linear-gradient(135deg, #fff 0%, #bcd2ff 35%, #b79cff 65%, #ffb0dc 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.as-root .as-index-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.as-root .as-index-list a {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  height: 100%;
  padding: 18px;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  transition: all 0.2s ease;
}

/* Badge de catégorie : remplace le groupement par sections, trop de catégories
   n'ayant qu'un ou deux assistants. Placé SOUS la description et calé en bas de
   carte (margin-top: auto), pour que tous les badges s'alignent quelle que soit
   la longueur du texte. */
.as-root .as-index-cat {
  align-self: flex-start;
  margin-top: auto;
  padding: 3px 9px;
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-soft);
  background: rgba(124, 77, 255, 0.12);
  border: 1px solid rgba(124, 77, 255, 0.25);
  white-space: nowrap;
}

.as-root .as-index-list a:hover {
  background: var(--glass-strong);
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.as-root .as-index-list img {
  width: 44px;
  height: 44px;
  border-radius: var(--r-sm);
  flex-shrink: 0;
}

.as-root .as-index-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  flex: 1;
}

.as-root .as-index-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.015em;
}

.as-root .as-index-intro {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-2);
  margin-bottom: 4px;
  /* Le texte complet reste dans le HTML (utile aux moteurs) ; seul l'affichage
     est borné à deux lignes pour que les cartes gardent la même hauteur. */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}


/* ========== FOOTER ========== */

.as-root .as-footer {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--border);
  background: var(--bg-0);
  padding: 56px clamp(20px, 5vw, 40px) 32px;
}

.as-root .footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  text-align: center;
}

.as-root .footer-tagline {
  color: var(--text-3);
  font-size: 14px;
  margin: 8px 0 0;
}

.as-root .as-languages {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

.as-root .as-languages a {
  color: var(--text-3);
  font-size: 14px;
  transition: color 0.2s ease;
}

.as-root .as-languages a:hover {
  color: var(--text-1);
}

.as-root .as-languages a.is-current {
  color: var(--text-1);
  font-weight: 600;
}

.as-root .footer-bottom {
  width: 100%;
  border-top: 1px solid var(--border);
  padding-top: 24px;
  color: var(--text-3);
  font-size: 13px;
}

/* ========== RESPONSIVE ========== */

@media (min-width: 760px) {
  .as-root .as-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .as-root .as-related-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .as-root .as-index-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* À 3 colonnes, les cartes deviennent trop étroites pour une mise en page
   horizontale : l'icône passe au-dessus, centrée, et libère toute la largeur
   pour le texte. En 1 ou 2 colonnes, la disposition horizontale reste plus
   compacte et plus lisible. */
@media (min-width: 1000px) {
  .as-root .as-index-list {
    grid-template-columns: repeat(3, 1fr);
  }

  .as-root .as-index-list a {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    padding: 24px 20px;
  }

  .as-root .as-index-cat {
    align-self: center;
  }
}

@media (max-width: 640px) {
  .as-root .as-nav-bar {
    padding: 8px 8px 8px 16px;
  }

  .as-root .nav-links {
    display: none;
  }

  .as-root .as-main {
    padding-top: 100px;
  }

  /* La barre de prompt passe en colonne : le bouton reste atteignable
     au pouce sans réduire la zone de saisie. */
  .as-root .as-prompt-field {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 16px;
    border-radius: var(--r-lg);
  }

  .as-root .as-prompt-input {
    padding: 4px 4px 0;
  }

  .as-root .as-prompt-send {
    width: 100%;
  }
}

/* ========== MOTION ========== */

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

  .as-root .lp-btn:hover,
  .as-root .as-prompt-send:hover,
  .as-root .as-example-list a:hover,
  .as-root .as-related-list a:hover {
    transform: none;
  }
}
