/* Aide en ligne (vidéos de prise en main) */
.aide-liste li { gap: 12px; }
.aide-titre { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.aide-titre small { color: var(--muet, #6b7b79); }
.aide-lecteur video, .aide-lecteur iframe { width: 100%; max-width: 960px; aspect-ratio: 16 / 9; border: 0; border-radius: 12px; background: #000; display: block; margin: 8px 0 12px; }
.aide-bouton { display: inline-flex; align-items: center; gap: 6px; margin-left: 12px; padding: 4px 12px; font-size: 13px; font-weight: 600; vertical-align: middle; border-radius: 99px; text-decoration: none; background: var(--primaire-doux, #e3f2f0); color: var(--primaire-fonce, #00564f); }
.aide-bouton:hover { filter: brightness(.96); }
.carte + .carte { margin-top: 16px; }
.aide-lecteur { margin-bottom: 16px; }

/* Bouton d'aide flottant : toujours visible en bas à droite de l'écran */
.aide-flottant { position: fixed; right: 20px; bottom: 20px; z-index: 250; display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 18px 0 14px; border-radius: 99px; text-decoration: none; font-weight: 700; font-size: 14px;
    background: var(--primaire, #00756a); color: #fff; box-shadow: 0 6px 18px rgba(0, 40, 36, .28); transition: transform .15s, box-shadow .15s; }
.aide-flottant i { font-size: 22px; line-height: 1; }
.aide-flottant:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(0, 40, 36, .32); color: #fff; }
.aide-flottant.avec-video::after { content: ''; position: absolute; top: -2px; right: -2px; width: 13px; height: 13px; border-radius: 50%; background: #f5a623; border: 2px solid #fff; }
@media (max-width: 640px) { .aide-flottant { right: 14px; bottom: 14px; width: 50px; height: 50px; padding: 0; justify-content: center; } .aide-flottant span { display: none; } }
@media print { .aide-flottant { display: none; } }

/* Icône d'aide dans la barre du haut, à gauche de l'utilisateur */
.barre-aide { position: relative; display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: #fff; background: rgba(255, 255, 255, .18); text-decoration: none; flex: none; }
.barre-aide i { font-size: 22px; line-height: 1; }
.barre-aide:hover { background: rgba(255, 255, 255, .3); color: #fff; }
.barre-aide.avec-video::after { content: ''; position: absolute; top: 2px; right: 2px; width: 10px; height: 10px; border-radius: 50%; background: #f5a623; border: 2px solid #00746b; }
@media print { .barre-aide { display: none; } }
.barre-aide-boite { display: contents; }

/* Mascotte d'aide DUAUX (SVG animé) : au repos calme, éveillée au survol */
.aide-mascotte { position: fixed; right: 16px; bottom: 14px; z-index: 250; display: block; width: 96px; text-decoration: none; filter: drop-shadow(0 5px 6px rgba(0, 40, 60, .22)); -webkit-tap-highlight-color: transparent; }
.aide-mascotte .mas { display: block; width: 100%; height: auto; overflow: visible; }
.aide-mascotte .mas * { transform-box: fill-box; }
.aide-mascotte .mas .mas-hl { transform-box: view-box; }
/* repos : calme, main baissée, bulle discrète */
.mas-sol { transition: transform .3s; transform-origin: 50% 50%; }
.aide-mascotte:hover .mas-sol, .aide-mascotte:focus-visible .mas-sol { animation: mas-ombre .7s ease-in-out infinite; }
@keyframes mas-ombre { 0%, 100% { transform: scale(1); opacity: 1; } 30% { transform: scale(.86); opacity: .7; } }
.mas-tete { transform-origin: 50% 100%; animation: mas-respire 3.6s ease-in-out infinite; }
.mas-main { transform-origin: 85% 95%; transform: rotate(18deg); transition: transform .35s cubic-bezier(.3, 1.4, .5, 1); }
.mas-bulle { transform-origin: 20% 100%; transform: scale(.84); opacity: .94; transition: transform .35s cubic-bezier(.3, 1.6, .5, 1), opacity .25s; }
.mas-bouche { transform-origin: 50% 0; transform: scaleY(.78); transition: transform .3s; }
/* éveillé (souris dessus ou focus clavier) : la main salue, la bulle sort, la bouche s'ouvre, la tête rebondit */
.aide-mascotte:hover .mas-tete, .aide-mascotte:focus-visible .mas-tete { animation: mas-saute .7s ease-in-out infinite; }
.aide-mascotte:hover .mas-main, .aide-mascotte:focus-visible .mas-main { transform: rotate(0); animation: mas-salue .6s ease-in-out .15s infinite alternate; }
.aide-mascotte:hover .mas-bulle, .aide-mascotte:focus-visible .mas-bulle { transform: scale(1.1); opacity: 1; animation: mas-pop .45s cubic-bezier(.3, 1.6, .5, 1); }
.aide-mascotte:hover .mas-bouche, .aide-mascotte:focus-visible .mas-bouche { transform: scaleY(1.18); }
@keyframes mas-respire { 0%, 100% { transform: translateY(0) scale(1, 1); } 50% { transform: translateY(-2px) scale(1.012, .99); } }
@keyframes mas-saute { 0%, 100% { transform: translateY(0) rotate(0); } 30% { transform: translateY(-6px) rotate(-3deg); } 60% { transform: translateY(0) rotate(2deg); } }
@keyframes mas-salue { from { transform: rotate(-16deg); } to { transform: rotate(20deg); } }
@keyframes mas-pop { 0% { transform: scale(.7); } 60% { transform: scale(1.22); } 100% { transform: scale(1.1); } }
.aide-mascotte.avec-video::after { content: ''; position: absolute; top: -2px; right: 0; width: 11px; height: 11px; border-radius: 50%; background: #f5a623; border: 2px solid #fff; }
@media (max-width: 640px) { .aide-mascotte { width: 62px; right: 10px; bottom: 10px; } }
@media (prefers-reduced-motion: reduce) { .mas-tete, .aide-mascotte:hover .mas-tete, .aide-mascotte:hover .mas-main { animation: none; } }
@media print { .aide-mascotte { display: none; } }

/* ===== Aide & FAQ, requêtes (couleurs de l'ERP) ===== */
.aide-page { max-width: 1100px; margin: 0 auto; }
.aide-page.aide-etroite { max-width: 820px; }
.aide-entete { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.aide-grand-titre { display: flex; align-items: center; gap: 12px; font-size: 30px; font-weight: 800; color: var(--primaire); letter-spacing: -.01em; }
.aide-ico { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--primaire-doux); color: var(--primaire); font-size: 26px; }
.aide-fil { margin: 0 0 14px; font-size: 13px; }
.aide-pastille { display: inline-block; min-width: 20px; padding: 1px 6px; margin-left: 6px; border-radius: 99px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; text-align: center; }

.aide-accueil { margin: 14px 0 22px; padding: 34px 20px 36px; text-align: center; background: var(--primaire-doux); border-radius: var(--rayon); box-shadow: var(--ombre); }
.aide-accueil h1 { font-size: 28px; font-weight: 800; color: var(--texte); margin: 0 0 10px; }
.aide-accueil p { margin: 0 0 22px; color: #3a5552; font-size: 16px; line-height: 1.55; }
.aide-recherche { display: block; max-width: 560px; margin: 0 auto; }
.aide-recherche input { background: #fff; height: 48px; font-size: 16px; }
.aide-ou { margin: 12px 0; font-size: 18px; color: var(--texte); }
.aide-nouvelle { font-size: 17px; padding: 12px 26px; }

.aide-resultats { max-width: 940px; margin: 0 auto 24px; }
.aide-resultats > h3 { font-size: 22px; font-weight: 300; color: #3a5552; margin: 0 0 8px; padding: 0 2px; }
.aide-resultats > h3 em { font-style: normal; font-weight: 600; }
.aide-res-liste { list-style: none; margin: 0; padding: 0; }
.aide-res-liste li { border-bottom: 1px solid var(--bord); }
.aide-res-liste li:last-child { border-bottom: 0; }
.aide-res-liste a { display: flex; align-items: center; gap: 14px; padding: 14px 8px; color: var(--texte); border-radius: 8px; }
.aide-res-liste a:hover { background: var(--primaire-doux); }
.aide-res-liste .lni { font-size: 22px; color: var(--primaire); flex: none; }
.aide-res-liste .aide-titre strong { font-size: 16px; font-weight: 600; }
.aide-fleche { margin-left: auto; color: var(--primaire); font-size: 22px; font-weight: 700; flex: none; }
.aide-res-liste .badge { margin-left: auto; }
.aide-res-liste .badge + .aide-fleche { margin-left: 8px; }
.aide-aucun { text-align: center; padding: 22px 10px; color: var(--muet); }

/* formulaire de requête */
.aide-formulaire textarea, .aide-formulaire select { width: 100%; }
.aide-requis { color: var(--rouge); }
.aide-priorite { max-width: 420px; }
.aide-priorite input[type=range] { width: 100%; accent-color: var(--primaire); height: 6px; padding: 0; margin: 8px 0 2px; cursor: pointer; }
.aide-priorite input.moyen { accent-color: #e09100; }
.aide-priorite input.eleve { accent-color: var(--rouge); }
.aide-prio-reperes { display: flex; justify-content: space-between; font-size: 13px; color: var(--muet); }
.aide-prio-reperes .actif { color: var(--texte); font-weight: 700; }
.aide-prio-valeur { margin-top: 8px; }
.aide-depot { border: 2px dashed #b9d3d0; border-radius: 12px; padding: 16px; background: #fafdfd; }
.aide-depot.plein { border-style: solid; border-color: var(--bord); background: #fff; }
.aide-depot.petit { padding: 10px; margin-bottom: 12px; }
.aide-depot-vide { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.aide-parcourir { position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 6px; }
.aide-parcourir input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.aide-depot-fichier { display: flex; align-items: center; gap: 12px; }
.aide-depot-fichier img { width: 84px; height: 60px; object-fit: cover; border-radius: 8px; border: 1px solid var(--bord); }
.aide-depot-fichier .aide-titre { flex: 1; min-width: 0; word-break: break-all; }
.aide-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; flex-wrap: wrap; }

/* liste « Mes requêtes » */
.aide-filtres-barre { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.aide-filtre-statut { display: flex; align-items: center; gap: 12px; font-size: 14px; color: #3a5552; }
.aide-liste-deroulante { position: relative; }
.aide-select { display: inline-flex; align-items: center; justify-content: space-between; gap: 18px; min-width: 150px; padding: 9px 14px; background: #fff; border: 1px solid #cfdcda; border-radius: 8px; font-size: 15px; }
.aide-caret { width: 0; height: 0; border: 5px solid transparent; border-top-color: #5b706d; border-bottom: 0; }
.aide-caret.haut { border-top: 0; border-bottom: 5px solid #5b706d; }
.aide-menu-statut { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; min-width: 270px; background: #fff; border-radius: 10px; box-shadow: 0 10px 30px rgba(0, 40, 36, .22); overflow: hidden; padding-top: 10px; }
.aide-case { display: flex; align-items: center; gap: 12px; padding: 7px 16px; font-size: 16px; cursor: pointer; }
.aide-case input { width: 20px; height: 20px; accent-color: var(--primaire); margin: 0; }
.aide-menu-actions { display: flex; margin-top: 10px; }
.aide-menu-actions button { flex: 1; padding: 12px; color: #fff; font-size: 15px; }
.aide-btn-appliquer { background: var(--primaire); } .aide-btn-appliquer:hover { background: var(--primaire-fonce); }
.aide-btn-reinit { background: #4b5a58; } .aide-btn-reinit:hover { background: #3b4846; }
.aide-filtres-barre .recherche { flex: 0 1 320px; min-width: 200px; }

.aide-tableau-boite { background: #fff; border-radius: var(--rayon); box-shadow: var(--ombre); overflow-x: auto; }
.aide-tableau { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.aide-tableau th { text-align: left; padding: 14px 14px; background: var(--primaire-doux); border-bottom: 3px solid var(--primaire); color: var(--texte); font-weight: 700; white-space: nowrap; }
.aide-tableau td { padding: 14px; vertical-align: top; }
.aide-tableau tbody tr { cursor: pointer; }
.aide-tableau tbody tr:nth-child(odd) { background: #f7fafa; }
.aide-tableau tbody tr:nth-child(even) { background: #eef3f3; }
.aide-tableau tbody tr:hover, .aide-tableau tbody tr:focus { background: var(--primaire-doux); outline: 0; }
.aide-tableau .aide-objet small { display: block; color: var(--muet); margin-top: 2px; font-weight: 400; }
.aide-tableau .aide-objet strong { font-weight: 400; }
.aide-tableau tr.non-lu td { font-weight: 700; }
.aide-tableau tr.non-lu .aide-objet strong { font-weight: 700; }
.aide-tableau .aide-date { white-space: nowrap; }
.aide-tri { font-style: normal; }
.aide-st { font-weight: 600; } .aide-st.repondu { color: var(--vert); } .aide-st.ferme { color: var(--rouge); } .aide-st.ouvert { color: #1c78a6; } .aide-st.en_cours { color: #c77700; } .aide-st.en_attente { color: #7b3fb0; } .aide-st.resolu { color: var(--vert); }
.aide-prio { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: 12.5px; font-weight: 600; background: var(--bleu-fond); color: #1c78a6; }
.aide-prio.moyen { background: var(--orange-fond); color: var(--orange); } .aide-prio.eleve { background: var(--rouge-fond); color: var(--rouge); }

/* détail d'une requête */
.aide-fiche { display: grid; gap: 10px 24px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-bottom: 16px; }
.aide-fiche-ligne { display: flex; flex-direction: column; gap: 3px; font-size: 14px; }
.aide-fiche-ligne > span:first-child { color: var(--muet); font-size: 12.5px; }
.aide-fil-messages { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.aide-msg { max-width: 88%; padding: 12px 14px; border-radius: 14px; background: #fff; box-shadow: var(--ombre); }
.aide-msg.moi { align-self: flex-end; background: var(--primaire-doux); }
.aide-msg.support { align-self: flex-start; border-left: 4px solid var(--primaire); }
.aide-msg-tete { display: flex; gap: 12px; justify-content: space-between; font-size: 12.5px; color: var(--muet); margin-bottom: 4px; }
.aide-msg-tete strong { color: var(--texte); }
.aide-msg-texte { margin: 0; white-space: pre-wrap; word-break: break-word; }
.aide-msg-piece { margin-top: 8px; }
.aide-msg-piece img { max-width: 100%; max-height: 260px; border-radius: 8px; border: 1px solid var(--bord); display: block; }
@media (max-width: 640px) {
    .aide-grand-titre { font-size: 23px; } .aide-accueil h1 { font-size: 22px; } .aide-msg { max-width: 100%; }
    .aide-tableau th:nth-child(4), .aide-tableau td:nth-child(4) { display: none; }
}
.aide-filtres { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; } .aide-filtres .spacer { flex: 1; }
.aide-fiche-ligne .aide-prio, .aide-fiche-ligne .aide-st { align-self: flex-start; }
@media (max-width: 640px) {
    .aide-tableau, .aide-tableau tbody { display: block; }
    .aide-tableau thead { display: none; }
    .aide-tableau tbody tr { display: block; padding: 10px 14px; border-bottom: 1px solid var(--bord); }
    .aide-tableau td { display: inline-block; padding: 2px 10px 2px 0; vertical-align: middle; }
    .aide-tableau td.aide-num { display: block; font-weight: 700; color: var(--primaire); }
    .aide-tableau td.aide-objet { display: block; }
    .aide-tableau th:nth-child(4), .aide-tableau td:nth-child(4) { display: inline-block; }
}

/* accueil compact + vidéo en boîte modale */
.aide-accueil { margin: 8px 0 14px; padding: 16px 18px 18px; }
.aide-accueil h1 { font-size: 20px; margin: 0 0 4px; }
.aide-accueil p { margin: 0 0 12px; font-size: 14px; }
.aide-accueil-ligne { display: flex; gap: 12px; align-items: center; justify-content: center; flex-wrap: wrap; }
.aide-accueil-ligne .aide-recherche { flex: 1 1 320px; max-width: 520px; margin: 0; }
.aide-accueil .aide-recherche input { height: 42px; font-size: 15px; }
.aide-accueil .aide-nouvelle { font-size: 15px; padding: 10px 20px; white-space: nowrap; }
.aide-modal-video { width: min(960px, 96vw); max-width: none; max-height: 94vh; overflow: auto; }
.aide-modal-video video, .aide-modal-video iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 12px; background: #000; }
.aide-msg-video { margin-top: 8px; }

/* Validation d'une requête traitée */
.aide-valider { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 10px; background: #f5a623; color: #fff; font-size: 12px; font-weight: 700; white-space: nowrap; }
.aide-validation { border-left: 4px solid #f5a623; margin-bottom: 14px; padding: 16px; }
.aide-validation.fait { border-left-color: #1b9a5b; }
.aide-validation h3 { margin: 0 0 6px; }
.aide-etoiles { display: flex; gap: 4px; margin: 8px 0; }
.aide-etoiles button { font-size: 32px; line-height: 1; background: none; border: 0; color: #cfd8d7; cursor: pointer; padding: 0 2px; }
.aide-etoiles button.on, .aide-etoiles.fixe span.on { color: #f5a623; }
.aide-etoiles.fixe { display: inline-flex; margin: 0 0 0 6px; } .aide-etoiles.fixe span { color: #cfd8d7; font-size: 18px; }
