/* Amalia — pages publiques rendues serveur.
   Sobre et rassurant : sauge/vert doux sur fond chaud, contrastes AA,
   cibles tactiles >= 44px, focus visibles. */

:root {
  --fond: #faf9f6;
  --encre: #26332c;
  --encre-douce: #516058;
  --sauge-700: #2f6b4f;
  --sauge-800: #275842;
  --sauge-100: #e4efe8;
  --sauge-50: #f1f7f3;
  --ligne: #dde4de;
  --carte: #ffffff;
  --alerte-fond: #fdf3e7;
  --alerte-bord: #e8c9a0;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--fond);
  color: var(--encre);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  font-size: 1.0625rem;
}

.conteneur { max-width: 60rem; margin: 0 auto; padding: 0 1rem; }

a { color: var(--sauge-700); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid var(--sauge-700);
  outline-offset: 2px;
}

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--sauge-800); color: #fff; padding: 0.75rem 1rem; z-index: 10;
}
.skip-link:focus { left: 0; }

/* En-tête */
.site-header { background: var(--carte); border-bottom: 1px solid var(--ligne); }
.barre { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem; min-height: 4rem; }
.logo { font-size: 1.5rem; font-weight: 700; color: var(--sauge-800); text-decoration: none; letter-spacing: 0.02em; }
.site-header nav { display: flex; flex-wrap: wrap; gap: 0.25rem; align-items: center; }
.site-header nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 0.75rem;
  text-decoration: none; color: var(--encre); border-radius: 0.5rem;
}
.site-header nav a:hover { background: var(--sauge-50); }
.site-header nav a.cta { background: var(--sauge-700); color: #fff; font-weight: 600; }
.site-header nav a.cta:hover { background: var(--sauge-800); }

main { padding: 2rem 1rem 3rem; }

h1 { font-size: 1.9rem; line-height: 1.25; color: var(--sauge-800); }
h2 { font-size: 1.35rem; color: var(--sauge-800); }

/* Cartes */
.carte {
  background: var(--carte); border: 1px solid var(--ligne);
  border-radius: 0.75rem; padding: 1.25rem 1.5rem; margin: 1rem 0;
}
.etat-vide { text-align: center; padding: 2.5rem 1.5rem; }
.etat-vide p { color: var(--encre-douce); }

/* Formulaires */
form.recherche { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: flex-end; }
.champ { display: flex; flex-direction: column; gap: 0.25rem; flex: 1 1 14rem; }
label { font-weight: 600; font-size: 0.95rem; }
.indication { font-size: 0.85rem; color: var(--encre-douce); font-weight: 400; }
input, select {
  min-height: 44px; padding: 0.5rem 0.75rem; font-size: 1rem;
  border: 1px solid var(--ligne); border-radius: 0.5rem; background: #fff; color: var(--encre);
}
button, .bouton {
  min-height: 44px; padding: 0.6rem 1.25rem; font-size: 1rem; font-weight: 600;
  background: var(--sauge-700); color: #fff; border: 0; border-radius: 0.5rem;
  cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center;
}
button:hover, .bouton:hover { background: var(--sauge-800); }

/* Résultats de recherche */
.resultats { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: 1rem; }
.resultat { display: block; }
.resultat h3 { margin: 0 0 0.25rem; font-size: 1.2rem; }
.resultat h3 a { text-decoration: none; color: var(--sauge-800); }
.resultat h3 a:hover { text-decoration: underline; }
.resultat .lieu { color: var(--encre-douce); margin: 0.15rem 0; }
.badges { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.5rem; padding: 0; list-style: none; }
.badge {
  font-size: 0.85rem; padding: 0.2rem 0.6rem; border-radius: 999px;
  background: var(--sauge-100); color: var(--sauge-800);
}
.badge.verifie { background: var(--sauge-800); color: #fff; }

/* Fiche praticien */
.fiche-entete { display: flex; gap: 1.25rem; align-items: flex-start; flex-wrap: wrap; }
.fiche-entete .avatar {
  width: 6rem; height: 6rem; border-radius: 50%; background: var(--sauge-100);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; font-weight: 700; color: var(--sauge-800); flex: none;
  overflow: hidden;
}
.fiche-entete .avatar img { width: 100%; height: 100%; object-fit: cover; }
.headline { color: var(--encre-douce); margin-top: 0.1rem; }
dl.details { display: grid; grid-template-columns: max-content 1fr; gap: 0.4rem 1.25rem; margin: 0; }
dl.details dt { font-weight: 600; }
dl.details dd { margin: 0; }

/* Urgences — présent sur toutes les pages (décision §5) */
.urgences {
  background: var(--alerte-fond); border: 1px solid var(--alerte-bord);
  border-radius: 0.75rem; padding: 1rem 1.25rem; margin: 1.5rem 0;
}
.urgences p { margin: 0 0 0.4rem; }
.urgences ul { margin: 0; padding-left: 1.2rem; }
.urgences a { color: inherit; }

/* Pied de page */
.site-footer { background: var(--sauge-50); border-top: 1px solid var(--ligne); padding: 1.5rem 0 2rem; margin-top: 2rem; }
.footer-liens { color: var(--encre-douce); font-size: 0.95rem; }
.footer-liens p { margin: 0.3rem 0; }

/* Accessibilité mouvement */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
