:root {
  --fond: #f5f7fa;
  --carte: #ffffff;
  --texte: #1a2230;
  --doux: #5b6676;
  --bord: #dde3ea;
  --accent: #1f6feb;
  --accent-doux: #e7f0fe;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --fond: #0f141b;
    --carte: #171e27;
    --texte: #e6ebf1;
    --doux: #94a0b0;
    --bord: #273140;
    --accent: #58a6ff;
    --accent-doux: #16263b;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--fond);
  color: var(--texte);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.entete {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 24px clamp(16px, 4vw, 48px);
  border-bottom: 1px solid var(--bord);
  background: var(--carte);
}

.marque { display: flex; gap: 12px; align-items: center; }

.logo {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 20px;
}

h1 { margin: 0; font-size: 20px; }
.sous-titre { margin: 0; color: var(--doux); font-size: 13px; }

#recherche {
  flex: 1 1 240px;
  max-width: 360px;
  padding: 9px 12px;
  border: 1px solid var(--bord);
  border-radius: 8px;
  background: var(--fond);
  color: var(--texte);
  font: inherit;
}
#recherche:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

main {
  flex: 1;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px clamp(16px, 4vw, 48px);
}

.etat { color: var(--doux); text-align: center; margin: 48px 0; }

.grille {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.outil {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
  padding: 20px;
  border: 1px solid var(--bord);
  border-radius: 12px;
  background: var(--carte);
  color: inherit;
  text-decoration: none;
  transition: border-color .15s, transform .15s;
}
.outil:hover, .outil:focus-visible {
  border-color: var(--accent);
  transform: translateY(-2px);
  outline: none;
}

.outil-icone {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--accent-doux);
  color: var(--accent);
  font-weight: 700;
}
.outil-nom { margin: 0; font-size: 16px; font-weight: 600; }
.outil-desc { margin: 0; color: var(--doux); font-size: 14px; }

.pied {
  padding: 16px;
  text-align: center;
  color: var(--doux);
  font-size: 13px;
  border-top: 1px solid var(--bord);
}
