body {
  font-family: "Hiragino Sans", "Yu Gothic", sans-serif;
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 16px;
  line-height: 1.7;
  color: #222;
}
.entete { display: flex; align-items: center; gap: 20px; margin: 0.4em 0 0.8em; }
.photo { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
h1 { font-size: 1.8rem; margin: 0; }
.en { color: #666; font-size: 0.9em; }
.cartes { list-style: none; padding: 0; display: grid; gap: 16px; }
.cartes a {
  display: flex; flex-direction: column; gap: 4px;
  padding: 16px 20px; border: 1px solid #ddd; border-radius: 12px;
  text-decoration: none; color: inherit; background: #fafafa;
}
.cartes a:hover { border-color: #1a5fd0; background: #f2f6ff; }
.carte {
  display: flex; flex-direction: column; gap: 4px;
  padding: 16px 20px; border: 1px solid #ddd; border-radius: 12px; background: #fafafa;
}
.liens { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.liens a {
  padding: 6px 14px; border: 1px solid #1a5fd0; border-radius: 999px;
  text-decoration: none; font-size: 0.95rem;
}
.liens a:hover { background: #1a5fd0; color: #fff; }
.cartes strong { color: #1a5fd0; font-size: 1.15rem; }
a { color: #1a5fd0; }
hr { margin: 2em 0 1em; border: none; border-top: 1px solid #ccc; }
address { font-style: normal; color: #555; }

/* Agent IA */
.entete h1 { flex: 1; }
.chat-bouton {
  display: flex; align-items: center; gap: 10px; flex-shrink: 0;
  padding: 6px 18px 6px 6px; border: none; border-radius: 999px;
  background: #1a5fd0; color: #fff; font: inherit; font-size: 0.85rem; line-height: 1.3;
  text-align: left; cursor: pointer; box-shadow: 0 4px 14px rgba(26, 95, 208, 0.35);
  animation: appel 2.4s ease-in-out infinite;
}
.chat-bouton strong { font-size: 1rem; }
.chat-bouton img { width: 52px; height: 52px; border-radius: 50%; background: #fff; object-fit: contain; }
.chat-bouton:hover { background: #154db0; animation: none; }
.chat-bouton[hidden] { display: none; }
@keyframes appel {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}
@media (max-width: 560px) {
  .entete { flex-wrap: wrap; }
}
.chat-panneau {
  position: fixed; right: 16px; bottom: 16px; z-index: 10;
  width: min(420px, calc(100vw - 32px)); height: min(600px, calc(100vh - 32px));
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid #ddd; border-radius: 16px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18); overflow: hidden;
}
.chat-panneau[hidden] { display: none; }
.chat-entete {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px; background: #1a5fd0; color: #fff;
}
.chat-entete div { flex: 1; display: flex; flex-direction: column; line-height: 1.3; }
.chat-avatar { width: 44px; height: 44px; margin-right: 10px; border-radius: 50%; background: #fff; object-fit: contain; }
.chat-entete .en { color: #dce6ff; font-size: 0.8rem; }
.chat-fermer { border: none; background: none; color: #fff; font-size: 1.6rem; cursor: pointer; }
.chat-messages { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.chat-msg { margin: 0; padding: 8px 12px; border-radius: 12px; max-width: 85%; white-space: pre-wrap; font-size: 0.92rem; }
.chat-assistant { background: #f0f2f5; align-self: flex-start; }
.chat-user { background: #1a5fd0; color: #fff; align-self: flex-end; }
.chat-attente { color: #888; }
.chat-formulaire { display: flex; gap: 8px; padding: 10px; border-top: 1px solid #eee; }
.chat-formulaire input { flex: 1; min-width: 0; padding: 8px 12px; border: 1px solid #ccc; border-radius: 999px; font: inherit; font-size: 16px; }
.chat-formulaire button {
  padding: 4px 14px; border: none; border-radius: 999px; background: #1a5fd0; color: #fff;
  font: inherit; font-size: 0.8rem; line-height: 1.1; cursor: pointer;
}
.chat-formulaire button span { font-size: 0.7rem; }
.chat-formulaire button:disabled { opacity: 0.5; }
