/* =====================================================================
   COMPONENTS — vitrine ultrafin.fr (M53)
   Nav, bandeau, hero, capture, bento, cartes flottantes, blocs, CTA,
   badges verts (6 emplacements fermés), FAQ, footer, placeholders.
   AUCUNE couleur brute ici : var(--...) exclusivement.
   ===================================================================== */

/* =========================== BANDEAU RÉFORME ========================= */
.reform-banner {
  background: var(--surface-2);
  padding: var(--sp-3) 0;
  font-size: var(--fs-small);
  text-align: center;
}
.reform-banner .container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
}

/* Emplacement vert n°3 : chip « Factur-X natif » du bandeau */
.chip-green {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  background: var(--green-badge-bg);
  color: var(--green-badge-text);
  border-radius: 999px;
  padding: 2px var(--sp-3);
  font-weight: 600;
  font-size: var(--fs-small);
  white-space: nowrap;
}
.chip-green::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green-badge-dot);
}

/* ================================ NAV ================================ */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg-page);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) ease-out;
}
.site-nav.nav-scrolled { border-bottom-color: var(--border-card); }

.nav-inner {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: var(--sp-6);
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  text-decoration: none;
  color: var(--text-1);
  font-weight: 700;
  font-size: var(--fs-h3);
}
/* Logo image basse résolution (PNG 150×112 Patron) : PETIT uniquement (~36px). */
.nav-logo img { display: block; width: auto; height: 36px; }

.nav-links {
  display: flex;
  gap: var(--sp-6);
  margin-left: var(--sp-4);
}
.nav-links a {
  color: var(--text-1);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--dur) ease-out;
}
.nav-links a:hover { color: var(--link-hover-on-light); }

.nav-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}
.nav-login {
  color: var(--text-1);
  text-decoration: none;
  font-weight: 500;
}
.nav-login:hover { color: var(--link-hover-on-light); }

.nav-burger {
  display: none;
  background: none;
  border: 1px solid var(--border-card);
  border-radius: var(--r-btn);
  padding: var(--sp-2);
  cursor: pointer;
  color: var(--text-1);
  min-width: 44px;
  min-height: 44px;
}

/* fermé par défaut : l'attribut hidden doit GAGNER sur le display:flex
   (sinon l'overlay plein écran masque toute la page — bug M53). */
.nav-mobile[hidden] { display: none; }

.nav-mobile {
  position: fixed;
  inset: var(--nav-h) 0 0 0;
  background: var(--bg-page);
  z-index: 40;
  padding: var(--sp-8) var(--gutter);
  display: flex;
  flex-direction: column;
  gap: var(--sp-6);
}
.nav-mobile a {
  color: var(--text-1);
  text-decoration: none;
  font-size: var(--fs-h3);
  font-weight: 600;
}

@media (max-width: 767px) {
  .nav-links, .nav-login { display: none; }
  .nav-burger { display: inline-flex; align-items: center; justify-content: center; }
  /* Le CTA « Essayer » reste visible (spec §2 mobile) sur UNE ligne :
     on masque le texte de marque (le logo-mark suffit) pour que
     logo + CTA + burger tiennent dès 360px sans retour à la ligne. */
  .nav-logo span { display: none; }
}

/* =========================== CTA DÉGRADÉ ============================= */
/* UN élément dégradé par viewport. Jamais de texte courant en dégradé. */
.btn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--cta-grad);
  color: var(--cta-text);
  font-size: var(--fs-cta);
  font-weight: var(--fw-cta);
  text-decoration: none;
  border: 0;
  border-radius: var(--r-btn);
  padding: 14px var(--sp-6);
  min-height: 44px;
  cursor: pointer;
  transition: filter var(--dur) ease-out, transform var(--dur) ease-out,
    box-shadow var(--dur) ease-out;
}
.btn-cta:hover {
  filter: brightness(0.94); /* la teinte du dégradé ne bouge JAMAIS */
  transform: translateY(-1px);
  box-shadow: var(--shadow-cta);
}
.btn-cta:active { transform: translateY(0); }

.btn-cta-nav { padding: 10px var(--sp-4); min-height: 44px; white-space: nowrap; }

/* Bouton SOLIDE (nav) : violet foncé à plat — le dégradé reste réservé
   à UN CTA par viewport (hero, carte tarif). Contraste blanc 6,79:1. */
.btn-solid {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--link-on-light);
  color: var(--cta-text);
  font-size: var(--fs-cta);
  font-weight: var(--fw-cta);
  text-decoration: none;
  border: 0;
  border-radius: var(--r-btn);
  cursor: pointer;
  transition: filter var(--dur) ease-out, transform var(--dur) ease-out;
}
.btn-solid:hover { filter: brightness(0.94); transform: translateY(-1px); }
.btn-solid:active { transform: translateY(0); }

@media (max-width: 767px) {
  .hero .btn-cta, .tarif-card .btn-cta {
    width: 100%;
    min-height: 52px;
  }
}

/* ================================ HERO =============================== */
.hero {
  /* pas de padding-bottom section : la capture à cheval gère le bas */
  padding-top: calc(var(--sp-section) + var(--sp-section-dark-extra));
  padding-bottom: calc(var(--sp-16) + var(--capture-overlap));
}
.hero-inner { max-width: 780px; }
.hero .lead { color: var(--text-2-dark); margin-top: var(--sp-4); }
.hero-cta-row { margin-top: var(--sp-8); display: flex; flex-direction: column; align-items: flex-start; gap: var(--sp-3); }
.hero-conditions {
  color: var(--text-2-dark);
  font-size: var(--fs-small);
}

/* Emplacement vert n°2 : micro-badge « Conforme Factur-X » sous le CTA */
.hero-microbadge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-small);
  color: rgba(255, 255, 255, 0.7);
}
.hero-microbadge .check { color: var(--green-on-dark); font-weight: 700; }

@media (max-width: 767px) {
  .hero { min-height: 88svh; display: flex; align-items: center; }
}

/* ======================= CAPTURE À CHEVAL ============================ */
.capture-section { padding-top: 0; padding-bottom: var(--sp-section); }
.capture-frame {
  margin-top: calc(-1 * var(--capture-overlap));
  background: var(--surface-card);
  border: 1px solid var(--border-card);
  border-radius: var(--r-capture);
  box-shadow: var(--shadow-capture);
  padding: var(--sp-6);
  position: relative;
}
@media (max-width: 767px) {
  .capture-frame { margin-top: 40px; }
}

.capture-label {
  font-size: var(--fs-eyebrow);
  color: var(--text-2);
  border-bottom: 1px solid var(--border-card);
  padding-bottom: var(--sp-3);
  margin-bottom: var(--sp-4);
  display: flex;
  justify-content: space-between;
  gap: var(--sp-4);
  flex-wrap: wrap;
}

.capture-table { width: 100%; border-collapse: collapse; font-size: var(--fs-small); }
.capture-table th {
  text-align: left;
  color: var(--text-2);
  font-weight: 600;
  padding: var(--sp-2) var(--sp-3);
  border-bottom: 1px solid var(--border-card);
}
.capture-table td {
  padding: var(--sp-2) var(--sp-3);
  border-bottom: 1px solid var(--border-card);
}
.capture-table tr:last-child td { border-bottom: 0; }
/* Cellule d'en-tête de LIGNE (th scope="row", audit td-has-header) :
   rendu strictement identique à l'ancien td (couleur héritée, graisse normale). */
.capture-table tbody th {
  color: inherit;
  font-weight: 400;
  text-align: left;
}
.capture-table tbody tr:last-child th { border-bottom: 0; }
.capture-table .amt { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Emplacement vert n°1 : montants ENCAISSÉS de la capture produit */
.amt-in { color: var(--green-on-light); font-weight: 600; }

.capture-ops { margin-top: var(--sp-4); }

@media (max-width: 767px) {
  .capture-scroll { overflow-x: auto; }
}

/* ========================= BENTO PHOTOS ============================== */
.bento { display: grid; gap: var(--sp-6); }
@media (min-width: 768px) {
  .bento { grid-template-columns: 2fr 1fr; }
  .bento .bento-tall { grid-row: span 2; }
}

.photo-slot {
  position: relative;
  border-radius: var(--r-card);
  overflow: hidden;
  min-height: 280px;
}
.bento-tall.photo-slot { min-height: 420px; }

/* Carte UI flottante (max UNE par photo) */
.float-card {
  position: absolute;
  left: var(--sp-6);
  bottom: var(--sp-6);
  right: auto;
  max-width: 320px;
  background: var(--card-float-bg);
  border: 1px solid var(--border-card);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-float);
  padding: var(--sp-4);
  font-size: var(--fs-small);
}
.float-card .fc-title { font-weight: 600; margin-bottom: 2px; }
.float-card .fc-line { color: var(--text-2); margin-bottom: var(--sp-2); }
.float-card .fc-amount {
  font-size: var(--fs-h3);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.float-card .fc-state { color: var(--text-2); margin-top: 2px; }

.bento-dark-tile {
  background: var(--bg-footer);
  color: var(--text-1-dark);
  border-radius: var(--r-card);
  padding: var(--sp-6);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--sp-2);
}
.bento-dark-tile .muted { color: var(--text-2-dark); }
/* Titre de la tuile support : p stylé comme un h3 (heading-order, pas un titre de section). */
.bento-dark-tile .bento-dark-title {
  font-size: var(--fs-h3);
  line-height: var(--lh-h3);
  font-weight: var(--fw-h3);
  max-width: none;
}

/* ===================== CARTES / BLOCS FONCTIONNELS =================== */
.card {
  background: var(--surface-card);
  border: 1px solid var(--border-card);
  border-radius: var(--r-card);
  padding: var(--sp-6);
  transition: border-color var(--dur) ease-out, transform var(--dur) ease-out;
}
.card:hover {
  border-color: var(--card-hover-border);
  transform: scale(1.01);
}

.feature-grid { display: grid; gap: var(--sp-6); margin-top: var(--sp-8); }
@media (min-width: 768px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) {
  .feature-grid { grid-template-columns: repeat(6, 1fr); }
  .feature-grid .card { grid-column: span 2; }
  .feature-grid .card:nth-child(4) { grid-column: 2 / span 2; }
}

.icon-flat {
  color: var(--accent); /* monochrome, à plat, trait 1.5, 24px */
  width: 24px; height: 24px;
  margin-bottom: var(--sp-3);
}
.card ul { margin: var(--sp-3) 0 0; padding: 0; list-style: none; }
.card ul li {
  position: relative;
  padding-left: var(--sp-6);
  margin-bottom: var(--sp-2);
  font-size: var(--fs-small);
  color: var(--text-2);
}
.card ul li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.card .mini-capture { margin-top: var(--sp-4); }

/* ====================== ÉTAPES « 10 MINUTES » ======================== */
.step-card { position: relative; }
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--cta-text);
  font-weight: 700;
  margin-bottom: var(--sp-3);
  font-variant-numeric: tabular-nums;
}

/* ============================ BLOC IA ================================ */
.ia-chat {
  background: var(--bg-footer);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--r-card);
  padding: var(--sp-6);
  max-width: 520px;
  font-size: var(--fs-small);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.ia-msg { color: var(--text-2-dark); }
.ia-msg strong { color: var(--text-1-dark); }

/* Emplacement vert n°4 : UN état « Rapprochement validé ✓ » (bloc IA) */
.ia-state-green { color: var(--green-on-dark); font-weight: 600; }

@media (min-width: 1024px) {
  .ia-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-12); align-items: center; }
}

/* Section g (accueil) = BLOC CONFIANCE : 3 garanties factuelles (décision Patron 07/08,
   Phase H). Aucune classe dédiée : .card + .grid-3 + .icon-flat (accent). */

/* Bande de confiance FINE sombre (ne compte pas comme section sombre).
   Sur l'accueil : bande d'IDENTITÉ (titre + clôture) ; sur /tarifs/ et /securite/ :
   3 .trust-band-item (pas de bloc confiance g sur ces pages, donc pas de doublon). */
.trust-band {
  background: var(--bg-footer);
  color: var(--text-1-dark);
  padding-block: var(--sp-8);
  --link: var(--link-on-dark);
  --focus-ring: var(--focus-ring-dark);
}
.trust-band .container {
  display: grid;
  gap: var(--sp-6);
}
@media (min-width: 768px) {
  .trust-band .container { grid-template-columns: repeat(3, 1fr); }
}
/* Ligne « entreprise française » (spec §3bis.2) en tête de bande, sur toute la largeur. */
.trust-band-title {
  grid-column: 1 / -1;
  margin: 0;
  font-weight: 600;
  color: var(--text-1-dark);
}
/* Phrase de clôture (accueil) — pleine largeur, ton discret. */
.trust-band-closing {
  grid-column: 1 / -1;
  margin: 0;
  max-width: none;
  font-size: var(--fs-small);
  color: var(--text-2-dark);
}
.trust-band-item {
  display: flex;
  gap: var(--sp-3);
  align-items: flex-start;
  font-size: var(--fs-small);
  color: var(--text-2-dark);
}
.trust-band-item .icon-flat {
  color: var(--link-on-dark);
  flex: 0 0 auto;
  margin-bottom: 0;
}

/* ========================== CARTE TARIF ============================== */
.tarif-card {
  max-width: 460px;
  margin-inline: auto;
  background: var(--surface-card);
  border: 1px solid var(--border-card);
  border-radius: var(--r-capture);
  box-shadow: var(--shadow-soft);
  padding: var(--sp-8);
}
.tarif-price-row { display: flex; align-items: baseline; gap: var(--sp-2); margin: var(--sp-4) 0 var(--sp-1); }
.tarif-price {
  font-size: var(--fs-h1);
  font-weight: 700;
  letter-spacing: var(--ls-h1);
  font-variant-numeric: tabular-nums;
}
.tarif-unit { color: var(--text-2); font-size: var(--fs-small); }
.tarif-ttc { color: var(--text-2); font-size: var(--fs-small); margin-bottom: var(--sp-4); }

/* Emplacement vert n°5 : badge unique « E-facturation incluse » */
.tarif-badge-green {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  background: var(--green-badge-bg);
  color: var(--green-badge-text);
  border-radius: 999px;
  padding: 2px var(--sp-3);
  font-size: var(--fs-small);
  font-weight: 600;
}
.tarif-badge-green::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green-badge-dot);
}

.tarif-card ul { margin: var(--sp-4) 0; padding: 0; list-style: none; }
.tarif-card ul li {
  position: relative;
  padding-left: var(--sp-6);
  margin-bottom: var(--sp-2);
}
/* toutes les coches de la carte tarif restent VIOLETTES */
.tarif-card ul li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}
.tarif-notes { font-size: var(--fs-small); color: var(--text-2); margin-top: var(--sp-4); }
.tarif-card .btn-cta { width: 100%; margin-top: var(--sp-4); }

/* ================================ FAQ ================================ */
.faq { max-width: 760px; margin-inline: auto; }
.faq details {
  border-bottom: 1px solid var(--border-card);
  padding: var(--sp-4) 0;
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: var(--fs-body);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-4);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  color: var(--accent);
  font-size: var(--fs-h3);
  font-weight: 400;
  transition: transform var(--dur) ease-out;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .faq-a { margin-top: var(--sp-3); color: var(--text-2); }

/* =============================== FOOTER ============================== */
.site-footer {
  background: var(--bg-footer);
  color: var(--text-2-dark);
  padding-block: var(--sp-16) var(--sp-8);
  font-size: var(--fs-small);
  --link: var(--link-on-dark);
  --focus-ring: var(--focus-ring-dark);
}
.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--sp-8);
  margin-bottom: var(--sp-8);
}
.footer-brand {
  color: var(--text-1-dark);
  font-weight: 700;
  font-size: var(--fs-h3);
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
}
.footer-brand img { display: block; width: 32px; height: 32px; }

/* Emplacement vert n°6 : pastille dispo 8px liseré blanc + « Réponse sous 2 h » */
.footer-dispo {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  color: var(--text-2-dark);
}
.footer-dispo::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green-on-dark);
  border: 1px solid var(--cta-text); /* liseré blanc 1px */
}

.footer-cols { display: grid; gap: var(--sp-8); margin-bottom: var(--sp-8); }
@media (min-width: 768px) { .footer-cols { grid-template-columns: repeat(3, 1fr); } }
.footer-cols h3 {
  font-size: var(--fs-eyebrow);
  text-transform: uppercase;
  letter-spacing: var(--ls-eyebrow);
  color: var(--text-1-dark);
  margin-bottom: var(--sp-3);
}
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: var(--sp-2); }
.footer-links a {
  color: var(--text-2-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color var(--dur) ease-out;
}
.footer-links a:hover { color: var(--link-on-dark); }

.footer-legal {
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  padding-top: var(--sp-6);
  color: var(--text-2-dark);
}
.footer-legal p { max-width: none; }
.footer-disclaimer { color: var(--text-1-dark); font-weight: 600; }

/* ========================= PLACEHOLDERS ASSETS ======================= */
/* Placeholder EXPLICITE : jamais un faux asset qui ressemble à du vrai. */
.ph {
  background: var(--surface-2);
  border: 1px dashed var(--card-hover-border);
  border-radius: var(--r-card);
  color: var(--text-2);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--sp-6);
  font-size: var(--fs-small);
  min-height: 120px;
  width: 100%;
  /* PAS de height:100% : dans une carte de grille (item étiré), 100 % se
     résout sur la hauteur TOTALE de la carte → le placeholder débordait
     sous la carte et chevauchait la rangée suivante (bug M53). Les slots
     photo n'en ont pas besoin (position:absolute; inset:0). */
}
.photo-slot .ph { position: absolute; inset: 0; border-radius: 0; }
/* Étiquette du placeholder en HAUT du slot : la carte flottante (en bas,
   fond 94 %) ne doit jamais chevaucher le texte du placeholder. */
.photo-slot .ph { align-items: flex-start; }
.ph-mini { min-height: 96px; padding: var(--sp-3); }

/* ==================== PAGES INTÉRIEURES (Phase B) ==================== */
/* Capture principale d'une page fonctionnalité (placeholder étiqueté). */
.ph-page {
  min-height: 320px;
  box-shadow: var(--shadow-soft);
}

/* Carte-lien « pages liées » : toute la carte est cliquable, texte
   NON souligné (le composant .card porte déjà l'affordance hover). */
a.card {
  display: block;
  text-decoration: none;
  color: var(--text-1);
}
a.card .small { color: var(--text-2); }
a.card .link-arrow { color: var(--link); font-weight: 600; }

/* Lien discret « en savoir plus » (cartes fonctionnelles de l'accueil). */
.card-more {
  display: inline-block;
  margin-top: var(--sp-3);
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--link);
  text-decoration: none;
}
.card-more:hover { color: var(--link-hover-on-light); }
/* Sur fond sombre, --link vaut déjà --link-on-dark ; le hover reste lisible. */
.section-dark .card-more:hover { color: var(--link-on-dark); }

/* CTA final de page (bloc centré, avant le footer). */
.page-cta { text-align: center; }
.page-cta .btn-cta { margin-top: var(--sp-4); }
.page-cta .cta-conditions {
  display: block;
  margin-top: var(--sp-3);
  color: var(--text-2);
  font-size: var(--fs-small);
}

/* ============== CORPS LONG : pages légales + articles blog =========== */
.longform { max-width: 760px; }
.longform h2 {
  font-size: var(--fs-h3);
  margin-top: var(--sp-12);
}
.longform h3 {
  font-size: var(--fs-body);
  margin-top: var(--sp-6);
}
.longform ul, .longform ol {
  margin: 0 0 var(--sp-4);
  padding-left: var(--sp-6);
}
.longform li { margin-bottom: var(--sp-2); }
.longform-meta {
  color: var(--text-2);
  font-size: var(--fs-small);
  margin-bottom: var(--sp-8);
}

/* Tableau légal (sous-traitants) : même famille que .capture-table. */
.legal-table-wrap { overflow-x: auto; }
.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-small);
  background: var(--surface-card);
  border: 1px solid var(--border-card);
  border-radius: var(--r-card);
}
.legal-table th {
  text-align: left;
  color: var(--text-2);
  font-weight: 600;
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--border-card);
}
.legal-table td {
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--border-card);
  vertical-align: top;
}
.legal-table tr:last-child td { border-bottom: 0; }

/* =========================== BLOG ==================================== */
.blog-list { display: grid; gap: var(--sp-6); max-width: 760px; }
.blog-card time {
  display: block;
  color: var(--text-2);
  font-size: var(--fs-small);
  margin-bottom: var(--sp-2);
}
.article-header time {
  color: var(--text-2);
  font-size: var(--fs-small);
}
