/* Fenêtre de chat du support (support-chat.js) : panneau latéral (plein écran sous 640 px) ou pleine page ([data-support-page]).
   Charte « Corde » : encre #161a1d, rouge action, rayons 8/12/18, Inter ; messages de l'équipe en encre, de l'usager en blanc. */
.supc { font: 400 15.5px/1.45 var(--f-text, Inter, Arial, sans-serif); color: var(--ink, #161a1d); }
.supc .ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.supc-pan { position: fixed; inset: 0; z-index: 1010; }
.supc-pan[hidden] { display: none; }
.supc-fond { position: absolute; inset: 0; background: rgba(22, 26, 29, .38); }
.supc-pan .supc-b { position: absolute; top: 0; right: 0; bottom: 0; width: min(460px, 100%); display: flex; flex-direction: column; background: #fff;
  box-shadow: 0 8px 28px rgba(22, 26, 29, .14); overflow-y: auto; overscroll-behavior: contain; }
.supc-b:focus { outline: none; }
body.supc-ouvert { overflow: hidden; }
.supc-pleine .supc-b { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--rule, #dfe3e6); border-radius: var(--radius, 12px);
  box-shadow: var(--shadow-1, 0 2px 10px rgba(22, 26, 29, .05)); overflow: hidden; }

.supc-h { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 6px; min-height: 56px; padding: 6px 8px 6px 18px; background: #fff; border-bottom: 1px solid var(--rule, #dfe3e6); }
.supc-h .supc-ico:first-child { margin-left: -10px; }
.supc-t { flex: 1; min-width: 0; margin: 0; font: 800 18px/1.25 var(--f-display, Manrope, Inter, sans-serif); overflow-wrap: anywhere; }
.supc-t:focus { outline: none; }
.supc-t:focus-visible { outline: 2px solid var(--red-deep, #d92d20); outline-offset: 2px; border-radius: 4px; }
.supc-ico { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: var(--radius-sm, 8px); background: none; color: var(--ink, #161a1d); cursor: pointer; }
.supc-ico:hover { background: var(--paper-2, #edf0f2); }
.supc-ico.petit { width: 32px; height: 32px; }
.supc-ico.petit .ico { width: 16px; height: 16px; }
.supc-c { padding: 16px 18px 20px; display: grid; gap: 12px; align-content: start; }
.supc-c > p { margin: 0; }
.supc-intro { color: var(--ink-2, #3e454d); }
.supc-st { margin: 8px 0 0; font: 700 14px var(--f-text, Inter, sans-serif); color: var(--ink-3, #646b75); text-transform: uppercase; letter-spacing: .04em; }
.supc .btn { display: inline-flex; align-items: center; gap: 8px; }
.supc-nouveau { width: 100%; justify-content: center; }

.supc-convs { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.supc-conv { display: grid; gap: 2px; width: 100%; padding: 12px 14px; border: 1px solid var(--rule, #dfe3e6); border-radius: var(--radius, 12px); background: #fff; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.supc-conv:hover { border-color: var(--rule-strong, #c9cfd4); background: var(--paper, #f6f7f8); }
.supc-conv-l1 { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.supc-conv-l1 b { font-weight: 700; overflow-wrap: anywhere; }
.supc-conv-l2 { color: var(--ink-3, #646b75); font-size: 13px; }
.supc-nl { padding: 1px 8px; border-radius: 99px; background: var(--red-deep, #d92d20); color: #fff; font: 700 12px/20px var(--f-text, Inter, sans-serif); }

.supc-form { gap: 14px; }
.supc-champ { display: grid; gap: 5px; font-weight: 600; font-size: 14px; }
.supc-champ abbr { text-decoration: none; color: var(--red-deep, #d92d20); }
.supc-champ input, .supc-champ select, .supc-champ textarea, .supc-compo textarea { width: 100%; box-sizing: border-box; min-height: 44px; padding: 10px 12px;
  border: 1px solid var(--rule-strong, #c9cfd4); border-radius: var(--radius-sm, 8px); background: #fff; color: var(--ink, #161a1d); font: 400 16px/1.4 var(--f-text, Inter, sans-serif); }
.supc-champ textarea { min-height: 130px; resize: vertical; }
.supc-champ input:focus, .supc-champ select:focus, .supc-champ textarea:focus, .supc-compo textarea:focus { outline: none; border-color: var(--red-deep, #d92d20); box-shadow: var(--focus, 0 0 0 3px rgba(217, 45, 32, .24)); }
.supc-compte { margin-top: -10px; color: var(--ink-3, #646b75); font-size: 12.5px; text-align: right; min-height: 0; }
.supc-case { display: flex; align-items: flex-start; gap: 10px; font-size: 14.5px; }
.supc-case input { width: 20px; height: 20px; margin: 1px 0 0; flex: none; accent-color: var(--red-deep, #d92d20); }
.supc-note { color: var(--ink-3, #646b75); font-size: 13px; }
.supc-sensible { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: var(--radius-sm, 8px); background: var(--warn-bg, #fff4da);
  color: var(--yellow-ink, #8a5400); font-size: 13.5px; }
.supc-sensible.petit { margin: 0 18px 14px; padding: 6px 10px; font-size: 12.5px; background: transparent; color: var(--ink-3, #646b75); }
.supc-sensible.petit .ico { width: 16px; height: 16px; }
.supc-piege { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.supc-err { margin: 0; color: var(--danger, #b42318); font-size: 14px; font-weight: 600; }
.supc-err:empty { display: none; }
.supc-actions { display: flex; justify-content: flex-end; }
.supc-mail { color: var(--ink-3, #646b75); font-size: 13px; }
.supc-liens { display: flex; flex-wrap: wrap; gap: 8px; }

.supc-pj { display: grid; gap: 6px; }
.supc-fichier { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.supc-joindre { display: inline-flex; align-items: center; gap: 8px; justify-self: start; min-height: 40px; padding: 0 12px; border: 1px dashed var(--rule-strong, #c9cfd4);
  border-radius: var(--radius-sm, 8px); color: var(--ink-2, #3e454d); font-size: 14px; font-weight: 600; cursor: pointer; }
.supc-joindre:hover { background: var(--paper, #f6f7f8); }
.supc-fichier:focus-visible + .supc-joindre { outline: 2px solid var(--red-deep, #d92d20); outline-offset: 2px; }
.supc-pj-l { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.supc-pj-l:empty { display: none; }
.supc-pj-l li { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 2px 4px 2px 10px; border-radius: var(--radius-sm, 8px); background: var(--paper, #f6f7f8); font-size: 13.5px; }
.supc-pj-l li span { overflow-wrap: anywhere; }
.supc-pj-l li.est-erreur { background: var(--danger-bg, #feeceb); color: var(--danger, #b42318); }
.supc-pj-l li.est-envoi { color: var(--ink-3, #646b75); }

.supc-statut { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; padding: 10px 18px; background: var(--paper, #f6f7f8);
  border-bottom: 1px solid var(--rule, #dfe3e6); font-size: 14px; font-weight: 600; }
.supc-statut small { color: var(--ink-3, #646b75); font-weight: 400; }
.supc-statut.est-attente span { color: var(--red-deep, #d92d20); }
.supc-statut.est-resolu span { color: var(--green, #167445); }
.supc-msgs { list-style: none; margin: 0; padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; overflow-y: auto; min-height: 140px; }
.supc-pleine .supc-msgs { max-height: 60vh; }
.supc-m { max-width: 86%; display: grid; gap: 3px; padding: 10px 13px; border-radius: 14px; background: #fff; border: 1px solid var(--rule, #dfe3e6); }
.supc-m.de-usager { align-self: flex-end; background: var(--paper-2, #edf0f2); border-color: var(--paper-2, #edf0f2); border-bottom-right-radius: 4px; }
.supc-m.de-agent, .supc-m.de-bot { align-self: flex-start; background: var(--ink, #161a1d); border-color: var(--ink, #161a1d); color: #fff; border-bottom-left-radius: 4px; }
.supc-m.de-systeme { align-self: center; max-width: 94%; background: transparent; border: 0; color: var(--ink-3, #646b75); font-size: 13.5px; text-align: center; padding: 2px 6px; }
.supc-m-n { font-size: 12.5px; font-weight: 700; opacity: .85; }
.supc-m-t { white-space: pre-wrap; overflow-wrap: anywhere; }
.supc-m-h { font-size: 11.5px; opacity: .7; justify-self: end; }
.supc-m.de-systeme .supc-m-h { justify-self: center; }
.supc-m-pj { display: flex; flex-wrap: wrap; gap: 6px; }
.supc-img img { display: block; max-width: 180px; max-height: 140px; width: auto; height: auto; border-radius: 8px; background: #fff; }
.supc-pdf { display: inline-block; padding: 4px 10px; border-radius: 8px; background: #fff; color: var(--ink, #161a1d); font-size: 13px; font-weight: 600; }
.supc-attente { margin: 0 18px 10px; color: var(--ink-3, #646b75); font-size: 13.5px; }
.supc-avis { margin: 0 18px 12px; padding: 12px 14px; border-radius: var(--radius, 12px); background: var(--green-2, #e8f5ed); display: grid; gap: 8px; }
.supc-avis p { margin: 0; }
.supc-avis-b { display: flex; gap: 8px; }
.supc-avis-b [aria-pressed="true"] { background: var(--ink, #161a1d); color: #fff; border-color: var(--ink, #161a1d); }
.supc-merci { margin: 0 18px 12px; color: var(--green, #167445); font-weight: 600; }
.supc-compo { position: sticky; bottom: 0; display: grid; gap: 8px; padding: 12px 18px; background: #fff; border-top: 1px solid var(--rule, #dfe3e6); }
.supc-compo textarea { min-height: 64px; resize: vertical; }
.supc-compo-b { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.supc-compo-b .btn { margin-left: auto; }
.supc-lien { padding: 6px 0; border: 0; background: none; color: var(--red-deep, #d92d20); font: 600 14px var(--f-text, Inter, sans-serif); text-decoration: underline; cursor: pointer; }

/* Pages « Écrire au support » : contact.html (site) et /<langue>/contact/ (centre d'aide, aide/modeles/ecrire.html) */
.ct-support { margin: 0 0 24px; }
.ct-chat, .aide-ecrire { max-width: 760px; }
.aide-ecrire-tete { margin: 8px 0 20px; }
.aide-ecrire-attente { color: var(--ink-3, #646b75); }
.aide-ecrire-mail { max-width: 760px; margin: 16px 0 0; color: var(--ink-3, #646b75); font-size: 14px; }

/* En-tête : lien « Support » avec la pastille des réponses non lues (common.js, [data-sup-entete]) */
.hd-sup[hidden] { display: none !important; }
.hd-burger.a-sup-nl, .bnav-plus.a-sup-nl { position: relative; }
.hd-burger.a-sup-nl::after, .bnav-plus.a-sup-nl::after { content: ""; position: absolute; top: 6px; right: 6px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--red-deep, #d92d20); box-shadow: 0 0 0 2px #fff; }

@media (max-width: 640px) {
  .supc-pan .supc-b { width: 100%; }
  .supc-c { padding: 14px 16px 18px; }
  .supc-h { padding-left: 16px; }
  .supc-msgs { padding: 14px 16px; }
  .supc-m { max-width: 92%; }
  .supc-compo { padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px)); }
  .supc-avis, .supc-attente, .supc-merci { margin-left: 16px; margin-right: 16px; }
  .supc-pleine .supc-b { border-radius: var(--radius-sm, 8px); }
}
@media (prefers-reduced-motion: reduce) { .supc * { transition: none !important; } }

/* Étape 8 : « Supprimer cette conversation » (confirmation dans la fenêtre) */
.supc-suppr-z { margin: 0 18px 16px; }
.supc-suppr { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--ink-3, #646b75); font-weight: 500; font-size: 13.5px; }
.supc-suppr .ico { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.supc-confirme { padding: 12px 14px; border: 1px solid var(--danger, #b42318); border-radius: var(--radius-sm, 8px); background: #fff; font-size: 14px; }
.supc-confirme p { margin: 0 0 10px; }
.supc-confirme-b { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 !important; }
.supc-danger { background: var(--danger, #b42318); border-color: var(--danger, #b42318); color: #fff; }
.supc-ok { margin: 0 0 8px; padding: 8px 12px; border-radius: var(--radius-sm, 8px); background: #ecfdf3; color: #05603a; font-weight: 600; font-size: 14px; }
