/* Thème du site public : en-tête et pied de page COMMUNS à toutes les pages
   publiques (voir seo-web/src/theme.js). Classes préfixées site-* pour ne
   jamais entrer en conflit avec le CSS propre à chaque page.
   Après modification : incrémenter VERSION_THEME dans seo-web/src/theme.js. */

.site-entete,
.site-pied {
  --site-orange: #ff6900;
  --site-orange-fonce: #c2410c;
  --site-encre: #0f172a;
  --site-gris: #475569;
  --site-ligne: #e2e8f0;
  --site-fond-doux: #f8fafc;
  font-family: "Sora", system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.5;
  box-sizing: border-box;
}
.site-entete *,
.site-pied * {
  box-sizing: border-box;
}

/* Jamais de barre de défilement horizontale (overflow-x: clip ne crée pas de
   conteneur de défilement : l'en-tête « sticky » continue de fonctionner).
   Barres de défilement discrètes, fines, sans fond. */
html {
  overflow-x: clip;
  scrollbar-width: thin;
  scrollbar-color: #c7ccd6 transparent;
}
html::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
html::-webkit-scrollbar-track {
  background: transparent;
}
html::-webkit-scrollbar-thumb {
  background: #c7ccd6;
  border-radius: 999px;
}
html::-webkit-scrollbar-thumb:hover {
  background: #a9b0bd;
}

/* Lien d'évitement (accessibilité) : hors écran, visible au clavier. */
.site-evitement {
  position: absolute;
  left: -9999px;
}
.site-evitement:focus {
  left: 1rem;
  top: 1rem;
  z-index: 2000;
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  background: #fff;
  color: #0f172a;
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}

/* ── En-tête ─────────────────────────────────────────── */
.site-entete {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: 64px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--site-ligne);
}
.site-entete__int {
  position: relative;
  max-width: 1200px;
  height: 100%;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
/* Partie droite : menu, bouton « Essai gratuit » (toujours visible) et burger. */
.site-entete__droite {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  margin-left: auto;
}
.site-entete .site-logo,
.site-pied .site-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  color: var(--site-encre);
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
}
.site-entete .site-logo img,
.site-pied .site-logo img {
  display: block;
  width: 32px;
  height: 32px;
  border-radius: 8px;
}
.site-entete .site-menu {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  background: none;
}
.site-entete .site-menu a {
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  color: var(--site-gris);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s, background 0.15s;
}
.site-entete .site-menu a:hover {
  color: var(--site-encre);
  background: var(--site-fond-doux);
}
.site-entete .site-menu a[aria-current="page"] {
  color: var(--site-orange-fonce);
  font-weight: 700;
}
.site-entete .site-menu__actions {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: 0.5rem;
}
/* « Essai gratuit » : toujours visible dans la barre, texte blanc. */
.site-entete .site-cta {
  flex: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  background: #c94f00;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s;
}
.site-entete .site-cta:hover {
  background: #a84200;
  color: #fff;
}
/* Groupe des boutons de la barre (centré sur mobile). */
.site-entete__boutons {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex: none;
}
/* « ZWS » : lien vers le site de l'éditeur, dans un nouvel onglet. */
.site-entete .site-zws {
  flex: none;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--site-ligne);
  border-radius: 8px;
  background: #fff;
  color: var(--site-encre);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s;
}
.site-entete .site-zws:hover {
  background: var(--site-fond-doux);
  border-color: #cbd5e1;
  color: var(--site-encre);
}
.site-entete .site-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 0.6rem;
  background: none;
  border: 0;
  cursor: pointer;
}
.site-entete .site-menu-btn span {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--site-encre);
}
.site-entete :focus-visible,
.site-pied :focus-visible {
  outline: 3px solid var(--site-orange);
  outline-offset: 2px;
}

/* Menu complet seulement quand il tient à l'écran (sinon « Essai gratuit »
   sortait de la page et créait un défilement horizontal). */
@media (max-width: 1080px) {
  .site-entete .site-menu-btn {
    display: flex;
  }
  .site-entete .site-menu {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    padding: 0.75rem 1.5rem 1rem;
    background: #fff;
    border-bottom: 1px solid var(--site-ligne);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  }
  .site-entete .site-menu.ouvert {
    display: flex;
  }
  .site-entete .site-menu a {
    padding: 0.7rem 0.75rem;
    font-size: 0.95rem;
  }
  .site-entete .site-menu__actions {
    flex-direction: column;
    align-items: stretch;
    margin: 0.35rem 0 0;
    padding-top: 0.5rem;
    border-top: 1px solid var(--site-ligne);
  }
  .site-entete .site-cta {
    padding: 0.5rem 0.85rem;
  }
}

/* Mobile : dans l'en-tête, seulement l'icône (le nom reste lu par les
   lecteurs d'écran : le lien garde son intitulé accessible).
   Les boutons « Essai gratuit » et « ZWS » sont centrés dans la barre. */
@media (max-width: 600px) {
  .site-entete__int {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.5rem;
  }
  .site-entete__droite {
    display: contents;
  }
  .site-entete .site-logo {
    grid-column: 1;
  }
  .site-entete .site-entete__boutons {
    grid-column: 2;
    justify-self: center;
  }
  .site-entete .site-menu-btn {
    grid-column: 3;
    justify-self: end;
  }
  .site-entete .site-logo__texte {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
  }
  .site-entete .site-logo img {
    width: 36px;
    height: 36px;
  }
}

/* ── Pied de page ────────────────────────────────────── */
.site-pied {
  margin: 0;
  padding: 3rem 1.5rem 2rem;
  background: var(--site-encre);
  color: #cbd5e1;
  font-size: 0.875rem;
  text-align: left;
}
.site-pied__int {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(150px, 1fr));
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.site-pied .site-logo {
  color: #fff;
}
.site-pied p {
  margin: 0.6rem 0 0;
  color: #cbd5e1;
  line-height: 1.6;
}
.site-pied .site-pied__titre {
  margin: 0 0 0.85rem;
  color: #94a3b8;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.site-pied ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.site-pied a {
  color: #e2e8f0;
  text-decoration: none;
}
.site-pied a:hover {
  color: #fff;
  text-decoration: underline;
}
/* Liens DANS UN TEXTE : soulignés, sinon ils ne sont identifiables que par la
   couleur (critère d'accessibilité 1.4.1). */
.site-pied__marque p a,
.site-pied__bas p a {
  text-decoration: underline;
  text-underline-offset: 2px;
}
.site-pied__bas {
   max-width: 1200px;
  margin: 0 auto;
  padding-top: 1.25rem;
  text-align: center;
}
.site-pied__bas p {
  margin: 0;
  color: #94a3b8;
  font-size: 0.8rem;
}

@media (max-width: 860px) {
  .site-pied__int {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .site-pied__marque {
    grid-column: 1 / -1;
  }
}
@media (max-width: 420px) {
  .site-pied__int {
    grid-template-columns: 1fr;
  }
}

/* ── Impression : pages imprimées sans en-tête ni pied du site ── */
@media print {
  .site-entete,
  .site-pied {
    display: none !important;
  }
}
