/* ==========================================================================
   FOCUS Audit & Conseil — habillage commun : couleurs, barre de navigation,
   pied de page et barre de progression. Chargé par TOUTES les pages publiques,
   y compris prototype.html (qui ne charge pas css/focus.css ni Tailwind).
   La barre et le pied de page sont générés par scripts/build-nav.php.
   ========================================================================== */

:root {
  --f-emerald: #10b981;
  --f-emerald-600: #059669;
  --f-emerald-300: #6ee7b7;
  --f-blue: #3b82f6;
  --f-blue-600: #2563eb;
  --f-blue-300: #93c5fd;
  --f-ink: #0f172a;
  --f-ink-950: #020617;
  --f-ink-800: #1e293b;
  --f-muted: #64748b;
  --f-line: #e2e8f0;
  --f-soft: #f8fafc;
  --f-grad: linear-gradient(135deg, #10b981 0%, #3b82f6 100%);
  --f-radius: 1.5rem;
  --f-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --f-font: 'Plus Jakarta Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* Barre de progression de lecture */
.scroll-progress {
  position: fixed; top: 0; left: 0; z-index: 9999;
  width: 0; height: 3px;
  background: var(--f-grad);
  transition: width .1s linear;
}


/* ==========================================================================
   Barre de navigation (générée par scripts/build-nav.php)
   ========================================================================== */
.fnav { position: fixed; inset: 0 0 auto 0; z-index: 60; padding: .85rem 1rem 0; font-family: var(--f-font); pointer-events: none; transition: padding .4s var(--f-ease); }
.fnav *, .fnav *::before, .fnav *::after { box-sizing: border-box; }
.fnav :where(a) { text-decoration: none; }
.fnav :where(button) { font-family: inherit; color: inherit; border: 0; background: none; cursor: pointer; margin: 0; }
.fnav :where(img) { display: block; max-width: none; }
.fnav.is-scrolled { padding-top: .5rem; }

.fnav-bar {
  pointer-events: auto;
  max-width: 80rem; margin: 0 auto;
  display: flex; align-items: center; gap: 1rem;
  min-height: 4rem; padding: .5rem .55rem .5rem 1rem;
  border-radius: 1.4rem;
  background: rgba(11, 18, 32, .76);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1), 0 10px 40px -12px rgba(2, 6, 23, .45);
  backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px);
  transition: background-color .4s var(--f-ease), box-shadow .4s var(--f-ease);
}
.fnav.is-scrolled .fnav-bar { background: rgba(11, 18, 32, .86); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1), 0 18px 50px -14px rgba(2, 6, 23, .6); }

.fnav-brand { display: flex; align-items: center; gap: .7rem; flex: none; color: #fff; }
.fnav-brand img { width: 2.15rem; height: auto; }
.fnav-brand-text { display: flex; flex-direction: column; line-height: 1; }
.fnav-name { font-size: 1.08rem; font-weight: 800; letter-spacing: -.02em; color: #fff; }
.fnav-tag { margin-top: .3rem; font-size: .58rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--f-emerald-300); }

.fnav-links { display: none; align-items: center; gap: .15rem; margin: 0 auto; padding: .25rem; border-radius: 999px; background: rgba(255, 255, 255, .04); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); }
.fnav-link { position: relative; display: inline-flex; align-items: center; height: 2.3rem; padding: 0 .75rem; border-radius: 999px; font-size: .82rem; font-weight: 600; white-space: nowrap; color: rgba(255, 255, 255, .72); transition: color .25s, background-color .25s; }
.fnav-link:hover { color: #fff; background: rgba(255, 255, 255, .07); }
.fnav-link.is-active { color: #fff; background: rgba(255, 255, 255, .12); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }
.fnav-link.is-active::after { content: ""; position: absolute; left: 50%; bottom: .28rem; width: .3rem; height: .3rem; margin-left: -.15rem; border-radius: 999px; background: var(--f-emerald); }

.fnav-actions { display: none; align-items: center; gap: .45rem; flex: none; }
.fnav-btn { display: inline-flex; align-items: center; gap: .4rem; height: 2.75rem; padding: 0 1.1rem; border-radius: 999px; font-size: .82rem; font-weight: 700; white-space: nowrap; transition: background-color .25s, box-shadow .3s, transform .3s var(--f-ease); }
.fnav-btn svg { width: .95rem; height: .95rem; }
.fnav-btn-ghost { color: #fff; background: rgba(255, 255, 255, .07); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); }
.fnav-btn-ghost:hover { background: rgba(255, 255, 255, .13); }
.fnav-btn-ghost.is-active { box-shadow: inset 0 0 0 1px rgba(16, 185, 129, .7); }
.fnav-btn-primary { color: #fff; background: var(--f-grad); box-shadow: 0 8px 22px -8px rgba(16, 185, 129, .6), inset 0 1px 0 rgba(255, 255, 255, .25); }
.fnav-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 28px -8px rgba(59, 130, 246, .6), inset 0 1px 0 rgba(255, 255, 255, .25); }

/* Carte d'outil (menu mobile) */
.fnav-dd-item { display: flex; gap: .85rem; padding: .8rem .85rem; border-radius: .95rem; transition: background-color .2s; }
.fnav-dd-item:hover { background: rgba(255, 255, 255, .06); }
.fnav-dd-item.is-active { background: rgba(16, 185, 129, .1); }
.fnav-dd-ico { display: flex; align-items: center; justify-content: center; flex: none; width: 2.4rem; height: 2.4rem; border-radius: .75rem; color: var(--f-emerald-300); background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }
.fnav-dd-ico svg { width: 1.1rem; height: 1.1rem; }
.fnav-dd-t { display: block; font-size: .85rem; font-weight: 700; color: #fff; }
.fnav-dd-s { display: block; margin-top: .2rem; font-size: .75rem; line-height: 1.35; color: #94a3b8; }

/* Bouton menu mobile (burger → croix) */
.fnav-burger { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 2.9rem; height: 2.9rem; margin-left: auto; border-radius: 999px; background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); }
.fnav-burger span { position: absolute; width: 1.1rem; height: 2px; border-radius: 2px; background: #fff; transition: transform .35s var(--f-ease), opacity .2s; }
.fnav-burger span:nth-child(1) { transform: translateY(-4px); }
.fnav-burger span:nth-child(2) { transform: translateY(4px); }
.fnav-burger[aria-expanded="true"] span:nth-child(1) { transform: rotate(45deg); }
.fnav-burger[aria-expanded="true"] span:nth-child(2) { transform: rotate(-45deg); }

/* Panneau mobile */
.fnav-mobile {
  pointer-events: auto;
  max-width: 80rem; margin: .6rem auto 0;
  border-radius: 1.4rem; background: rgba(11, 18, 32, .97);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1), 0 24px 60px -16px rgba(2, 6, 23, .7);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  max-height: 0; overflow: hidden; opacity: 0;
  transition: max-height .45s var(--f-ease), opacity .3s;
}
.fnav-mobile.active { max-height: calc(100vh - 6.5rem); overflow-y: auto; opacity: 1; }
.fnav-mobile-inner { display: flex; flex-direction: column; gap: .2rem; padding: .75rem; }
.fnav-mlink { display: flex; align-items: center; justify-content: space-between; padding: .85rem 1rem; border-radius: .9rem; font-size: .95rem; font-weight: 600; color: rgba(255, 255, 255, .82); }
.fnav-mlink:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.fnav-mlink.is-active { color: #fff; background: rgba(16, 185, 129, .12); }
.fnav-mlink.is-active::after { content: ""; width: .4rem; height: .4rem; border-radius: 999px; background: var(--f-emerald); }
.fnav-msep { height: 1px; margin: .5rem .25rem; background: rgba(255, 255, 255, .08); }
.fnav-mtools { display: grid; gap: .5rem; }
.fnav-mtools .fnav-dd-item { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.fnav-mcta { display: flex; align-items: center; justify-content: center; margin-top: .5rem; height: 3rem; border-radius: 999px; font-size: .9rem; font-weight: 700; color: #fff; background: var(--f-grad); }

/* Menus déroulants Audit / Expertise */
.fnav-dd { position: relative; }
.fnav-dd-toggle { gap: .3rem; }
.fnav-dd-toggle svg { width: .85rem; height: .85rem; opacity: .7; transition: transform .3s var(--f-ease); }
.fnav-dd.is-open .fnav-dd-toggle, .fnav-dd:hover .fnav-dd-toggle { color: #fff; background: rgba(255, 255, 255, .07); }
.fnav-dd.is-open .fnav-dd-toggle svg { transform: rotate(180deg); }
.fnav-dd-panel {
  position: absolute; top: calc(100% + .75rem); left: 50%; width: 21rem; padding: .5rem;
  border-radius: 1.2rem; background: rgba(11, 18, 32, .97);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1), 0 24px 60px -16px rgba(2, 6, 23, .7);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  opacity: 0; visibility: hidden; transform: translate(-50%, -6px);
  transition: opacity .25s, transform .3s var(--f-ease), visibility .25s;
}
/* Pont invisible : le menu reste ouvert quand la souris descend vers le panneau */
.fnav-dd-panel::before { content: ""; position: absolute; left: 0; right: 0; top: -.85rem; height: .85rem; }
.fnav-dd.is-open .fnav-dd-panel { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
@media (hover: hover) {
  .fnav-dd:hover .fnav-dd-panel { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
  .fnav-dd:hover .fnav-dd-toggle svg { transform: rotate(180deg); }
}
.fnav-dd-all { display: flex; align-items: center; justify-content: space-between; margin-top: .35rem; padding: .75rem .85rem; border-top: 1px solid rgba(255, 255, 255, .08); font-size: .78rem; font-weight: 700; color: var(--f-emerald-300); }
.fnav-dd-all svg { width: .9rem; height: .9rem; }
.fnav-dd-all:hover { color: #fff; }

/* Bouton Simulateur : le plus visible de la barre */
@keyframes fnavSimGlow { 0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, .55), 0 10px 26px -8px rgba(59, 130, 246, .6); } 50% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0), 0 10px 26px -8px rgba(59, 130, 246, .6); } }
@keyframes fnavSimShine { 0%, 70% { left: -60%; } 100% { left: 130%; } }
.fnav-sim {
  position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: .45rem;
  height: 2.75rem; padding: 0 .6rem 0 1.05rem; border-radius: 999px;
  font-size: .84rem; font-weight: 800; color: #fff; white-space: nowrap;
  background: var(--f-grad); animation: fnavSimGlow 2.4s ease-in-out infinite;
  transition: transform .3s var(--f-ease);
}
.fnav-sim::after { content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .45), transparent); transform: skewX(-20deg); animation: fnavSimShine 3.2s ease-in-out infinite; }
.fnav-sim:hover { transform: translateY(-1px) scale(1.03); }
.fnav-sim svg { width: 1rem; height: 1rem; flex: none; }
.fnav-sim.is-active { box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .55); animation: none; }
.fnav-sim-badge { display: inline-flex; align-items: center; height: 1.4rem; padding: 0 .5rem; border-radius: 999px; font-size: .62rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #065f46; background: #fff; }
.fnav-sim--compact { height: 2.6rem; margin-left: auto; padding: 0 .95rem; font-size: .8rem; }
.fnav-sim--compact + .fnav-burger { margin-left: 0; }

/* Menu mobile : simulateur en tête, groupes Audit / Expertise dépliables */
.fnav-msim { display: flex; gap: .85rem; margin-bottom: .4rem; padding: .9rem; border-radius: 1rem; background: linear-gradient(135deg, rgba(16, 185, 129, .22), rgba(59, 130, 246, .22)); box-shadow: inset 0 0 0 1px rgba(110, 231, 183, .35); }
.fnav-msim .fnav-dd-ico { color: #fff; background: var(--f-grad); box-shadow: none; }
.fnav-msim .fnav-sim-badge { margin-left: .35rem; vertical-align: middle; }
.fnav-mgroup summary { list-style: none; cursor: pointer; }
.fnav-mgroup summary::-webkit-details-marker { display: none; }
.fnav-mgroup summary svg { width: 1rem; height: 1rem; opacity: .6; transition: transform .3s var(--f-ease); }
.fnav-mgroup[open] summary svg { transform: rotate(180deg); }
.fnav-mgroup .fnav-mlink.is-active::after { content: none; }
.fnav-mgroup-list { display: grid; gap: .15rem; padding: .15rem 0 .5rem .5rem; }

@media (max-width: 400px) {
  .fnav-brand-text { display: none; }
}
@media (min-width: 1180px) {
  .fnav-links, .fnav-actions { display: flex; }
  .fnav-burger, .fnav-mobile, .fnav-sim--compact { display: none; }
}
@media (min-width: 1180px) and (max-width: 1279px) {
  .fnav-link { padding: 0 .65rem; }
  .fnav-brand-text { display: none; }
}

/* ==========================================================================
   Pied de page (généré par scripts/build-nav.php)
   ========================================================================== */
.ffoot { position: relative; overflow: hidden; font-family: var(--f-font); color: #cbd5e1; background: #0b1220; }
.ffoot *, .ffoot *::before, .ffoot *::after { box-sizing: border-box; }
.ffoot :where(a) { text-decoration: none; color: inherit; }
.ffoot :where(p, ul, h5) { margin: 0; padding: 0; }
.ffoot :where(ul) { list-style: none; }
.ffoot :where(img) { display: block; max-width: 100%; }
.ffoot::before { content: ""; position: absolute; left: 50%; top: 0; width: min(1100px, 90%); height: 1px; transform: translateX(-50%); background: linear-gradient(90deg, transparent, rgba(16, 185, 129, .6), rgba(59, 130, 246, .6), transparent); }
.ffoot::after { content: ""; position: absolute; left: 50%; top: -260px; width: 700px; height: 420px; transform: translateX(-50%); background: radial-gradient(closest-side, rgba(16, 185, 129, .12), transparent); pointer-events: none; }
.ffoot-inner { position: relative; z-index: 1; max-width: 80rem; margin: 0 auto; padding: 4.5rem 1rem 2rem; }
.ffoot-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.5rem 2rem; }
.ffoot-brand { grid-column: 1 / -1; max-width: 22rem; }
.ffoot-logo { display: flex; align-items: center; gap: .75rem; color: #fff; }
.ffoot-logo img { width: 2.6rem; height: auto; }
.ffoot-logo b { font-size: 1.25rem; font-weight: 800; letter-spacing: -.02em; }
.ffoot-logo small { display: block; margin-top: .3rem; font-size: .6rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--f-emerald-300); }
.ffoot-desc { margin-top: 1.1rem; font-size: .9rem; line-height: 1.65; color: #94a3b8; }
.ffoot-certs { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.ffoot-certs span { display: flex; align-items: center; justify-content: center; height: 3.6rem; padding: .45rem .7rem; border-radius: .9rem; background: #fff; }
.ffoot-certs img { height: 100%; width: auto; }
.ffoot h5 { margin-bottom: 1.1rem; font-size: .7rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: rgba(255, 255, 255, .55); }
.ffoot li + li { margin-top: .75rem; }
.ffoot-links a, .ffoot-links span { font-size: .9rem; color: #94a3b8; transition: color .2s; }
.ffoot-links a:hover { color: #fff; }
.ffoot-contact li { display: flex; gap: .6rem; font-size: .9rem; line-height: 1.5; color: #94a3b8; }
.ffoot-contact svg { flex: none; width: 1rem; height: 1rem; margin-top: .2rem; color: var(--f-emerald); }
.ffoot-bottom { display: flex; flex-direction: column; gap: 1.25rem; align-items: flex-start; margin-top: 3.5rem; padding-top: 1.75rem; border-top: 1px solid rgba(255, 255, 255, .08); }
.ffoot-copy { font-size: .82rem; color: #64748b; }
.ffoot-legal { display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; font-size: .82rem; color: #64748b; }
.ffoot-social { display: flex; gap: .5rem; }
.ffoot-social a { display: flex; align-items: center; justify-content: center; width: 2.4rem; height: 2.4rem; border-radius: .8rem; color: #94a3b8; background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); transition: color .2s, background-color .2s; }
.ffoot-social a:hover { color: #fff; background: rgba(16, 185, 129, .2); }
.ffoot-social svg { width: 1rem; height: 1rem; }
@media (min-width: 768px) {
  .ffoot-inner { padding: 5.5rem 2rem 2.25rem; }
  .ffoot-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .ffoot-bottom { flex-direction: row; align-items: center; justify-content: space-between; }
}
@media (min-width: 1024px) {
  .ffoot-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr 1.2fr; }
  .ffoot-brand { grid-column: auto; }
}

/* Mouvements réduits */
@media (prefers-reduced-motion: reduce) {
  .fnav, .fnav-bar, .fnav-mobile, .fnav-btn, .fnav-dd-panel { transition: none; }
  .fnav-sim, .fnav-sim::after { animation: none; }
}
