/**
 * style.css — QHSELAB ISO DESK (éco-conception)
 * Principes :
 * - Police système (zéro téléchargement)
 * - Couleurs via variables (maintenance facile)
 * - Layout responsive simple (grid/flex natifs)
 * - Animations minimales + respect prefers-reduced-motion
 */

/* ---------------------------
   Variables (thème)
--------------------------- */
:root{
  --bg: #f7f8fa;
  --surface: #ffffff;
  --text: #111827;
  --muted: #4b5563;
  --border: #e5e7eb;

  --primary: #0f766e;      /* vert/bleu sobre */
  --primary-contrast: #ffffff;

  --focus: #2563eb;

  --radius: 14px;
  --shadow: 0 6px 18px rgba(0,0,0,.06);

  --maxw: 1100px;
  --space: 16px;
}

@media (prefers-color-scheme: dark){
  :root{
    --bg: #0b1220;
    --surface: #0f172a;
    --text: #e5e7eb;
    --muted: #a1a1aa;
    --border: rgba(255,255,255,.10);

    --shadow: 0 10px 24px rgba(0,0,0,.35);
  }
}

/* ---------------------------
   Reset minimal
--------------------------- */
*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Liberation Sans", sans-serif;
  line-height: 1.55;
  background: var(--bg);
  color: var(--text);
}

img{ max-width:100%; height:auto; }
a{ color: inherit; }

/* Focus visible (accessibilité) */
:focus-visible{
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

/* Lien “skip” */
.skip-link{
  position:absolute;
  left:-999px;
  top:auto;
  width:1px;
  height:1px;
  overflow:hidden;
}
.skip-link:focus{
  left: 12px;
  top: 12px;
  width:auto;
  height:auto;
  padding:10px 12px;
  background: var(--surface);
  border:1px solid var(--border);
  border-radius: 10px;
  z-index: 999;
}

/* ---------------------------
   Layout utilitaires
--------------------------- */
.container{
  width: min(var(--maxw), calc(100% - 2*var(--space)));
  margin: 0 auto;
  padding: 18px 0 32px;
}

.flow > * + *{ margin-top: 16px; }

.row{ display:flex; align-items:center; }
.row--wrap{ flex-wrap:wrap; }
.gap{ gap: 10px; }

.grid{
  display:grid;
  gap: 16px;
}
.grid--3{
  grid-template-columns: 1fr;
}
@media (min-width: 900px){
  .grid--3{
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ---------------------------
   Composants
--------------------------- */
.card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}

/* Titres */
.h2{ font-size: 1.25rem; margin: 0 0 8px; }
.h3{ font-size: 1.05rem; margin: 0 0 6px; }

.muted{ color: var(--muted); }
.small{ font-size: .92rem; }

/* Boutons */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--primary);
  color: var(--primary-contrast);
  text-decoration:none;
  font-weight: 600;
}
.btn:hover{ filter: brightness(1.03); }
.btn:active{ transform: translateY(1px); }

.btn.secondary{
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn.tertiary{
  background: transparent;
  border-color: transparent;
  text-decoration: underline;
  text-underline-offset: 4px;
  padding: 10px 6px;
}

/* Lien simple */
.link{
  display:inline-block;
  margin-top: 8px;
  text-decoration: underline;
  text-underline-offset: 4px;
  color: var(--primary);
}

/* Listes */
.list{
  margin: 10px 0 0;
  padding-left: 18px;
}
.list li{ margin: 6px 0; }

/* ---------------------------
   Header / Navigation
--------------------------- */
.site-header{
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(8px);
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  border-bottom: 1px solid var(--border);
}

.site-header__inner{
  width: min(var(--maxw), calc(100% - 2*var(--space)));
  margin: 0 auto;
  padding: 10px 0;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
}

.brand{
  display:flex;
  align-items:center;
  gap: 10px;
  min-width: 220px;
}

.brand__logo{
  width: 34px;
  height: 34px;
}

.brand__title{
  display:flex;
  flex-direction:column;
  line-height: 1.1;
}
.brand__name{ font-weight: 800; letter-spacing: .2px; }
.brand__tagline{ font-size: .9rem; color: var(--muted); }

.nav{
  display:flex;
  gap: 10px;
  align-items:center;
  flex-wrap: wrap;
  justify-content:flex-end;
}

.nav a{
  text-decoration:none;
  padding: 8px 10px;
  border-radius: 999px;
}
.nav a:hover{
  background: color-mix(in srgb, var(--surface) 70%, transparent);
}

/* ---------------------------
   Hero
--------------------------- */
.hero{
  display:grid;
  gap: 16px;
}
@media (min-width: 900px){
  .hero{
    grid-template-columns: 1.2fr .8fr;
    align-items: start;
  }
}
.hero__title{
  margin: 0 0 6px;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
}
.hero__subtitle{
  margin: 0;
  color: var(--muted);
}
.hero__cta{
  margin-top: 14px;
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
}

.hero__stats{
  display:grid;
  gap: 12px;
}
.kpi{
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: color-mix(in srgb, var(--surface) 85%, transparent);
}
.kpi__value{ font-weight: 800; }
.kpi__label{ color: var(--muted); font-size: .92rem; margin-top: 4px; }

/* ---------------------------
/* ---------------------------
   Footer
--------------------------- */
.site-footer{
  margin-top: 48px;
  padding: 32px 0 24px;
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.site-footer__inner{
  width: min(var(--maxw), calc(100% - 2*var(--space)));
  margin: 0 auto;

  display: grid;
  gap: 20px;
  text-align: center;
}

/* Desktop : footer structuré */
@media (min-width: 700px){
  .site-footer__inner{
    grid-template-columns: 2fr 1.5fr 1fr;
    text-align: left;
    align-items: start;
  }
}

/* Branding */
.footer-brand strong{
  font-weight: 800;
  letter-spacing: .2px;
}
.footer-brand p{
  margin-top: 6px;
  max-width: 420px;
}

/* Contact */
.footer-contact a{
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Copyright */
.footer-copy{
  font-size: .85rem;
  color: var(--muted);
}

/* ---------------------------
   Réduction de mouvement
--------------------------- */
@media (prefers-reduced-motion: reduce){
  *{ scroll-behavior:auto !important; }
  .btn:active{ transform:none; }
}
