/* =========================================================================
   Homepage — sections orientées conversion
   Problèmes · Avant/Après · Portail modulaire · Sur-mesure · Réassurance ·
   À propos · FAQ. Réutilise les tokens et les patterns existants (.card,
   .section, .wrap, .reveal).
   ========================================================================= */

/* ---- Bandeau de repositionnement sous le hero (slim, centré) ---- */
.pitch { text-align: center; }
.pitch-lead {
  max-width: 1000px;
  margin: 0 auto;
  font-family: var(--font-subtitle);
  color: var(--text-muted);
  font-size: 1.12rem;
  line-height: 1.6;
  text-wrap: pretty;
}
.pitch-lead strong { color: var(--text); font-weight: 600; }
.trust-strip {
  display: block;
  margin: 22px auto 0;
  font-size: 0.85rem;
  color: var(--text-dim);
}
.trust-strip a { color: var(--text-muted); text-decoration: underline; text-underline-offset: 2px; }
.trust-strip a:hover { color: var(--text); }

/* ---- Problèmes rencontrés ---- */
.pain-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 28px;
}
.pain-item {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
  color: var(--text-muted);
}
.pain-item svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--accent-ink);
  margin-top: 1px;
}
.pain-item b { color: var(--text); font-weight: 600; }
.pain-foot {
  margin-top: 44px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  font-size: 1.1rem;
  color: var(--text);
  text-align: center;
  text-wrap: balance;
}

/* ---- Avant / Après : illustration chaos → pilotage ---- */
.ba-illustration {
  /* Tout l'illustré est désormais clair : plus de panneau sombre, les
     "fenêtres Excel" et le tableau de bord sont blancs, ombrés individuellement
     (filtre SVG #cardShadow) pour flotter sur le fond de page --bg-soft, comme
     n'importe quelle carte du site. */
  --panel: #ffffff;
  --panel-2: #eef2f7;
  --panel-line: #dbe2e9;
  --excel-ink: #ffffff;
  --excel-line: #c7ccd6;
  --violet: #274c77;
  --violet-deep: #6096ba;
  --violet-soft: #a3cef1;
  --green: #1e9e6b;
  --paper: #1c2b3a;
  --muted: #6b7680;
  max-width: 900px;
  margin: 0 auto;
}
.ba-illustration svg { display: block; width: 100%; height: auto; }
.ba-illustration .num { font-family: var(--font-head); font-weight: 600; }
.ba-illustration .lbl { font-family: var(--font); }

/* Flux de données : petits points qui glissent le long de trajectoires courbes
   (SVG natif <animateMotion>, pas de transform CSS par particule). */
@keyframes ba-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.ba-illustration .live-dot { animation: ba-pulse 2s ease-in-out infinite; }

/* Anneaux, courbe et point : se dessinent au premier passage à l'écran
   (déclenché par la classe .is-visible posée par l'observateur de scroll partagé, voir js/main.js) */
.ba-illustration .ring-arc { stroke-dasharray: 0 var(--circ); transition: stroke-dasharray 1.5s cubic-bezier(0.16, 1, 0.3, 1); }
.ba-illustration.is-visible .ring-arc { stroke-dasharray: var(--arc) var(--gap); }
.ba-illustration .growth-line { stroke-dasharray: 700; stroke-dashoffset: 700; transition: stroke-dashoffset 1.6s cubic-bezier(0.16, 1, 0.3, 1) 0.3s; }
.ba-illustration.is-visible .growth-line { stroke-dashoffset: 0; }
.ba-illustration .growth-fill { opacity: 0; transition: opacity 1s ease 0.9s; }
.ba-illustration.is-visible .growth-fill { opacity: 1; }
.ba-illustration .growth-dot {
  opacity: 0;
  transform: scale(0.4);
  transform-box: fill-box;
  transform-origin: center;
  transition: opacity 0.5s ease 1.7s, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 1.7s;
}
.ba-illustration.is-visible .growth-dot { opacity: 1; transform: scale(1); }

@media (prefers-reduced-motion: reduce) {
  .ba-illustration .flow-dot { opacity: 0; }
  .ba-illustration .live-dot { animation: none; }
  .ba-illustration .ring-arc,
  .ba-illustration .growth-line,
  .ba-illustration .growth-fill,
  .ba-illustration .growth-dot { transition: none; }
}

/* ---- Portail métier modulaire ---- */
.portail-panel {
  border: none;
  border-radius: var(--radius-lg);
  background: var(--bg-soft);
  box-shadow: var(--shadow-soft);
  padding: 40px;
}
.portail-panel > p { color: var(--text-muted); max-width: 640px; margin-bottom: 26px; }
.portail-modules {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.pmod {
  border: none;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft-sm);
  padding: 16px 16px 18px;
}
.pmod-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent-soft);
  box-shadow: var(--shadow-soft-sm);
  color: var(--accent-ink);
  margin-bottom: 12px;
}
.pmod-icon svg { width: 17px; height: 17px; }
.pmod h3 { font-size: 0.95rem; margin-bottom: 5px; }
.pmod p { font-size: 0.82rem; color: var(--text-dim); line-height: 1.45; }
.portail-foot {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  font-size: 0.95rem;
  color: var(--text);
}
.portail-foot span { color: var(--text-muted); }

/* ---- Pourquoi le sur-mesure (2 colonnes honnêtes) ---- */
.compare-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.compare-col {
  border: none;
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  padding: 28px 26px;
}
.compare-col h3 { font-size: 1.05rem; margin-bottom: 16px; }
.compare-col.is-fit h3 { color: var(--accent-ink); }
.compare-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.compare-col li {
  position: relative;
  padding-left: 22px;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--text-muted);
}
.compare-col li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 7px;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--accent);
}
.compare-col.is-standard li::before { background: var(--text-dim); border-radius: 50%; }
.compare-note {
  margin-top: 34px;
  text-align: center;
  font-size: 0.98rem;
  color: var(--text-muted);
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}
.compare-note b { color: var(--text); font-weight: 600; }

/* ---- Offres ---- */
.offer-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}
.offer-flow svg { width: 16px; height: 16px; color: var(--text-dim); flex-shrink: 0; }
.offer-flow-note {
  text-align: center;
  margin: 0 0 28px;
  font-size: 0.85rem;
  color: var(--text-dim);
}
.offer-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 10px;
}
/* ---- Références (préparé, désactivé tant qu'aucun client réel n'est cité — voir index.html) ---- */
.reference-card {
  background: var(--surface);
  border: none;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 26px;
}
.reference-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 14px;
}
.reference-card dl { display: grid; gap: 10px; margin: 0; }
.reference-card dt { font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-dim); }
.reference-card dd { margin: 2px 0 0; color: var(--text-muted); font-size: 0.92rem; line-height: 1.5; }
.reference-quote {
  margin: 18px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  color: var(--text);
  font-size: 0.95rem;
  font-style: italic;
}
.reference-foot { margin-top: 14px; display: flex; align-items: center; gap: 10px; }
.reference-who { font-size: 0.85rem; color: var(--text-dim); }
.reference-foot img { max-height: 24px; width: auto; opacity: 0.85; }
.offers-foot {
  margin-top: 24px;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: center;
}

/* ---- Q/R dépliables : Réassurance + FAQ ---- */
.qa-list { display: grid; gap: 10px; max-width: 760px; }
.qa {
  border: none;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft-sm);
  overflow: hidden;
}
.qa summary {
  list-style: none;
  cursor: pointer;
  padding: 17px 20px;
  font-size: 0.98rem;
  font-weight: 500;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after {
  content: "";
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-right: 1.6px solid var(--text-dim);
  border-bottom: 1.6px solid var(--text-dim);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}
.qa[open] summary::after { transform: rotate(225deg); }
.qa summary:hover { color: var(--accent); }
.qa-body { padding: 0 20px 18px; }
.qa-body p { color: var(--text-muted); font-size: 0.92rem; line-height: 1.6; }
.qa-body p + p { margin-top: 10px; }
.qa-body ul { list-style: none; margin: 10px 0; padding: 0; display: grid; gap: 8px; }
.qa-body li { position: relative; padding-left: 18px; color: var(--text-muted); font-size: 0.92rem; line-height: 1.5; }
.qa-body li::before { content: ""; position: absolute; left: 2px; top: 8px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.qa-body li b { color: var(--text); font-weight: 600; }

/* ---- À propos ---- */
.about-panel {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 40px;
  align-items: start;
  border: none;
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  padding: 36px;
}
.about-photo {
  aspect-ratio: 1;
  border-radius: var(--radius);
  border: 1px dashed var(--border-strong);
  background: var(--surface-strong);
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.78rem;
  padding: 16px;
}
.about-photo svg { width: 40px; height: 40px; margin-bottom: 8px; opacity: 0.6; }
.about-body h2 { margin-bottom: 8px; }
.about-role { color: var(--accent-ink); font-size: 0.9rem; font-weight: 500; margin-bottom: 16px; }
.about-body p { color: var(--text-muted); font-size: 0.95rem; }
.about-body p + p { margin-top: 12px; }
.about-meta {
  list-style: none;
  margin: 20px 0 0;
  padding: 18px 0 0;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 8px;
}
.about-meta li { font-size: 0.88rem; color: var(--text-muted); }
.about-meta b { color: var(--text); font-weight: 600; }
.about-links { margin-top: 18px; display: flex; gap: 14px; flex-wrap: wrap; }
.about-links a { font-size: 0.88rem; font-weight: 500; color: var(--accent-ink); }
.about-links a:hover { color: var(--accent); }

/* ---- Sous-navigation d'ancres (pages Approche) ---- */
.subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 18px 0 4px;
}
.subnav a {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 7px 14px;
  border: none;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow-soft-sm);
  transition: color 0.15s ease, box-shadow 0.3s var(--ease-soft), background 0.15s ease;
}
.subnav a:hover { color: var(--text); background: var(--surface-strong); box-shadow: var(--shadow-soft); }

/* ---- Teasers de la page d'accueil (renvoient vers les pages dédiées) ---- */
.teaser-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.teaser {
  border: none;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft-sm);
  padding: 22px 20px;
}
.teaser-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-soft);
  box-shadow: var(--shadow-soft-sm);
  color: var(--accent-ink);
  margin-bottom: 13px;
}
.teaser-icon svg { width: 18px; height: 18px; }
.teaser h3 { font-size: 0.98rem; margin-bottom: 6px; }
.teaser p { font-size: 0.86rem; color: var(--text-dim); line-height: 1.5; }
.teaser-link { text-decoration: underline; text-underline-offset: 2px; }
.section-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 26px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--accent-ink);
}
.section-cta::after { content: " \2192"; color: var(--accent); }
.section-cta:hover { color: var(--accent); }

/* ---- Bande « domaines » (défilement automatique de l'expertise sur l'accueil) ---- */
.xp-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  white-space: nowrap;
  padding: 16px 18px;
  border: none;
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-soft-sm);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  transition: box-shadow 0.3s var(--ease-soft), background 0.2s ease, transform 0.3s var(--ease-soft);
}
.xp-pill:hover {
  box-shadow: var(--shadow-soft);
  background: var(--surface-strong);
  transform: translateY(-4px);
}
.xp-pill .card-icon { flex-shrink: 0; width: 48px; height: 48px; border-radius: 12px; margin-bottom: 0; }
.xp-pill .card-icon svg { width: 23px; height: 23px; }

/* ---- Responsive ---- */
@media (max-width: 980px) {
  .teaser-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .pain-grid { grid-template-columns: 1fr; gap: 0; }
  .portail-modules { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about-panel { grid-template-columns: 1fr; gap: 24px; }
  .about-photo { max-width: 220px; }
}
@media (max-width: 520px) {
  .teaser-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .compare-grid { grid-template-columns: 1fr; }
  .portail-panel { padding: 28px 22px; }
}

/* ------------------------------------------------------------------ Espace pro
   Chrome minimal et volontairement distinct du site public (pas de mega-menu,
   pas de modale de contact) : cette zone se comporte comme une petite appli à
   part, pas comme une page marketing de plus. Son dossier n'est lié depuis
   aucune page publique — nom à ne partager qu'en privé avec les admins. */
.portal-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.portal-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 16px;
  padding: 18px 0;
}
@media (max-width: 640px) {
  .portal-header-inner { justify-content: center; text-align: center; }
  .portal-nav { order: 3; width: 100%; justify-content: center; }
  .portal-header-actions { order: 2; }
}
.portal-back { font-size: 0.88rem; color: var(--text-muted); }
.portal-back:hover { color: var(--accent-ink); }
.portal-header-actions { display: flex; align-items: center; gap: 14px; }
.portal-whoami { font-size: 0.85rem; color: var(--text-muted); }
.portal-wrap { max-width: 980px; margin: 0 auto; padding: 0 24px 90px; }
.portal-wrap-narrow { max-width: 560px; margin: 0 auto; padding: 0 24px 90px; }
.portal-footer { padding: 30px 0; text-align: center; color: var(--text-dim); font-size: 0.85rem; }

.portal-demo-notice code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--surface-strong);
  padding: 1px 6px;
  border-radius: 5px;
}
.portal-demo-notice ul { margin: 10px 0 0; padding-left: 20px; }
.portal-demo-notice li { margin-top: 4px; }

.portal-decision-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.portal-refusal-block { display: grid; gap: 6px; }
.portal-refusal-block label { font-size: 0.8rem; font-weight: 500; color: var(--text-muted); }
.portal-refusal-block textarea {
  font-family: var(--font-sans);
  font-size: 0.92rem;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  resize: vertical;
}

.status-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 999px;
}
.status-badge.is-ok { color: var(--ok); background: color-mix(in oklab, var(--ok) 14%, white); }
.status-badge.is-error { color: var(--danger); background: color-mix(in oklab, var(--danger) 12%, white); }

.portal-history-list { display: grid; gap: 10px; margin-bottom: 18px; }
.portal-history-empty { color: var(--text-dim); font-size: 0.9rem; }
.portal-history-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-soft-sm);
  font-size: 0.88rem;
}
.portal-history-who { color: var(--text-muted); }
.portal-history-date { margin-left: auto; color: var(--text-dim); font-size: 0.82rem; }

.portal-request-card { max-width: 620px; }
.portal-request-card .status-badge { margin-bottom: 12px; }
.portal-request-card h3 { margin-bottom: 10px; }
.portal-request-card p { margin-top: 6px; }

.portal-step { opacity: 0.6; }
.portal-step.is-done { opacity: 1; }
.portal-step.is-current {
  opacity: 1;
  box-shadow: 0 0 0 2px var(--accent-ink), var(--shadow-soft);
}
@media (max-width: 560px) {
  .portal-decision-row { flex-direction: column; }
  .portal-decision-row .btn { width: 100%; }
}

.portal-nav { display: flex; gap: 4px; }
.portal-nav a {
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 8px 14px;
  border-radius: 999px;
}
.portal-nav a:hover { color: var(--text); background: var(--surface-strong); }
.portal-nav a[aria-current="page"] { color: var(--accent-ink); background: var(--accent-soft); }

/* ------------------------------------------------------------------ Facturation */
.portal-invoice-lines { display: grid; gap: 10px; margin-bottom: 4px; }
.portal-invoice-line-row {
  display: grid;
  grid-template-columns: 1fr 160px auto;
  gap: 10px;
  align-items: center;
}
.portal-invoice-line-row input {
  font-family: var(--font-sans);
  font-size: 0.92rem;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
}
.portal-invoice-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 14px 4px;
  font-size: 1.1rem;
  border-top: 1px solid var(--border);
}
@media (max-width: 640px) {
  .portal-invoice-line-row { grid-template-columns: 1fr; }
}

.invoice-preview {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px;
  background: #fff;
  color: #16232f;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  font-family: var(--font-sans);
}
.invoice-head { display: flex; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.invoice-head p { margin: 2px 0; font-size: 0.88rem; color: #55636d; }
.invoice-meta { text-align: right; }
.invoice-meta h1 { font-size: 1.3rem; letter-spacing: 0.06em; margin-bottom: 10px; }
.invoice-meta p { font-size: 0.88rem; }
.invoice-client { margin-bottom: 24px; font-size: 0.92rem; line-height: 1.6; }
.invoice-table { width: 100%; border-collapse: collapse; margin-bottom: 18px; }
.invoice-table th, .invoice-table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid #e3edf5; font-size: 0.9rem; }
.invoice-table th:last-child, .invoice-table td:last-child { text-align: right; }
.invoice-total-row {
  display: flex;
  justify-content: flex-end;
  gap: 24px;
  font-size: 1.15rem;
  padding-top: 10px;
  border-top: 2px solid #16232f;
}

@media print {
  .no-print { display: none !important; }
  body { background: #fff; }
  .invoice-preview { box-shadow: none; margin: 0; max-width: none; }
}
