/* ============================================================
   Annei — Centre d'aide · help.annei.fr
   Feuille de style partagée (home + guides).
   Design inspiré du centre d'aide Meta (bleu Facebook).
   Source unique : éditer ici, jamais dupliquer dans une page.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue: #0866FF;
  --blue-light: #E7F3FF;
  --blue-mid: #1877F2;
  --blue-dark: #0757D8;
  --gray-bg: #F0F2F5;
  --border: #E4E6EA;
  --text: #1C1E21;
  --muted: #65676B;
  --green: #2D9653;
  --green-light: #E6F4EC;
  --orange: #D97706;
  --orange-light: #FFFBEB;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 8px rgba(0,0,0,0.06), 0 4px 20px rgba(0,0,0,0.03);
  --shadow-hover: 0 2px 12px rgba(0,0,0,0.10), 0 8px 32px rgba(0,0,0,0.06);
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --mono: 'SF Mono', 'Fira Code', ui-monospace, monospace;
}

body {
  font-family: var(--font);
  background: var(--gray-bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

a { color: inherit; }

/* Le padding du contenu guide est porté par .wrapper pour que le header
   topbar reste pleine largeur (sticky edge-to-edge). */

/* ============================================================
   HEADER COMMUN À TOUTES LES PAGES (même structure partout)
   ============================================================ */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 20px; background: #fff; border-bottom: 1px solid var(--border);
}
.topbar-logo { display: inline-flex; align-items: center; text-decoration: none; }
.topbar-logo img { height: 22px; width: auto; display: block; }
.topbar-label { font-size: 14px; font-weight: 600; color: var(--muted); text-decoration: none; transition: color .15s; }
.topbar-label:hover { color: var(--blue); }
@media (max-width: 480px) { .topbar { padding: 10px 16px; } }

/* ============================================================
   HOME — hero + liste de guides
   ============================================================ */
.hero {
  background: linear-gradient(135deg, #0866FF 0%, #1877F2 40%, #6C63FF 100%);
  padding: 3.5rem 1.5rem 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -60%; left: -20%;
  width: 140%; height: 200%;
  background: radial-gradient(ellipse at 30% 50%, rgba(255,255,255,0.08) 0%, transparent 60%);
  pointer-events: none;
}
.hero-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 24px;
  padding: 7px 16px;
  margin-bottom: 1.5rem;
  font-size: 13.5px;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
}
.hero-logo-dot {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
}
.hero-logo-img { height: 19px; width: auto; display: block; }
.hero-logo-sep { font-weight: 600; }

/* Barre de recherche de la home */
.hero-search { position: relative; max-width: 460px; margin: 1.75rem auto 0; }
.hero-search svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.hero-search input {
  width: 100%; border: none; border-radius: 12px;
  padding: 13px 16px 13px 44px; font-family: var(--font); font-size: 15px;
  color: var(--text); background: #fff; box-shadow: 0 6px 24px rgba(0,0,0,0.14); outline: none;
  -webkit-appearance: none; appearance: none;
}
.hero-search input::placeholder { color: var(--muted); }
.hero-search input:focus { box-shadow: 0 0 0 3px rgba(255,255,255,0.45), 0 6px 24px rgba(0,0,0,0.14); }
.no-results { text-align: center; color: var(--muted); font-size: 14px; padding: 1.5rem 0 2rem; }
.no-results a { color: var(--blue); }
.hero h1 {
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin-bottom: 10px;
  position: relative;
}
.hero p {
  font-size: 15px;
  color: rgba(255,255,255,0.8);
  max-width: 420px;
  margin: 0 auto;
  line-height: 1.65;
  position: relative;
}

.content {
  max-width: 660px;
  margin: -1.5rem auto 0;
  padding: 0 1rem 3rem;
  position: relative;
  z-index: 1;
}

.section-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 2rem 0 0.75rem 4px;
}
.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.guide-card {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  margin-bottom: 12px;
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  transition: box-shadow 0.2s, transform 0.15s, border-color 0.2s;
  cursor: pointer;
}
.guide-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-1px);
  border-color: #D0D4DA;
}
.guide-card:active { transform: translateY(0); }
.guide-icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.guide-icon.meta { background: #E7F3FF; }
.guide-icon.tracking { background: #FEF3C7; }
.guide-icon.google { background: #ECFDF5; }
.guide-icon.email { background: #F3E8FF; }
.guide-icon.generic { background: #F0F2F5; }
.guide-meta { flex: 1; min-width: 0; }
.guide-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.guide-title .new-tag {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--blue);
  color: #fff;
  padding: 2px 7px;
  border-radius: 4px;
  line-height: 1.4;
}
.guide-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.guide-arrow {
  color: #C4C7CC;
  font-size: 20px;
  flex-shrink: 0;
  transition: color 0.2s, transform 0.2s;
}
.guide-card:hover .guide-arrow {
  color: var(--blue);
  transform: translateX(3px);
}

/* Carte "bientôt disponible" */
.guide-card.soon {
  opacity: 0.55;
  cursor: default;
  pointer-events: none;
}
.guide-card.soon .guide-arrow { display: none; }
.soon-tag {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--muted);
  background: var(--gray-bg);
  padding: 2px 8px;
  border-radius: 4px;
  flex-shrink: 0;
}

/* ============================================================
   GUIDE — header + stepper + étapes
   ============================================================ */
.wrapper { max-width: 620px; margin: 0 auto; padding: 2.5rem 1rem 3rem; }

.back-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--muted); text-decoration: none;
  margin-bottom: 1.25rem; transition: color 0.15s;
}
.back-link:hover { color: var(--blue); }
.back-link svg { width: 14px; height: 14px; }

.header { text-align: center; margin-bottom: 2rem; }
.agency-tag {
  display: inline-flex; align-items: center; gap: 7px;
  background: #fff; border: 1px solid var(--border); border-radius: 20px;
  padding: 5px 14px 5px 8px; margin-bottom: 1.25rem;
  font-size: 13px; font-weight: 500; color: var(--muted); box-shadow: var(--shadow);
}
.agency-dot {
  width: 22px; height: 22px; border-radius: 50%; background: var(--blue);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 11px; font-weight: 700;
}
.page-guide h1 {
  font-size: 24px; font-weight: 700; color: var(--text);
  letter-spacing: -0.02em; line-height: 1.25; margin-bottom: 10px;
}
.subtitle {
  font-size: 14.5px; color: var(--muted);
  max-width: 440px; margin: 0 auto; line-height: 1.65;
}

/* Stepper (dots générés par stepper.js selon le nombre d'étapes) */
.dots { display: flex; align-items: center; justify-content: center; gap: 0; margin: 1.75rem 0; }
.dot-item { display: flex; align-items: center; gap: 0; }
.dot {
  width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--border);
  background: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600; color: var(--muted);
  transition: all 0.3s; position: relative; z-index: 1;
}
.dot.active { border-color: var(--blue); background: var(--blue); color: #fff; }
.dot.done { border-color: var(--green); background: var(--green); color: #fff; }
.dot-line { width: 48px; height: 2px; background: var(--border); transition: background 0.3s; }
.dot-line.done { background: var(--green); }

.step-card {
  background: #fff; border-radius: var(--radius); border: 1px solid var(--border);
  box-shadow: var(--shadow); margin-bottom: 12px; overflow: hidden;
}
.step-header {
  display: flex; align-items: flex-start; gap: 14px; padding: 18px 20px;
  cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent;
  transition: background 0.15s;
}
.step-header:hover { background: #F7F8FA; }
.step-badge {
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; flex-shrink: 0; margin-top: 1px; transition: all 0.2s;
}
.step-badge.pending { background: var(--blue-light); color: var(--blue); }
.step-badge.done-badge { background: var(--green-light); color: var(--green); }
.step-meta { flex: 1; }
.step-title { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 3px; }
.step-hint { font-size: 13px; color: var(--muted); }
.step-chevron {
  font-size: 20px; color: var(--muted); transition: transform 0.2s;
  flex-shrink: 0; margin-top: 6px; line-height: 1;
}
.step-chevron.open { transform: rotate(90deg); }
.step-body { display: none; border-top: 1px solid var(--border); padding: 20px; }
.step-body.open { display: block; }

.instruction { font-size: 14px; color: var(--muted); line-height: 1.7; margin-bottom: 14px; }
.instruction:last-child { margin-bottom: 0; }
.instruction strong { color: var(--text); font-weight: 600; }
.step-body ul, .step-body ol { margin: 0 0 14px 1.25rem; font-size: 14px; color: var(--muted); line-height: 1.7; }
.step-body li { margin-bottom: 4px; }
.step-body li strong { color: var(--text); font-weight: 600; }

.action-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--blue); color: #fff; text-decoration: none;
  font-size: 13.5px; font-weight: 600; padding: 10px 18px; border-radius: var(--radius-sm);
  transition: background 0.15s, transform 0.1s; margin-bottom: 14px;
}
.action-btn:hover { background: var(--blue-dark); }
.action-btn:active { transform: scale(0.98); }
.action-btn svg { width: 14px; height: 14px; flex-shrink: 0; }

.field-list { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; margin-bottom: 14px; }
.field-row { display: flex; gap: 12px; padding: 11px 14px; border-bottom: 1px solid var(--border); font-size: 13.5px; align-items: flex-start; }
.field-row:last-child { border-bottom: none; }
.field-label { color: var(--muted); min-width: 130px; flex-shrink: 0; font-size: 13px; }
.field-value { color: var(--text); font-weight: 500; }
.field-value.mono { font-family: var(--mono); font-size: 12.5px; background: var(--gray-bg); padding: 1px 6px; border-radius: 4px; color: var(--blue-mid); }

.callout { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: var(--radius-sm); font-size: 13px; line-height: 1.6; margin-top: 4px; margin-bottom: 14px; }
.callout:last-child { margin-bottom: 0; }
.callout.warn { background: var(--orange-light); color: #7A4800; border: 1px solid #FDE68A; }
.callout.info { background: var(--blue-light); color: #1A3A6B; border: 1px solid #C3DAFE; }
.callout.success { background: var(--green-light); color: #14532D; border: 1px solid #A7F3D0; }
.callout-icon { flex-shrink: 0; font-size: 15px; margin-top: 1px; }
.callout strong { font-weight: 600; }

.done-btn {
  width: 100%; padding: 11px; margin-top: 16px;
  border: 1.5px dashed var(--border); border-radius: var(--radius-sm);
  background: transparent; color: var(--muted); font-size: 13.5px; font-weight: 500;
  cursor: pointer; transition: all 0.2s;
  display: flex; align-items: center; justify-content: center; gap: 7px;
}
.done-btn:hover { border-color: var(--green); color: var(--green); background: var(--green-light); }
.done-btn.completed { border-color: var(--green); color: var(--green); background: var(--green-light); border-style: solid; }

.final-card { background: var(--blue); border-radius: var(--radius); padding: 24px; text-align: center; color: #fff; margin-top: 20px; }
.final-card h2 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.final-card p { font-size: 14px; opacity: 0.85; line-height: 1.6; margin-bottom: 16px; }
.final-email { display: inline-block; background: rgba(255,255,255,0.2); border: 1px solid rgba(255,255,255,0.35); border-radius: var(--radius-sm); padding: 8px 18px; font-size: 14.5px; font-weight: 600; letter-spacing: 0.01em; color: #fff; }
.final-note { font-size: 12.5px; opacity: 0.65; margin-top: 14px; }

/* ============================================================
   FOOTER (commun home + guide)
   ============================================================ */
.footer { text-align: center; padding: 1.5rem 1rem 2rem; font-size: 12.5px; color: var(--muted); }
.footer a { color: var(--muted); text-decoration: none; }
.footer a:hover { color: var(--text); }
.footer-sep { margin: 0 6px; opacity: 0.4; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 480px) {
  .hero { padding: 2.5rem 1.25rem 2.5rem; }
  .hero h1 { font-size: 23px; }
  .guide-card { padding: 14px 16px; gap: 12px; }
  .guide-icon { width: 40px; height: 40px; font-size: 19px; border-radius: 10px; }
  .field-label { min-width: 110px; }
}
