/* ============================================================================
 * FrenchHive - Styles de mise en page du site (nav, hero, footer, produits).
 * S'appuie sur charte.css (tokens). ASCII only. 100% portable.
 * ==========================================================================*/

/* Garde-fou debordement horizontal (mobile). */
html, body { overflow-x: hidden; max-width: 100%; }

/* ----------------------------- Navigation ------------------------------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(135deg, var(--nav-bg-1), var(--nav-bg-2));
  color: var(--nav-fg);
  border-bottom: 1px solid rgba(255, 204, 0, 0.18);
}
.site-nav .container {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  height: 64px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--nav-fg); font-weight: 700; font-size: 1.15rem; letter-spacing: -0.01em; }
.brand:hover { color: var(--nav-fg); text-decoration: none; }
.brand .logo { width: 30px; height: 30px; }
.brand b { color: var(--hive); }

.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a {
  color: var(--nav-fg);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: .95rem;
  font-weight: 500;
}
.nav-links a:hover { background: rgba(255, 204, 0, 0.14); color: var(--hive-soft); text-decoration: none; }
.nav-links a.active { color: var(--hive); }

.nav-tools { display: inline-flex; gap: 6px; align-items: center; }
.nav-tools button {
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: var(--nav-fg);
  height: 34px;
  min-width: 38px;
  padding: 0 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: .9rem;
  font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center;
}
.nav-tools button:hover { background: rgba(255, 204, 0, 0.22); }

.nav-burger { display: none; }
@media (max-width: 860px) {
  .nav-links {
    position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--nav-bg-1);
    padding: 8px;
    border-bottom: 1px solid rgba(255,204,0,0.18);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-burger { display: inline-flex; }
}

/* ----------------------------- Hero ------------------------------------- */
.hero { padding: var(--space-6) 0 var(--space-5); position: relative; overflow: hidden; }
.hero .container { position: relative; z-index: 1; }
.hero .eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .78rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: var(--space-2);
}
.hero h1 { max-width: 18ch; }
.hero .grad { color: var(--primary); }
.hero .lead { margin-top: var(--space-2); margin-bottom: var(--space-3); }
.hero .cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin: var(--space-3) 0; }
.hero .trust { margin-top: var(--space-3); justify-content: flex-start; }

/* ----------------------------- Familles --------------------------------- */
.family-ico {
  width: 46px; height: 46px;
  border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary-light);
  color: var(--primary-dark);
  margin-bottom: var(--space-2);
}
[data-theme="dark"] .family-ico { color: var(--hive); }

/* ----------------------------- Produits --------------------------------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: var(--space-4); }
.filters button {
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 999px;
  padding: 7px 16px;
  cursor: pointer;
  font-size: .88rem;
  font-weight: 600;
}
.filters button.active { background: var(--accent-fill); color: var(--on-accent); border-color: var(--accent-fill); }

.product-card { display: flex; flex-direction: column; height: 100%; }
.product-card .fam { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); margin-bottom: 4px; }
.product-card h3 { margin: 0 0 6px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.product-card .tagline { font-size: .95rem; flex: 1; }
.product-card .feats { list-style: none; padding: 0; margin: 12px 0 0; font-size: .85rem; }
.product-card .feats li { padding-left: 18px; position: relative; margin-bottom: 4px; color: var(--text-muted); }
.product-card .feats li::before { content: ""; position: absolute; left: 0; top: 8px; width: 7px; height: 7px; background: var(--hive-deep); border-radius: 2px; transform: rotate(45deg); }

/* ----------------------------- Selecteur par secteur -------------------- */
.sector-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.sector-chips button {
  background: var(--card-bg); border: 1px solid var(--border); color: var(--text);
  border-radius: 999px; padding: 9px 18px; cursor: pointer; font-size: .92rem; font-weight: 600;
}
.sector-chips button.active { background: var(--accent-fill); color: var(--on-accent); border-color: var(--accent-fill); }
.sector-reco { text-align: center; color: var(--text-muted); margin: var(--space-3) 0; }
.sector-reco strong { color: var(--primary); }
.sector-mini { display: flex; flex-direction: column; }
.sector-mini h4 { margin: 0 0 6px; color: var(--primary); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sector-mini p { margin: 0; font-size: .9rem; }

/* ----------------------------- Cartes secteur (demos) ------------------- */
.sector-card { display: flex; flex-direction: column; }
.sector-card .driver { font-size: .8rem; margin: 2px 0 10px; }
.sector-card > p { flex: 1; font-size: .92rem; }
.sector-meta { font-size: .82rem; color: var(--text-muted); font-family: var(--font-mono); margin-bottom: 6px; }
.sector-count { font-size: .85rem; font-weight: 600; color: var(--primary); margin-bottom: 12px; }
.sector-card .btn { align-self: flex-start; }
.sector-cats { margin-top: 12px; border-top: 1px solid var(--border); padding-top: 10px; }
.sector-cats summary { cursor: pointer; font-size: .85rem; font-weight: 600; color: var(--text); }
.sector-cats ul { list-style: none; padding: 8px 0 0; margin: 0; }
.sector-cats li { display: flex; justify-content: space-between; padding: 4px 0; font-size: .82rem; color: var(--text-muted); border-bottom: 1px dashed var(--border); }
.sector-cats li b { color: var(--primary); }

/* ----------------------------- Bande de stats --------------------------- */
.stats-band {
  background: linear-gradient(135deg, var(--nav-bg-1), var(--nav-bg-2));
  color: var(--nav-fg);
  padding: var(--space-4) 0;
  border-top: 1px solid rgba(255,204,0,0.14);
  border-bottom: 1px solid rgba(255,204,0,0.14);
}
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-3); text-align: center; }
@media (max-width: 700px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat-n { font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 700; color: var(--hive); line-height: 1; font-variant-numeric: tabular-nums; }
.stat-l { font-size: .9rem; color: #cdc6b6; }

/* ----------------------------- Conformite ------------------------------- */
.comp-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-2);
  margin-top: var(--space-4);
}
@media (max-width: 860px) { .comp-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .comp-grid { grid-template-columns: 1fr; } }
.comp {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto;
  column-gap: 12px; align-items: center;
  background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px;
}
.comp-ico {
  grid-row: 1 / 3; width: 44px; height: 44px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary-light); color: var(--primary-dark);
}
[data-theme="dark"] .comp-ico { color: var(--hive); }
.comp b { align-self: end; font-size: 1.02rem; color: var(--text); }
.comp .comp-d { align-self: start; font-size: .85rem; color: var(--text-muted); }

/* ----------------------------- Visuel hero (produit creatif) ------------ */
.product-hero { margin: 0 0 var(--space-3); }
.product-hero img { width: 100%; height: auto; display: block; border-radius: 12px; border: 1px solid var(--border); box-shadow: 0 12px 32px var(--shadow-hover); }
.product-hero figcaption { margin-top: 8px; font-size: .82rem; color: var(--text-muted); text-align: center; }

/* ----------------------------- Cadre navigateur (screenshots) ----------- */
.browser-frame {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 12px 32px var(--shadow-hover);
  margin-bottom: var(--space-3);
  background: #0d0d0d;
}
.bf-bar {
  display: flex; gap: 7px; align-items: center;
  padding: 10px 14px; background: #15110a; border-bottom: 1px solid var(--border);
}
.bf-bar i { width: 11px; height: 11px; border-radius: 50%; background: #3a3a3a; }
.bf-bar i:first-child { background: var(--hive-deep); }
.bf-bar i:nth-child(2) { background: var(--hive); }
.browser-frame img { width: 100%; height: auto; display: block; }

/* ----------------------------- Diagrammes ------------------------------- */
.diagram-wrap {
  margin-top: var(--space-4);
  background: #0d0d0d;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  overflow-x: auto;
}
.diagram-wrap { max-width: 100%; }
.diagram-wrap img { width: 100%; min-width: 560px; height: auto; display: block; margin: 0 auto; }
@media (max-width: 520px) {
  .hero .cta-row { flex-direction: column; align-items: stretch; }
  .hero .cta-row .btn { justify-content: center; }
  .diagram-wrap img { min-width: 0; }
}

/* ----------------------------- Galerie IRIS ----------------------------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--space-2);
}
.gallery-grid figure {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 1 / 1;
  background: var(--bg-alt);
}
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.gallery-grid figure:hover img { transform: scale(1.06); }
.gallery-grid figure:first-child { grid-column: span 2; grid-row: span 2; aspect-ratio: 1 / 1; }
@media (max-width: 640px) { .gallery-grid figure:first-child { grid-column: span 1; grid-row: span 1; } }

/* ----------------------------- Formulaire ------------------------------- */
.form-field { margin-bottom: var(--space-3); }
.form-field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .92rem; }
.form-field input, .form-field textarea, .form-field select {
  width: 100%;
  background: var(--card-bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 13px;
  font-family: var(--font-sans);
  font-size: .98rem;
}
.form-field input:focus, .form-field textarea:focus, .form-field select:focus {
  outline: none; border-color: var(--hive); box-shadow: 0 0 0 3px var(--hive-glow);
}

/* ----------------------------- Footer ----------------------------------- */
.site-footer {
  background: linear-gradient(135deg, var(--nav-bg-1), var(--nav-bg-2));
  color: var(--nav-fg);
  padding: var(--space-5) 0 var(--space-3);
  margin-top: var(--space-6);
}
.site-footer a { color: var(--hive-soft); }
.site-footer a:hover { color: var(--hive); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: var(--space-3); }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-grid h4 { color: var(--hive); font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 12px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 8px; font-size: .9rem; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.10);
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  font-size: .82rem;
  color: #b9b2a4;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
}

/* ----------------------------- Page interne ----------------------------- */
.page-head { padding: var(--space-5) 0 var(--space-3); }
.breadcrumb { font-size: .85rem; color: var(--text-muted); margin-bottom: var(--space-2); }

/* Reveal au scroll (progressive enhancement) */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }
