/* Hot Milk Magazine : Compagnon (pastille, volet, encart, panneau). */
/* Pastille (revue du 12/10/2026, « on ne le voit pas bien ») : encre et sauge plutôt que rouge, qui se confondait avec
   les boutons du site ; avatar à étincelle, point rouge « en ligne », deux lignes ; un halo à l'arrivée, trois fois. */
.hmm-compagnon-pastille { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: inline-flex; align-items: center; gap: 12px; min-height: 60px; padding: 8px 22px 8px 8px; border-radius: 999px; background: var(--hm-encre, #16202b); color: #fff; text-decoration: none; box-shadow: 0 14px 34px rgba(22, 32, 43, 0.32), 0 0 0 1px rgba(255, 255, 255, 0.08) inset; transition: transform 0.2s, box-shadow 0.2s; }
.hmm-compagnon-pastille:hover, .hmm-compagnon-pastille:focus-visible { color: #fff; transform: translateY(-2px); box-shadow: 0 18px 40px rgba(22, 32, 43, 0.38); }
.hmm-compagnon-pastille:focus-visible { outline: 3px solid var(--hm-accent, #c4253a); outline-offset: 3px; }
.hmm-compagnon-pastille__avatar { position: relative; flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: #d9e4dc; color: #1f2f25; }
.hmm-compagnon-pastille__avatar i { position: absolute; top: 1px; right: 1px; width: 11px; height: 11px; border-radius: 50%; background: var(--hm-accent, #c4253a); box-shadow: 0 0 0 2px var(--hm-encre, #16202b); }
.hmm-compagnon-pastille__texte { display: flex; flex-direction: column; line-height: 1.2; }
.hmm-compagnon-pastille__texte b { font-weight: 700; font-size: 15px; }
.hmm-compagnon-pastille__texte small { font-size: 13px; color: rgba(255, 255, 255, 0.72); }
.hmm-compagnon-pastille::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; animation: hmm-compagnon-halo 2.4s ease-out 1.2s 3; }
@keyframes hmm-compagnon-halo { 0% { box-shadow: 0 0 0 0 rgba(196, 37, 58, 0.45); } 70%, 100% { box-shadow: 0 0 0 16px rgba(196, 37, 58, 0); } }
@media (max-width: 767px) { .hmm-compagnon-pastille { display: none; } }

/* L'invitation : une bulle de Compagnon au-dessus de la pastille (sur mobile, au-dessus de la barre du bas). */
.hmm-compagnon-invite { position: fixed; right: 20px; bottom: 96px; z-index: 61; width: min(330px, calc(100vw - 32px)); padding: 16px 18px 18px; border-radius: 18px 18px 6px 18px; background: #fff; color: var(--hm-encre, #16202b); box-shadow: 0 22px 50px rgba(22, 32, 43, 0.26), 0 0 0 1px rgba(31, 47, 37, 0.1); animation: hmm-compagnon-invite 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.hmm-compagnon-invite[hidden] { display: none; }
@keyframes hmm-compagnon-invite { from { opacity: 0; transform: translateY(12px) scale(0.97); } to { opacity: 1; transform: none; } }
.hmm-compagnon-invite__qui { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #34503f; }
.hmm-compagnon-invite__qui .hmm-compagnon-pastille__avatar { width: 28px; height: 28px; }
.hmm-compagnon-invite__texte { margin: 0 0 14px; font-size: 15px; line-height: 1.5; }
.hmm-compagnon-invite__btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px; background: var(--hm-accent, #c4253a); color: #fff; font-weight: 700; font-size: 15px; text-decoration: none; }
.hmm-compagnon-invite__btn:hover, .hmm-compagnon-invite__btn:focus-visible { background: var(--hm-accent-fonce, #9e1c2e); color: #fff; }
.hmm-compagnon-invite__fermer { position: absolute; top: 8px; right: 8px; display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: #55655a; cursor: pointer; }
.hmm-compagnon-invite__fermer:hover { background: #edf2ee; color: var(--hm-encre, #16202b); }
html.hmm-compagnon-ouvert .hmm-compagnon-invite, body.hm-pro .hmm-compagnon-invite { display: none; }
@media (max-width: 767px) { .hmm-compagnon-invite { right: 16px; bottom: calc(var(--hm-barre-h, 66px) + env(safe-area-inset-bottom, 0px) + 34px); border-radius: 18px 18px 18px 18px; } }
@media (prefers-reduced-motion: reduce) { .hmm-compagnon-pastille::after, .hmm-compagnon-invite { animation: none; } .hmm-compagnon-pastille { transition: none; } }

.hmm-compagnon-volet { position: fixed; right: 20px; bottom: 20px; z-index: 70; width: min(420px, calc(100vw - 40px)); height: min(680px, calc(100vh - 40px)); display: flex; flex-direction: column; background: var(--hm-surface, #fff); border-radius: var(--hm-rayon-3, 18px); box-shadow: var(--ombre-3, 0 24px 60px rgba(22, 32, 43, 0.3)); overflow: hidden; }
.hmm-compagnon-volet[hidden] { display: none; }
@media (max-width: 599px) { .hmm-compagnon-volet { right: 0; bottom: 0; width: 100vw; height: 100dvh; border-radius: 0; } }
.hmm-compagnon-volet__tete { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 18px; background: var(--hm-prune, #5b3a5e); color: #fff; }
.hmm-compagnon-volet__tete strong { flex: 1; }
.hmm-compagnon-volet__ouvrir { color: #fff; font-size: 13px; padding: 8px 4px; }
.hmm-compagnon-volet__fermer { width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.15); color: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.hmm-compagnon-volet__cadre { flex: 1; width: 100%; border: 0; background: #fff; }
html.hmm-compagnon-ouvert .hmm-compagnon-pastille { display: none; }
.hmm-compagnon-cadre { width: 100%; min-height: 480px; border: 0; border-radius: var(--hm-rayon-3, 18px); background: #fff; }

.hmm-compagnon-encart { margin: 40px 0; padding: 24px; border-radius: var(--hm-rayon-3, 18px); background: var(--hm-prune-pale, #ece3ee); color: var(--hm-encre, #16202b); }
.hmm-compagnon-encart__titre { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-weight: 700; font-size: 1.15em; color: var(--hm-prune-fonce, #3f2742); }
.hmm-compagnon-encart__texte { margin: 0 0 16px; }
.hmm-compagnon-encart__actions { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
/* Une action = une ligne cliquable : pastille d'icône, libellé + aide, flèche (revue UX du 11/10/2026) */
.hmm-compagnon-encart__action { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 10px 14px; border: 1px solid var(--hm-filet, rgba(91, 58, 94, 0.18)); border-radius: 14px; background: var(--hm-surface, #fff); color: var(--hm-encre, #16202b); text-decoration: none; transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s; }
.hmm-compagnon-encart__action:hover, .hmm-compagnon-encart__action:focus-visible { border-color: var(--hm-prune, #5b3a5e); box-shadow: 0 6px 18px rgba(91, 58, 94, 0.14); transform: translateY(-1px); color: var(--hm-encre, #16202b); }
.hmm-compagnon-encart__action:focus-visible { outline: 3px solid var(--hm-prune, #5b3a5e); outline-offset: 2px; }
.hmm-compagnon-encart__pastille { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--hm-prune-pale, #ece3ee); color: var(--hm-prune, #5b3a5e); }
.hmm-compagnon-encart__libelle { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; line-height: 1.25; }
.hmm-compagnon-encart__libelle b { font-weight: 700; font-size: 15px; }
.hmm-compagnon-encart__libelle small { font-size: 13px; color: var(--hm-secondaire, #5a6470); }
.hmm-compagnon-encart__action > .hmm-ic:last-child { flex: none; color: var(--hm-prune, #5b3a5e); opacity: 0.6; transition: opacity 0.2s, transform 0.2s; }
.hmm-compagnon-encart__action:hover > .hmm-ic:last-child { opacity: 1; transform: translateX(2px); }
@media (prefers-reduced-motion: reduce) { .hmm-compagnon-encart__action, .hmm-compagnon-encart__action > .hmm-ic:last-child { transition: none; transform: none; } }

.hmm-bloc-compagnon { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; padding: 48px; border-radius: var(--hm-rayon-4, 28px); background: var(--hm-prune, #5b3a5e); color: #fff; }
@media (max-width: 767px) { .hmm-bloc-compagnon { grid-template-columns: 1fr; padding: 28px 20px; } }
.hmm-bloc-compagnon h2 { color: #fff; margin: 0 0 16px; }
.hmm-bloc-compagnon .hmm-etiquette { color: rgba(255, 255, 255, 0.75); }
.hmm-bloc-compagnon__puces { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 10px; }
.hmm-bloc-compagnon__puces li { display: flex; align-items: flex-start; gap: 8px; }
.hmm-bloc-compagnon__puces svg { flex: none; margin-top: 4px; }
.hmm-bloc-compagnon__demo { display: grid; gap: 12px; }
.hmm-bulle { margin: 0; padding: 14px 18px; border-radius: 18px; max-width: 90%; line-height: 1.5; }
.hmm-bulle--moi { background: rgba(255, 255, 255, 0.15); justify-self: end; border-bottom-right-radius: 6px; }
.hmm-bulle--elle { background: #fff; color: var(--hm-encre, #16202b); border-bottom-left-radius: 6px; }

/* Espace pro : la pastille flottante fait doublon avec « Décrire mon besoin à Compagnon » et masquait les cartes. */
body.hm-pro .hmm-compagnon-pastille { display: none; }

/* Compagnon fermé au public (18/10/2026) : le volet explique qu'il arrive bientôt.
   Retravaillé le 04/11/2026 (demande de Simon) : tête et bandeau rouges d'un seul tenant, comme le magazine v2. */
.hmm-compagnon-bientot { overflow-y: auto; font-size: 1rem; line-height: 1.55; color: var(--hm-texte, #2a3542); }
.hmm-compagnon-bientot p { margin: 0; }
.hmm-compagnon-bientot__hero { position: relative; padding: 26px 24px 30px; background: linear-gradient(145deg, #d23048, #a81a2e); color: #fff; border-radius: 22px 22px 0 0; }
.hmm-compagnon-bientot__marque { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 14px; border: 1px solid rgba(255, 255, 255, 0.4); border-radius: 50%; background: rgba(255, 255, 255, 0.18); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4); }
.hmm-compagnon-bientot .hmm-compagnon-bientot__badge { display: table; margin-bottom: 10px; padding: 4px 12px; border-radius: 999px; background: #fff; color: #9e1c2e; font-size: .8rem; font-weight: 700; letter-spacing: .02em; }
.hmm-compagnon-bientot__titre { font-family: var(--hm-police-titre, inherit); font-size: 1.65rem; font-weight: 700; line-height: 1.15; letter-spacing: -.01em; color: #fff; }
.hmm-compagnon-bientot .hmm-compagnon-bientot__chapo { margin-top: 8px; color: #fff; }
.hmm-compagnon-bientot__corps { position: relative; margin-top: -14px; padding: 22px 24px; border-radius: 22px; background: var(--hm-surface, #fff); }
.hmm-compagnon-bientot__intro { font-weight: 700; color: var(--hm-encre, #16202b); }
.hmm-compagnon-bientot__atouts { list-style: none; margin: 10px 0 14px; padding: 0; display: grid; gap: 8px; }
.hmm-compagnon-bientot__atouts li { display: flex; align-items: flex-start; gap: 12px; padding: 9px 12px; border-radius: 14px; background: #fcf0f1; line-height: 1.35; }
.hmm-compagnon-bientot__atouts svg { flex: none; margin-top: 1px; color: #c4253a; }
.hmm-compagnon-bientot__etat { font-size: .95rem; color: var(--hm-secondaire, #56626f); }
.hmm-compagnon-bientot__liens { list-style: none; margin: 14px 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
.hmm-compagnon-bientot__lien { color: #9e1c2e; font-weight: 700; text-underline-offset: 3px; }
.hmm-compagnon-bientot__urgence { display: flex; gap: 10px; padding-top: 12px; border-top: 1px solid rgba(22, 32, 43, .1); font-size: .875rem; line-height: 1.4; color: var(--hm-secondaire, #56626f); }
.hmm-compagnon-bientot__urgence svg { flex: none; margin-top: 2px; color: #c4253a; }
/* Dans le volet : la tête et le bandeau partagent le même rouge, sans couture. */
.hmm-compagnon-volet--bientot { height: auto; max-height: calc(100dvh - 40px); background: linear-gradient(170deg, #d23048, #a81a2e); }
.hmm-compagnon-volet.hmm-compagnon-volet--bientot .hmm-compagnon-volet__tete { background: transparent; border: 0; }
.hmm-compagnon-volet--bientot .hmm-compagnon-bientot__hero { padding-top: 6px; background: none; border-radius: 0; }
.hmm-compagnon-volet--bientot .hmm-compagnon-bientot__corps { border-radius: 22px 22px 0 0; }
@media (max-width: 599px) { .hmm-compagnon-volet--bientot { height: auto; max-height: 100dvh; border-radius: 18px 18px 0 0; } }
