/* ============================================================================
 * site-chrome.css — header et pied de page Lesly, SOURCE UNIQUE (cf. VERSION).
 *
 * Portée : UNIQUEMENT les sous-arbres <lesly-site-header> et <lesly-site-footer>
 * (plus le capteur et le bouton de rappel qu'ils créent). Aucune règle sur body,
 * html, main : le FOND appartient à l'hôte — le site garde son dégradé + ses
 * canvas étoilés (site-theme.css), l'application garde son dégradé simple.
 *
 * Valeurs = styles CALCULÉS relevés sur le rendu réel du site préparé (16/09,
 * Chromium, 1440×900 et 390×844), pas recopiées d'une feuille de base.
 * ========================================================================== */
lesly-site-header, lesly-site-footer { display: contents; }
/* L'hôte peut abaisser l'empilement (ex. application : sous ses modales et son Dock). */
:root { --lesly-chrome-z: 140; }

lesly-site-header .header,
lesly-site-footer .site-footer {
  box-sizing: border-box;
  color: #f8fafc;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
lesly-site-header *, lesly-site-footer * { box-sizing: border-box; }
lesly-site-header a, lesly-site-footer a { color: inherit; text-decoration: none; transition: color .2s; }

/* ── header ─────────────────────────────────────────────────────────────── */
lesly-site-header .header {
  position: fixed; inset: 0 0 auto; z-index: var(--lesly-chrome-z, 140);
  height: 94px; padding: 0 40px;
  display: flex; align-items: center; gap: 35px;
  background: rgba(30, 41, 59, .30);
  border-bottom: 1px solid rgba(96, 165, 250, .25);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  transition: transform .65s cubic-bezier(.22, 1, .36, 1), opacity .45s ease, box-shadow .45s ease;
  will-change: transform;
}
lesly-site-header.is-retracted .header {
  transform: translateY(calc(-100% + 8px)); opacity: .45;
  box-shadow: 0 1px 0 rgba(96, 165, 250, .3);
}
lesly-site-header.is-retracted .header:focus-within { transform: none; opacity: 1; }

.lesly-chrome-sensor { position: fixed; inset: 0 0 auto; height: 30px; z-index: calc(var(--lesly-chrome-z, 140) + 1); }
.lesly-chrome-reveal {
  position: fixed; left: 8px; top: 8px; z-index: calc(var(--lesly-chrome-z, 140) + 2);
  transform: translateY(-200%);
  padding: 8px 14px; border: 1px solid #6687ff; border-radius: 5px;
  background: #0f172a; color: #fff; font: inherit; font-size: 13px; cursor: pointer;
}
.lesly-chrome-reveal:focus-visible { transform: none; }

lesly-site-header .brand { display: flex; align-items: center; gap: 18px; flex-shrink: 0; }
lesly-site-header .dianalyse-logo { width: 58px; height: 74px; display: block; object-fit: contain; }

lesly-site-header nav { display: flex; gap: 28px; margin-left: auto; font-size: 14px; color: #c6ced9; }
lesly-site-header nav a:hover, lesly-site-header nav a:focus-visible { color: #8daaff; }

lesly-site-header .button {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 25px;
  background: linear-gradient(90deg, #3b82f6, #2563eb); color: #fff;
  padding: 11px 16px; border: 1px solid rgba(96, 165, 250, .45); border-radius: 8px;
  font-size: 13px; font-weight: 600; white-space: nowrap;
  box-shadow: 0 7px 24px rgba(59, 130, 246, .16);
  transition: background .2s, transform .2s, box-shadow .2s;
}
lesly-site-header .button:hover { background: linear-gradient(90deg, #2563eb, #1d4ed8); transform: translateY(-2px); box-shadow: 0 9px 30px rgba(59, 130, 246, .25); }
lesly-site-header .button span { font-size: 21px; font-weight: 400; }

lesly-site-header .account-access {
  display: inline-flex; align-items: center; gap: 9px; padding: 9px 12px; min-height: 44px; flex-shrink: 0;
  border: 1px solid rgba(147, 197, 253, .4); border-radius: 7px; color: #e5efff;
  background: rgba(147, 197, 253, .05); font-size: 14px; line-height: 1.3;
  transition: background .2s, border-color .2s;
}
lesly-site-header .account-access:hover { background: rgba(147, 197, 253, .14); border-color: #93c5fd; }
lesly-site-header .account-access svg { width: 21px; height: 21px; flex: none; }

lesly-site-header.no-marketing .account-access { margin-left: auto; }
lesly-site-header .menu {
  display: none; background: none; border: 1px solid rgba(71, 85, 105, .42); color: #fff;
  padding: 10px; font-size: 20px; cursor: pointer;
}

lesly-site-header :focus-visible, lesly-site-footer :focus-visible { outline: 2px solid #a9c3ff; outline-offset: 6px; }

/* ── pied de page ────────────────────────────────────────────────────────── */
lesly-site-footer .site-footer {
  position: relative; z-index: 5;
  width: calc(100% - 112px); max-width: 1320px; margin: auto;
  padding-top: 43px; padding-bottom: 25px;
}
lesly-site-footer .footer-main { display: flex; align-items: center; justify-content: space-between; gap: 30px; padding-bottom: 35px; }
lesly-site-footer .footer-main p { color: #bfcee2; font-size: 18px; line-height: 1.5; margin: 0; }
lesly-site-footer .text-link { font-size: 14px; line-height: 1.6; display: inline-block; color: #93c5fd; }
lesly-site-footer .footer-bottom {
  border-top: 1px solid rgba(125, 180, 255, .22); padding-top: 22px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 20px;
  color: #8491a5; font-size: 12px; line-height: 1.8;
}
lesly-site-footer .footer-socials { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
lesly-site-footer .footer-socials a { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; color: #b4c6e0; font-size: 14px; }
lesly-site-footer .footer-socials a:hover { color: #fff; }
lesly-site-footer .footer-socials svg { width: 23px; height: 23px; }
lesly-site-footer details { max-width: 390px; }
lesly-site-footer summary { cursor: pointer; color: #b4c6e0; }
lesly-site-footer details p { margin: .65rem 0 0; color: #8491a5; }
lesly-site-footer details p a { color: #93c5fd; }
lesly-site-footer .brand { display: flex; align-items: center; gap: 18px; flex-shrink: 0; }
lesly-site-footer .brand img { width: 100px; height: auto; object-fit: contain; }
lesly-site-footer .brand span { font-size: 10px; letter-spacing: .1em; max-width: 120px; line-height: 1.6; border-left: 1px solid #3c4551; padding-left: 18px; color: #b2bcca; }

/* ── responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 1150px) {
  lesly-site-header .header { padding-inline: 25px; gap: 20px; }
  lesly-site-header nav { gap: 18px; }
  lesly-site-header .button { font-size: 12px; }
}
@media (max-width: 800px) {
  lesly-site-header .header { height: 77px; gap: 14px; padding-inline: 22px; }
  lesly-site-header.is-retracted .header { transform: none; opacity: 1; box-shadow: none; }
  .lesly-chrome-sensor { display: none; }
  lesly-site-header .dianalyse-brand { width: 48px; }
  lesly-site-header .dianalyse-logo { width: 46px; height: 59px; }
  lesly-site-header .menu { display: block; }
  lesly-site-header nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    max-height: calc(100svh - 110px); overflow: auto; margin: 0; padding: 24px;
    background: rgba(15, 23, 42, .96); border-bottom: 1px solid rgba(147, 197, 253, .2);
    flex-direction: column; gap: 20px;
  }
  lesly-site-header nav.open { display: flex; }
  lesly-site-header .button { margin-left: auto; }
  lesly-site-footer .site-footer { width: calc(100% - 44px); }
  lesly-site-footer .footer-main { align-items: flex-start; flex-direction: column; }
  lesly-site-footer .footer-main p { display: none; }
}
@media (max-width: 420px) {
  lesly-site-header .header { gap: 9px; padding-inline: 15px; }
  lesly-site-header .button { font-size: 11px; gap: 9px; padding: 11px; }
  lesly-site-header .account-access { padding: 8px; gap: 7px; font-size: 13px; }
  lesly-site-header .account-access svg { width: 18px; height: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  lesly-site-header .header { transition: none; }
  lesly-site-header.is-retracted .header { transform: none; opacity: 1; box-shadow: none; }
  lesly-site-header .account-access, lesly-site-header .button { transition: none; }
  .lesly-chrome-sensor { display: none; }
}
