/* style.css — thème de base du tenant website_xanatapro.
   Variables de couleur pilotées par data-theme (clair par défaut, surcharge .dark).
   webby.js applique data-theme avant le paint (anti-flash) ; <themeSet/> bascule clair/sombre/auto. */

:root {
  --bg:        #ffffff;
  --surface:   #f5f6f8;
  --text:      #1c2230;
  --muted:     #5c6677;
  --border:    #e3e6ec;
  --brand:     #2b6cb0;
  --brand-ink: #ffffff;
  --max:       1080px;
  --radius:    14px;
  --shadow:    0 1px 3px rgba(20, 25, 40, .08), 0 8px 24px rgba(20, 25, 40, .06);
}

[data-theme="dark"] {
  --bg:        #11151c;
  --surface:   #1a2029;
  --text:      #e7ebf2;
  --muted:     #9aa6b6;
  --border:    #2a3340;
  --brand:     #5aa2e0;
  --brand-ink: #0c1117;
  --shadow:    0 1px 3px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
}

html { box-sizing: border-box; }
*, *::before, *::after { box-sizing: inherit; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Lien d'évitement (accessibilité) : masqué hors focus clavier. */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--brand);
  color: var(--brand-ink);
  padding: .6rem 1rem;
  border-radius: 0 0 var(--radius) 0;
  z-index: 100;
}
.skip-link:focus { left: 0; }

/* ---------- En-tête ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: .7rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 1.2rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  color: var(--text);
  font-weight: 700;
  font-size: 1.15rem;
}
.brand:hover { text-decoration: none; }
.brand-mark { color: var(--brand); display: inline-flex; }

.nav {
  display: flex;
  gap: 1.1rem;
  margin-left: auto;
  align-items: center;
  flex-wrap: wrap;
}
.nav a {
  color: var(--muted);
  font-weight: 500;
  padding: .25rem 0;
  border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--text); text-decoration: none; border-bottom-color: var(--brand); }

/* ---------- Contenu ---------- */
main {
  flex: 1 0 auto;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.5rem 1.2rem 3rem;
}

/* Habillage des cartes W3.CSS reprises de l'index, harmonisées au thème. */
main .w3-card,
main .w3-white {
  background: var(--surface) !important;
  color: var(--text) !important;
  border: 1px solid var(--border);
  box-shadow: var(--shadow) !important;
}
main .w3-text-grey { color: var(--muted) !important; }
main .w3-button.w3-black {
  background: var(--brand) !important;
  color: var(--brand-ink) !important;
}

/* ---------- Pied ---------- */
.site-footer {
  flex-shrink: 0;
  border-top: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.4rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: .92rem;
}

/* Liens légaux du pied de page. */
.footer-nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer-nav a {
  color: var(--muted);
  font-weight: 500;
}
.footer-nav a:hover { color: var(--text); text-decoration: none; }

@media (max-width: 640px) {
  .header-inner { flex-wrap: wrap; gap: .8rem; }
  .nav { width: 100%; margin-left: 0; }
}
