/* verify.css — Page de vérification publique — redesign complet              */
/* Les tokens --ih-* (.ih-btn, .ih-card, .ih-tag, .ih-muted, .hidden, etc.)  */
/* sont fournis par site.css                                                   */

/* ====================================================================
   BODY
   ==================================================================== */
.ih-body {
  font-family: var(--ih-sans);
  background: var(--ih-paper);
  color: var(--ih-ink);
}

/* ====================================================================
   HERO DARK
   ==================================================================== */
.vh-hero {
  position: relative;
  overflow: hidden;
  background: var(--ih-gradient-dark);
  padding: 7.5rem 1.5rem 5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Grille de points rose */
.vh-hero__dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(244, 12, 123, 0.20) 1px, transparent 1px);
  background-size: 26px 26px;
  pointer-events: none;
}

/* Glow central diffus */
.vh-hero__glow {
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 500px;
  background: radial-gradient(ellipse at center top,
    rgba(244, 12, 123, 0.22) 0%,
    rgba(158, 88, 164, 0.10) 45%,
    transparent 70%);
  pointer-events: none;
}

/* Texture de bruit */
.vh-hero__noise {
  position: absolute;
  inset: 0;
  background-image: var(--ih-noise);
  opacity: 0.35;
  pointer-events: none;
}

/* Conteneur centré */
.vh-hero__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 620px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.25rem;
}

/* ── Eyebrow ─────────────────────────────────────────── */
.vh-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 176, 203, 0.80);
  animation: fade-up 0.5s ease-out both;
}

.vh-eyebrow__dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ih-rose-vif);
  box-shadow: 0 0 8px 2px rgba(244, 12, 123, 0.65);
  animation: glow-pulse 2.4s ease-in-out infinite;
  flex-shrink: 0;
}

/* ── Titre H1 ────────────────────────────────────────── */
.vh-title {
  font-family: var(--ih-serif);
  font-size: clamp(2.6rem, 9vw, 4.8rem);
  font-weight: 400;
  line-height: 1.05;
  color: #ffffff;
  margin: 0;
  animation: fade-up 0.5s 0.1s ease-out both;
}

.vh-title__em {
  font-style: normal;
  background: var(--ih-gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

/* ── Sous-titre ──────────────────────────────────────── */
.vh-subtitle {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.48);
  max-width: 360px;
  line-height: 1.65;
  animation: fade-up 0.5s 0.2s ease-out both;
}

/* ====================================================================
   SEARCH CARD — verre dépoli sur fond sombre
   ==================================================================== */
.vh-card {
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1.25rem;
  padding: 1.5rem;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow:
    0 0 0 1px rgba(244, 12, 123, 0.08),
    0 16px 48px rgba(0, 0, 0, 0.35);
  animation: fade-up 0.5s 0.3s ease-out both;
  margin-top: 0.5rem;
}

/* ── Onglets ─────────────────────────────────────────── */
.vh-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
  margin-bottom: 1.25rem;
}

.vh-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  font-family: var(--ih-sans);
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.42);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  transition: color 0.18s, border-color 0.18s;
  white-space: nowrap;
}

.vh-tab:hover {
  color: rgba(255, 255, 255, 0.78);
}

/* verify.js applique inline: border-bottom-color, color, font-weight */
/* La transition CSS anime ces changements de style inline */

.vh-tab-icon {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

/* ── Rangée de saisie ────────────────────────────────── */
.vh-input-row {
  display: flex;
  gap: 0.7rem;
  align-items: stretch;
}

.vh-input-wrap {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
}

.vh-input-icon {
  position: absolute;
  left: 0.9rem;
  width: 17px;
  height: 17px;
  color: rgba(255, 255, 255, 0.30);
  pointer-events: none;
  flex-shrink: 0;
}

.vh-input {
  width: 100%;
  padding: 0.82rem 0.9rem 0.82rem 2.65rem;
  background: rgba(255, 255, 255, 0.07);
  border: 1.5px solid rgba(255, 255, 255, 0.13);
  border-radius: var(--ih-radius);
  font-family: monospace;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}

/* verify.js réinitialise fontFamily / textTransform sur mode titre/auteur */
.vh-input::placeholder {
  color: rgba(255, 255, 255, 0.25);
  font-family: monospace;
  letter-spacing: 0.1em;
  text-transform: none;
}

.vh-input:focus {
  border-color: var(--ih-rose-vif);
  background: rgba(244, 12, 123, 0.07);
  box-shadow: 0 0 0 3px rgba(244, 12, 123, 0.18);
}

/* ── Bouton Vérifier ─────────────────────────────────── */
.vh-btn-search {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.82rem 1.5rem;
  background: var(--ih-rose-vif);
  color: #fff;
  border: none;
  border-radius: var(--ih-radius);
  font-family: var(--ih-sans);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.18s, box-shadow 0.18s, transform 0.12s;
  letter-spacing: 0.01em;
}

.vh-btn-search:hover {
  background: #d10a68;
  box-shadow: var(--ih-shadow-glow);
}

.vh-btn-search:active {
  transform: scale(0.97);
}

.vh-btn-search__icon {
  width: 17px;
  height: 17px;
}

/* ====================================================================
   SECTION RÉSULTATS
   ==================================================================== */
.vh-results-section {
  min-height: 6rem;
  padding: 2.5rem 1.5rem 5rem;
}

.vh-results-inner {
  max-width: 620px;
  margin: 0 auto;
}

/* ── #search-result ──────────────────────────────────── */
#search-result:not(.hidden) {
  position: relative;
  animation: fade-up 0.35s ease-out;
}

/* Ligne scan rose qui défile une fois à chaque apparition du résultat   */
/* Fonctionne car display:none → visible recrée le contexte et relance   */
/* les animations CSS (comportement standard des navigateurs).            */
#search-result:not(.hidden)::before {
  content: '';
  display: block;
  height: 2px;
  border-radius: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--ih-rose-vif) 40%, var(--ih-rose-neon) 60%, transparent 100%);
  animation: ih-scan-line 1.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  margin-bottom: 1.25rem;
  opacity: 0;
}

@keyframes ih-scan-line {
  0%   { width: 0%;   opacity: 0; }
  15%  { opacity: 1; }
  65%  { width: 100%; opacity: 1; }
  100% { width: 100%; opacity: 0; }
}

/* Texte de chargement affiché par verify.js dans #search-result */
#search-result > p.ih-muted {
  text-align: center;
  padding: 2rem 1rem;
  animation: vh-loading-pulse 1.4s ease-in-out infinite;
}

@keyframes vh-loading-pulse {
  0%, 100% { opacity: 0.45; }
  50%       { opacity: 1; }
}

/* ── .ih-result — carte injectée par renderCertCard() ── */
.ih-result {
  background: #ffffff;
  border: 1px solid var(--ih-border);
  border-left: 4px solid var(--ih-rose-vif);
  border-radius: var(--ih-radius);
  padding: 1.5rem 1.5rem 1.5rem 1.35rem;
  box-shadow: var(--ih-shadow);
  animation: fade-up 0.4s ease-out;
}

/* Badge AUTHENTIQUE — overrride du style verify.css précédent */
.ih-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ih-rose-vif);
  background: rgba(244, 12, 123, 0.08);
  padding: 0.22rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(244, 12, 123, 0.22);
}

.ih-status--pending {
  color: var(--ih-rose-neon);
  background: rgba(158, 88, 164, 0.08);
  border-color: rgba(158, 88, 164, 0.22);
}

/* ── #search-results-list ──────────────────────────── */
#search-results-list:not(.hidden) {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  animation: fade-up 0.35s ease-out;
}

/* ── #search-error.vh-error ──────────────────────────*/
/* verify.js utilise .textContent → pas d'enfants HTML  */
/* L'icône est rendue via ::before CSS                  */
.vh-error {
  /* Styles actifs uniquement quand .hidden est absent */
}

.vh-error:not(.hidden) {
  position: relative;
  padding: 1.1rem 1.25rem 1.1rem 3.4rem;
  background: #fff5f9;
  border: 1px solid rgba(244, 12, 123, 0.18);
  border-left: 4px solid var(--ih-rose-vif);
  border-radius: var(--ih-radius);
  font-size: 0.88rem;
  line-height: 1.55;
  color: #6b1a43;
  animation: fade-up 0.3s ease-out;
}

.vh-error:not(.hidden)::before {
  content: '⚠';
  position: absolute;
  left: 1.05rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.1rem;
  color: var(--ih-rose-vif);
  line-height: 1;
}

/* Legacy .ih-error (conservé pour compat) */
.ih-error {
  background: #fde8f2;
  color: #8f1d5b;
  border-radius: var(--ih-radius);
  padding: 1rem;
}

/* ====================================================================
   CLASSES UTILITAIRES — attendues par renderCertCard() dans verify.js
   (Tailwind non chargé sur ce projet)
   ==================================================================== */
.text-xl  { font-size: 1.2rem;  line-height: 1.35; }
.font-bold { font-weight: 700; }
.text-xs  { font-size: 0.75rem; }
.mt-1     { margin-top: 0.25rem; }
.mt-2     { margin-top: 0.5rem; }

/* ====================================================================
   RESPONSIVE
   ==================================================================== */
@media (max-width: 540px) {
  .vh-hero {
    padding: 6.5rem 1rem 3.5rem;
  }

  .vh-card {
    padding: 1.25rem 1rem;
  }

  .vh-tab-icon {
    display: none;
  }

  .vh-tab {
    padding: 0.5rem 0.7rem;
    font-size: 0.76rem;
  }

  .vh-btn-search__label {
    display: none;
  }

  .vh-btn-search {
    padding: 0.82rem 1rem;
  }

  .vh-results-section {
    padding: 2rem 1rem 4rem;
  }

  .ih-result {
    padding: 1.1rem 1.1rem 1.1rem 1rem;
  }
}

/* ====================================================================
   LEGACY — nav/header (conservé pour compatibilité)
   ==================================================================== */
.ih-header {
  background: var(--ih-ink);
  color: #fff;
}

.ih-brand { letter-spacing: 0.12em; }

.ih-link       { color: var(--ih-rose-clair); }
.ih-link:hover { color: var(--ih-rose-vif); }

/* ====================================================================
   BOUTON DÉTAIL — carte de résultat (GAP 3)
   ==================================================================== */
.ih-detail-toggle {
  margin-top: 0.75rem;
  border-top: 1px solid var(--ih-border);
  padding-top: 0.65rem;
}

.ih-detail-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-size: 0.82rem;
  color: var(--ih-rose-vif);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: inherit;
}

.ih-detail-btn:hover { text-decoration: underline; }

.ih-detail-panel {
  margin-top: 0.5rem;
  background: var(--ih-paper);
  border: 1px solid var(--ih-border);
  border-radius: var(--ih-radius);
  padding: 0.75rem 1rem;
}
