/* Les couleurs et la police relevées sur tbsprofrance.fr (thème AngarTheme) */
:root {
  --orange: #d37445;
  --orange-fonce: #b85f33;
  --bleu: #009ad0;
  --bleu-fonce: #007ba7;
  --texte: #282828;
  --gris: #4c5559;
  --fond: #f4f4f4;
  --ligne: #dadada;
  --blanc: #fff;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: Poppins, "Segoe UI", Arial, sans-serif; font-size: 15px; line-height: 1.65; color: var(--texte); background: var(--fond); }
a { color: var(--bleu); }
img { max-width: 100%; display: block; }
.cadre { max-width: 1200px; margin: 0 auto; padding-inline: 16px; }

/* En-tête, comme la boutique */
.haut { background: #f9f9f9; border-bottom: 1px solid #eee; font-size: 13px; }
.haut .cadre { display: flex; flex-wrap: wrap; gap: 4px 24px; padding-block: 8px; }
.haut a { color: var(--orange); text-decoration: none; }
.tete { background: var(--blanc); }
.tete .cadre { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 16px; }
.logo img { height: 84px; width: auto; }
.btn-boutique { background: var(--orange); color: var(--blanc); text-decoration: none; font-weight: 600; padding: 10px 18px; white-space: nowrap; }
.btn-boutique:hover { background: var(--orange-fonce); }
.menu { background: var(--orange); }
.menu .cadre { display: flex; flex-wrap: wrap; gap: 0 4px; }
.menu a { color: var(--blanc); text-decoration: none; text-transform: uppercase; font-weight: 600; font-size: 14px; padding: 12px 14px; }
.menu a:hover { background: var(--orange-fonce); }

/* Accueil des guides */
.accueil { padding-block: 32px 48px; }
.intro { background: var(--blanc); padding: 32px; border: 1px solid #eee; margin-bottom: 24px; }
.intro h1 { font-size: clamp(26px, 4vw, 36px); line-height: 1.2; margin: 4px 0 12px; }
.intro > p { max-width: 720px; color: var(--gris); margin: 0; }
.etiquette { color: var(--orange); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; margin: 0; }
.questions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.questions button { font: inherit; font-size: 14px; background: #eef8fc; color: var(--bleu-fonce); border: 1px solid #b9e2f1; padding: 8px 14px; cursor: pointer; text-align: left; }
.questions button:hover { background: #dff1f9; }
.liste-guides { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.carte-guide { background: var(--blanc); border: 1px solid #eee; box-shadow: 0 1px 4px rgba(0,0,0,.06); padding: 24px; text-decoration: none; color: var(--texte); display: flex; flex-direction: column; gap: 8px; transition: box-shadow .15s; }
.carte-guide:hover { box-shadow: 0 4px 16px rgba(0,0,0,.12); }
.carte-guide h2 { font-size: 19px; line-height: 1.3; margin: 0; }
.carte-guide p { color: var(--gris); margin: 0; font-size: 14px; flex: 1; }
.lire { color: var(--bleu); font-weight: 600; font-size: 14px; }

/* Un guide */
.guide { padding-block: 20px 48px; }
.fil { font-size: 13px; color: var(--gris); margin: 0 0 12px; }
.colonnes { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.texte { background: var(--blanc); border: 1px solid #eee; padding: clamp(20px, 4vw, 44px); }
.texte h1 { font-size: clamp(26px, 4vw, 34px); line-height: 1.2; margin: 6px 0 16px; }
.texte h2 { font-size: 22px; line-height: 1.3; margin: 36px 0 12px; scroll-margin-top: 16px; }
.texte h3 { font-size: 17px; margin: 24px 0 8px; }
.texte p, .texte li { max-width: 70ch; }
.chapo { font-size: 17px; color: var(--gris); }
.reponse { background: #eef8fc; border-left: 4px solid var(--bleu); padding: 4px 20px 8px; margin: 24px 0; }
.reponse h2 { margin-top: 14px; font-size: 18px; }
.astuce { background: #fdf3ee; border-left: 4px solid var(--orange); padding: 12px 16px; }
.tableau { overflow-x: auto; margin: 16px 0; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { border: 1px solid var(--ligne); padding: 9px 12px; text-align: left; vertical-align: top; }
thead th { background: var(--texte); color: var(--blanc); font-weight: 600; }
tbody tr:nth-child(even) td { background: #fafafa; }
details { border: 1px solid var(--ligne); margin: 8px 0; background: var(--blanc); }
summary { cursor: pointer; font-weight: 600; padding: 12px 16px; }
details p { margin: 0; padding: 0 16px 14px; }
.cote { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 16px; }
.bloc { background: var(--blanc); border: 1px solid #eee; padding: 18px 20px; font-size: 14px; }
.bloc-titre { font-weight: 600; text-transform: uppercase; font-size: 13px; color: var(--orange); margin: 0 0 8px; }
.bloc ol { margin: 0; padding-left: 18px; }
.bloc li { margin: 4px 0; }
.bloc a { color: var(--texte); text-decoration: none; }
.bloc a:hover { color: var(--bleu); }
.bloc-chat p { margin: 0 0 12px; color: var(--gris); }
.encart-chat { margin-top: 40px; background: #eef8fc; padding: 20px 24px; }
.encart-chat p { margin: 0 0 12px; }
.petit { font-size: 13px; color: var(--gris); }

/* Cartes produits, comme sur la boutique */
.grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; margin: 16px 0 8px; }
.produit { background: var(--blanc); box-shadow: 0 1px 5px rgba(0,0,0,.12); padding: 12px 12px 16px; text-align: center; display: flex; flex-direction: column; gap: 6px; }
.produit-img { display: block; aspect-ratio: 1; }
.produit-img img { width: 100%; height: 100%; object-fit: contain; }
.produit h4 { font-size: 13px; font-weight: 600; text-transform: uppercase; line-height: 1.35; margin: 4px 0 0; flex: 1; }
.produit h4 a { color: var(--texte); text-decoration: none; }
.prix { color: var(--bleu); font-weight: 600; font-size: 18px; margin: 0; }
.btn { display: inline-block; background: var(--bleu); color: var(--blanc); border: 0; font: inherit; font-size: 14px; padding: 8px 16px; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--bleu-fonce); }

.pied { background: var(--texte); color: #ddd; font-size: 13px; padding-block: 20px 88px; }
.pied p { margin: 4px 0; }
.pied .demo { color: #aaa; }

/* L'assistant */
.chat-bouton { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 20; background: var(--bleu); color: var(--blanc); border: 0; font: inherit; font-weight: 600; padding: 12px 18px; box-shadow: 0 4px 16px rgba(0,0,0,.25); cursor: pointer; text-align: left; line-height: 1.3; }
.chat-bouton span { display: block; font-weight: 400; font-size: 13px; opacity: .9; }
.chat-bouton:hover { background: var(--bleu-fonce); }
.chat { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 30; width: min(420px, calc(100vw - 32px)); height: min(620px, calc(100dvh - 32px)); background: var(--blanc); box-shadow: 0 8px 32px rgba(0,0,0,.3); display: flex; flex-direction: column; }
.chat[hidden] { display: none; }
.chat > header { background: var(--bleu); color: var(--blanc); padding: 12px 14px 12px 16px; display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.chat > header span { display: block; font-size: 12px; opacity: .9; line-height: 1.4; }
.chat-fermer { background: none; border: 0; color: var(--blanc); font-size: 26px; line-height: 1; cursor: pointer; padding: 0 4px; }
.chat-fil { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: #f7f7f7; }
.msg { max-width: 88%; padding: 10px 13px; font-size: 14px; line-height: 1.55; white-space: normal; overflow-wrap: anywhere; }
.msg p { margin: 0 0 6px; }
.msg p:last-child { margin: 0; }
.msg ul { margin: 4px 0; padding-left: 18px; }
.msg.client { align-self: flex-end; background: var(--bleu); color: var(--blanc); }
.msg.assistant { align-self: flex-start; background: var(--blanc); border: 1px solid #e6e6e6; }
.msg.attente { color: var(--gris); font-style: italic; }
.msg.erreur { border-color: var(--orange); }
.suggestions { display: flex; flex-direction: column; gap: 6px; }
.suggestions button { font: inherit; font-size: 13px; text-align: left; background: var(--blanc); border: 1px solid #b9e2f1; color: var(--bleu-fonce); padding: 8px 10px; cursor: pointer; }
.chat-saisie { display: flex; gap: 8px; padding: 10px; border-top: 1px solid #eee; }
.chat-saisie textarea { flex: 1; font: inherit; font-size: 14px; border: 1px solid var(--ligne); padding: 8px 10px; resize: none; max-height: 120px; }
.chat-saisie button { background: var(--orange); color: var(--blanc); border: 0; font: inherit; font-weight: 600; padding: 0 14px; cursor: pointer; }
.chat-saisie button:disabled { opacity: .5; cursor: default; }

@media (max-width: 900px) {
  .colonnes { grid-template-columns: 1fr; }
  .cote { position: static; }
  .bloc-chat { display: none; }
}
@media (max-width: 560px) {
  .logo img { height: 60px; }
  .menu a { padding: 10px 10px; font-size: 13px; }
  .intro { padding: 20px; }
  .liste-guides { grid-template-columns: 1fr; }
  .grille { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .prix { font-size: 16px; }
}
