:root {
  --encre: #1c2430;
  --encre-douce: #4a5568;
  --accent: #0e7490;
  --accent-fonce: #155e75;
  --fond: #faf9f6;
  --carte: #ffffff;
  --bordure: #e5e1d8;
  --chip: #f0ede6;
  --chip-texte: #33302a;
  --vert: #15803d;
  --rouge: #b91c1c;
  --violet: #6d28d9;
  --serif: Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--encre);
  background: var(--fond);
  line-height: 1.6;
}

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

.entete {
  background: var(--encre);
  color: #fff;
  border-bottom: 3px solid var(--accent);
}

.entete-interieur {
  max-width: 1000px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.logo {
  font-weight: 700;
  font-size: 1.25rem;
  color: #fff;
  letter-spacing: .5px;
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.logo .point { color: #67e8f9; }

.recherche {
  flex: 1;
  min-width: 220px;
  max-width: 480px;
  position: relative;
}

.recherche input {
  width: 100%;
  padding: 9px 14px;
  border-radius: 8px;
  border: 1px solid #334155;
  background: #0f172a;
  color: #fff;
  font-size: .95rem;
}

.recherche input::placeholder { color: #94a3b8; }
.recherche input:focus { outline: 2px solid #67e8f9; border-color: #67e8f9; }

.suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--bordure);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(0,0,0,.15);
  max-height: 320px;
  overflow-y: auto;
  z-index: 50;
  display: none;
}

.suggestions.visible { display: block; }

.suggestions a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  color: var(--encre);
  border-bottom: 1px solid #f1eee8;
}

.suggestions a:last-child { border-bottom: none; }
.suggestions a:hover { background: #f8f6f1; text-decoration: none; }

.suggestions .mot { font-weight: 600; }
.suggestions .cat { color: var(--encre-douce); font-size: .85rem; }

.conteneur {
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
}

.fil-ariane {
  font-size: .85rem;
  color: var(--encre-douce);
  margin: 8px 0 4px;
}

.titre-mot {
  font-family: var(--serif);
  font-size: 2.6rem;
  margin: 6px 0 0;
  line-height: 1.15;
}

.prononciation {
  color: var(--encre-douce);
  margin: 4px 0 16px;
  font-size: 1.05rem;
}

.badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 18px; }

.badge {
  font-size: .8rem;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--chip);
  color: var(--chip-texte);
  border: 1px solid var(--bordure);
}

.badge.categorie { background: var(--accent); color: #fff; border-color: var(--accent); }
.badge.registre { background: #fdf0e7; color: #9a3412; border-color: #f5d9c4; }
.badge.domaine { background: #eef2ff; color: #3730a3; border-color: #d4dcff; }
.badge.region { background: #ecfdf5; color: #065f46; border-color: #c6f0dd; }

.carte {
  background: var(--carte);
  border: 1px solid var(--bordure);
  border-radius: 12px;
  padding: 20px 24px;
  margin: 18px 0;
}

.carte h2 {
  font-size: 1.3rem;
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--fond);
  display: flex;
  align-items: center;
  gap: 8px;
}

.carte h2 .icone { font-size: 1.1rem; }

.sens { margin: 18px 0 26px; }

.sens:not(:last-child) { border-bottom: 1px dashed var(--bordure); padding-bottom: 18px; }

.sens h3 {
  font-family: var(--serif);
  font-size: 1.12rem;
  font-weight: 400;
  margin: 0 0 8px;
  line-height: 1.5;
}

.numero {
  color: var(--accent);
  font-weight: 700;
  font-family: var(--sans);
  margin-right: 4px;
}

.exemples { margin: 8px 0 12px; padding-left: 22px; color: var(--encre-douce); }

.exemples li { margin: 6px 0; font-style: italic; font-family: var(--serif); }

.source {
  display: block;
  font-style: normal;
  font-family: var(--sans);
  font-size: .8rem;
  color: #8a8373;
}

.bloc-relations { margin: 10px 0 4px; }

.bloc-relations .libelle {
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--encre-douce);
  font-weight: 600;
  margin-bottom: 6px;
}

.puces { display: flex; flex-wrap: wrap; gap: 8px; }

.puce {
  display: inline-block;
  padding: 5px 13px;
  border-radius: 999px;
  background: var(--chip);
  color: var(--chip-texte);
  font-size: .92rem;
  border: 1px solid transparent;
  transition: background .15s;
}

.puce:hover { background: #e4e0d5; text-decoration: none; }

.puce.synonyme { background: #ecfdf5; border-color: #c6f0dd; color: #065f46; }
.puce.synonyme:hover { background: #d6f6e6; }

.puce.quasi { background: #fefce8; border-color: #f5edb8; color: #713f12; }

.puce.antonyme { background: #fef2f2; border-color: #f7d4d4; color: #991b1b; }
.puce.antonyme:hover { background: #fbe3e3; }

.puce.lie { background: #eef2ff; border-color: #d4dcff; color: #3730a3; }

.puce .note {
  font-size: .72rem;
  color: #9a9382;
  font-style: italic;
}

.puce .tag {
  font-size: .68rem;
  background: rgba(0,0,0,.06);
  padding: 1px 7px;
  border-radius: 999px;
  margin-left: 6px;
}

.liste-simple { columns: 2; column-gap: 32px; margin: 0; padding-left: 20px; }
.liste-simple li { margin: 4px 0; break-inside: avoid; }
@media (max-width: 640px) { .liste-simple { columns: 1; } }

.thesaurus-sections { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }

.thesaurus-sections h3 {
  font-size: .95rem;
  margin: 0 0 8px;
  color: var(--accent-fonce);
}

.thesaurus-sections .puces { gap: 6px; }
.thesaurus-sections .puce { font-size: .85rem; padding: 4px 11px; }

.etymologie { font-family: var(--serif); font-style: italic; color: var(--encre-douce); }

.groupe-sens { margin: 14px 0 22px; }

.titre-section-ia {
  font-size: .95rem;
  font-weight: 600;
  color: var(--accent-fonce);
  margin: 16px 0 10px;
  padding-left: 12px;
  border-left: 3px solid var(--accent);
}

.groupe-sens:not(:last-of-type) { border-bottom: 1px dashed var(--bordure); padding-bottom: 14px; }

.titre-groupe {
  font-family: var(--serif);
  font-weight: 400;
  font-style: italic;
  font-size: 1rem;
  color: var(--accent-fonce);
  margin: 0 0 12px;
  padding-left: 12px;
  border-left: 3px solid var(--accent);
}

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

.entree {
  background: var(--fond);
  border: 1px solid var(--bordure);
  border-radius: 10px;
  padding: 10px 14px;
  break-inside: avoid;
}

.tete-entree { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }

.tete-entree a { font-weight: 600; font-size: 1.02rem; }

.tete-entree .mot-texte { font-weight: 600; font-size: 1.02rem; color: var(--encre); }

.def-synonyme {
  margin-top: 6px;
  font-size: .88rem;
  color: var(--encre-douce);
  line-height: 1.45;
}

.def-synonyme::before { content: "\2014\00a0"; color: #b3ab9b; }

.puce.lie { background: #f3f1fa; border-color: #ddd6f2; color: #4c3f91; }

@media (max-width: 640px) { .entrees { grid-template-columns: 1fr; } }

.mots-voisins { margin-top: 8px; }

.pied {
  margin-top: 40px;
  padding: 24px 20px 40px;
  background: var(--encre);
  color: #cbd5e1;
  font-size: .85rem;
}

.pied-interieur { max-width: 1000px; margin: 0 auto; }

.pied a { color: #67e8f9; }

.attribution {
  border: 1px solid #334155;
  border-radius: 10px;
  padding: 12px 16px;
  margin-top: 14px;
  line-height: 1.5;
}

.accueil-titre { font-family: var(--serif); font-size: 2.2rem; margin: 24px 0 8px; }

.nav-alphabet {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 18px 0;
}

.nav-alphabet a {
  display: inline-block;
  min-width: 34px;
  text-align: center;
  padding: 6px 8px;
  border: 1px solid var(--bordure);
  border-radius: 8px;
  background: var(--carte);
  font-weight: 600;
  font-size: .95rem;
}

.nav-alphabet a:hover { background: var(--chip); text-decoration: none; }
.nav-alphabet a.actif { background: var(--accent); color: #fff; border-color: var(--accent); }

.liste-mots {
  margin-top: 10px;
  line-height: 2.1;
  word-spacing: 2px;
}

.liste-mots a { font-size: .92rem; margin-right: 4px; }

.lien-lettre {
  display: inline-block;
  margin-top: 12px;
  font-weight: 600;
  font-size: .88rem;
}

.accueil-intro { color: var(--encre-douce); max-width: 720px; }

.grille-mots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
  margin: 24px 0;
}

.carte-mot {
  background: var(--carte);
  border: 1px solid var(--bordure);
  border-radius: 12px;
  padding: 16px 18px;
  transition: box-shadow .15s, transform .15s;
  display: block;
  color: var(--encre);
}

.carte-mot:hover {
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(28,36,48,.08);
  transform: translateY(-2px);
}

.carte-mot .mot { font-family: var(--serif); font-size: 1.25rem; font-weight: 700; }

.carte-mot .meta { color: var(--encre-douce); font-size: .85rem; margin-top: 4px; }

.carte-mot .apercu { margin-top: 10px; font-size: .88rem; color: var(--encre-douce); }
