/* GME Mentor : bouton flottant, fiche d'aide, visite guidée */
.mentor-fab { position: relative; width: 44px; height: 44px; margin: 0 8px 0 4px; border-radius: 50%; border: 2px solid #e11d24; padding: 0; cursor: pointer; flex: 0 0 44px;
  background: radial-gradient(circle at 50% 30%, #3a1216, #0b0f19); overflow: visible; animation: mentor-pulse 3.2s ease-out infinite; transition: transform .15s; }
.mentor-fab svg { display: block; border-radius: 50%; }
.mentor-fab:hover { transform: scale(1.08); }
.mentor-fab-q { position: absolute; top: -5px; right: -6px; width: 18px; height: 18px; border-radius: 50%; background: linear-gradient(180deg, #ff3b3f, #c8161c); color: #fff; font: 800 11px/15px Barlow, sans-serif; text-align: center; border: 1.5px solid #fff; }
.mentor-fab-tip { position: absolute; right: 0; top: 52px; white-space: nowrap; background: #fff; color: #14223b; box-shadow: 0 8px 20px rgba(0, 0, 0, .25); font-size: 12.5px; font-weight: 600; padding: 7px 11px; border-radius: 9px; opacity: 0; transform: translateY(-4px); transition: .18s; pointer-events: none; z-index: 60; }
.mentor-fab:hover .mentor-fab-tip { opacity: 1; transform: none; }
@keyframes mentor-pulse { 0%, 70% { box-shadow: 0 0 0 0 rgba(255, 59, 63, .6); } 85% { box-shadow: 0 0 0 9px rgba(255, 59, 63, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 59, 63, 0); } }

/* animations de Kalil : reflet qui balaie l'écran du casque, léger hochement */
.mentor-av .mentor-glare { animation: kalil-glare 5.5s ease-in-out infinite; }
.mentor-av.wave .mentor-helmet { transform-origin: 60px 90px; animation: kalil-nod 5.5s ease-in-out infinite; }
.mentor-av .mentor-eyes { transform-origin: 72px 54px; animation: mentor-blink 4.6s infinite; }
@keyframes kalil-glare { 0%, 55% { transform: translateX(-30px); } 80%, 100% { transform: translateX(90px); } }
@keyframes kalil-nod { 0%, 70%, 100% { transform: rotate(0); } 76% { transform: rotate(-3deg); } 82% { transform: rotate(2deg); } 88% { transform: rotate(0); } }
@keyframes mentor-blink { 0%, 94%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.1); } }
/* vie de Kalil (v1.29) : respiration, tête, yeux ambre, aérations, gants */
.mentor-av:not(.crop) .k-body { transform-origin: 60px 120px; animation: k-breathe 4.2s ease-in-out infinite; }
.mentor-av:not(.crop) .k-glow { filter: drop-shadow(0 0 2.5px #ffc25a); }
.mentor-av .k-eye { transform-box: fill-box; transform-origin: 50% 100%; transition: transform .25s; }
.mentor-av:not(.crop) .k-vent { animation: k-vent 2.6s ease-in-out infinite; }
.mentor-av:not(.crop) .k-vent.v2 { animation-delay: .35s; }
.mentor-av:not(.crop) .k-vent.v3 { animation-delay: .7s; }
.mentor-av .k-glove { opacity: 0; transform: translateY(14px); transform-box: fill-box; transition: opacity .3s, transform .3s; }
.mentor-av.m-hello .k-hello { opacity: 1; transform: none; animation: k-wave .6s ease-in-out 3; transform-origin: 50% 90%; }
.mentor-av.m-happy .k-thumb { opacity: 1; transform: none; }
.mentor-av.m-happy .k-eye { transform: scaleY(1.25) translateY(-1px); }
.mentor-av.m-happy .k-glow { filter: drop-shadow(0 0 5px #ffc25a); }
.mentor-av.m-think .k-er { transform: scaleY(.55); }
.mentor-av.m-talk .mentor-helmet { animation: k-talk .32s ease-in-out infinite; transform-origin: 60px 90px; }
.mentor-av.m-talk .k-vent { animation-duration: .5s; }
@keyframes k-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.012, 1.02); } }
@keyframes k-vent { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes k-wave { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-12deg); } }
@keyframes k-talk { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-1.6px) rotate(-1deg); } }
@media (prefers-reduced-motion: reduce) { .mentor-fab, .mentor-av * { animation: none !important; } }

.mentor-card { position: fixed; right: 18px; top: calc(var(--top-h, 64px) + 12px); z-index: 950; width: min(440px, calc(100vw - 32px)); max-height: calc(100vh - var(--top-h, 64px) - 30px); display: flex; flex-direction: column;
  background: #fff; border-radius: 18px; box-shadow: 0 24px 60px rgba(5, 8, 16, .45); overflow: hidden; opacity: 0; transform: translateY(-10px) scale(.97); transform-origin: top right; transition: opacity .22s, transform .22s; }
.mentor-card.in { opacity: 1; transform: none; }
.mentor-card.lang-ar, .mentor-tip[lang=ar] { font-family: Tajawal, 'Segoe UI', Tahoma, Arial, sans-serif; }
.mentor-head { position: relative; display: flex; align-items: flex-end; gap: 12px; min-height: 118px; padding: 0 14px 0 6px; color: #fff; overflow: hidden;
  background: linear-gradient(115deg, transparent 0 18%, rgba(225, 29, 36, .9) 18% 21%, transparent 21% 25%, rgba(225, 29, 36, .55) 25% 26.5%, transparent 26.5%), radial-gradient(circle at 20% 110%, #5a0d12 0%, transparent 55%), linear-gradient(135deg, #0b0f19 0%, #161b27 55%, #2a0a0d 100%); }
.mentor-head::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: linear-gradient(90deg, #e11d24, #ff5a5f, transparent); }
.mentor-head-av { flex: 0 0 118px; height: 118px; margin-bottom: -2px; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .55)); }
.mentor-head-t { flex: 1; min-width: 0; padding-bottom: 20px; }
.mentor-head h3 { margin: 0; font: italic 800 38px/1 'Barlow Semi Condensed', Barlow, sans-serif; letter-spacing: -.5px; text-shadow: 0 2px 10px rgba(0, 0, 0, .5); }
.mentor-head h3::after { content: ''; display: block; width: 64px; height: 4px; margin-top: 6px; border-radius: 2px; background: #e11d24; }
.mentor-head-sub { display: block; margin-top: 7px; font-size: 14px; font-weight: 600; color: #e7ebf2; }
.mentor-head-act { position: absolute; top: 12px; inset-inline-end: 12px; display: flex; align-items: center; gap: 8px; }
.mentor-lang { display: flex; padding: 2px; border-radius: 16px; background: rgba(255, 255, 255, .12); }
.mentor-lang button { border: 0; background: none; color: #cfd6e2; font: 700 12px/1 Barlow, Tajawal, sans-serif; padding: 6px 10px; border-radius: 14px; cursor: pointer; }
.mentor-lang button.on { background: #fff; color: #b3121a; }
.mentor-x { width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .12); color: #fff; font-size: 20px; line-height: 1; cursor: pointer; }
.mentor-x:hover { background: rgba(255, 255, 255, .24); }
.mentor-body { padding: 14px 18px 6px; overflow: auto; color: #26324a; font-size: 14px; line-height: 1.5; }
.mentor-bubble { position: relative; margin: 0 0 12px; padding: 12px 14px; background: #f3f6fa; border-radius: 14px; border-inline-start: 3px solid #e11d24; }
.mentor-bubble b { display: block; font-size: 16px; color: #14223b; }
.mentor-bubble p { margin: 4px 0 0; }
.mentor-page { display: inline-flex; align-items: center; gap: 5px; margin-top: 4px; padding: 2px 8px; border-radius: 10px; background: #fff; color: #b3121a; font-size: 12px; font-weight: 700; box-shadow: 0 0 0 1px #f3cfd1; }
.mentor-tips { margin: 0; padding: 0; list-style: none; }
.mentor-tips li { position: relative; padding: 5px 0 5px 0; padding-inline-start: 24px; }
.mentor-tips li::before { content: ''; position: absolute; inset-inline-start: 4px; top: 11px; width: 9px; height: 9px; border-radius: 2px; transform: rotate(45deg); background: #e11d24; }
.mentor-tech { margin: 12px 0 4px; padding: 10px 12px; border-radius: 12px; background: linear-gradient(135deg, #14223b, #1f2f50); color: #e8edf5; }
.mentor-tech-h { display: flex; align-items: center; gap: 6px; font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; }
.mentor-tech-h svg { color: #ff5a5f; }
.mentor-tech-h .mentor-link { margin-inline-start: auto; color: #aab6c8; text-transform: none; letter-spacing: 0; }
.mentor-tech-h .mentor-link:hover { color: #fff; }
.mentor-tech p { margin: 6px 0 0; font-size: 13.5px; line-height: 1.5; }
.mentor-card[dir=rtl] .mentor-steps li { padding: 3px 30px 5px 0; }
.mentor-card[dir=rtl] .mentor-steps li::before { left: auto; right: 0; }
.mentor-card[dir=rtl] .mentor-body h4 { letter-spacing: 0; }
.mentor-card[dir=rtl] .mentor-proc { direction: rtl; }
.mentor-body h4 { display: flex; align-items: center; gap: 6px; margin: 12px 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: #14223b; }
.mentor-body h4 svg { color: #e11d24; }
.mentor-steps { margin: 0; padding-left: 0; list-style: none; counter-reset: ms; }
.mentor-steps li { counter-increment: ms; position: relative; padding: 3px 0 5px 30px; }
.mentor-steps li::before { content: counter(ms); position: absolute; left: 0; top: 3px; width: 21px; height: 21px; border-radius: 50%; background: #14223b; color: #fff; font-size: 11.5px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.mentor-next { margin: 0 0 8px; padding: 10px 12px; border-radius: 10px; background: #e9f7ee; color: #145c2c; font-weight: 500; }
.mentor-proc { display: flex; gap: 3px; margin: 2px 0 6px; }
.mentor-proc a { flex: 1; min-width: 0; text-decoration: none; display: flex; flex-direction: column; align-items: center; gap: 3px; color: #8a94a4; font-size: 9.5px; font-weight: 600; }
.mentor-proc a i { font-style: normal; width: 100%; height: 6px; border-radius: 3px; background: #e3e7ee; font-size: 0; }
.mentor-proc a span { display: none; white-space: nowrap; }
.mentor-proc a.past i { background: #1f9a3e; }
.mentor-proc a.now i { background: #e11d24; height: 8px; margin-top: -1px; }
.mentor-proc a.now span { display: block; color: #e11d24; font-weight: 800; font-size: 11px; }
.mentor-proc a:hover span { display: block; }
.mentor-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-top: 1px solid #eef1f5; background: #fafbfd; }
.mentor-link { border: 0; background: none; color: #6b7688; font: inherit; font-size: 12.5px; text-decoration: underline; cursor: pointer; padding: 0; }
.mentor-link:hover { color: #c62828; }

.mentor-tour { position: fixed; inset: 0; z-index: 1000; }
.mentor-spot { position: fixed; border-radius: 12px; box-shadow: 0 0 0 9999px rgba(10, 18, 34, .62), 0 0 0 3px #e11d24, 0 0 24px 4px rgba(225, 29, 36, .6); transition: all .28s ease; pointer-events: none; }
.mentor-tip { position: fixed; display: flex; gap: 10px; background: #fff; border-radius: 14px; padding: 12px; box-shadow: 0 18px 44px rgba(0, 0, 0, .35); transition: top .28s, left .28s; }
.mentor-tip-av { width: 46px; height: 46px; flex: 0 0 46px; border-radius: 50%; overflow: hidden; background: radial-gradient(circle at 50% 30%, #3a1216, #0b0f19); }
.mentor-tip-body { flex: 1; min-width: 0; }
.mentor-tip-body small { color: #e11d24; font-weight: 700; font-size: 11.5px; }
.mentor-tip-body p { margin: 3px 0 10px; font-size: 14px; line-height: 1.45; color: #1d2940; }
.mentor-tip-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mentor-tip-foot span { display: flex; gap: 6px; }

/* Paramètres › GME Mentor */
.mentor-set { display: grid; grid-template-columns: 220px 1fr; gap: 20px; align-items: start; }
.mentor-set-hero { text-align: center; padding: 18px; border-radius: 16px; color: #dfe5ee; background: linear-gradient(115deg, transparent 0 20%, rgba(225, 29, 36, .8) 20% 23%, transparent 23%), linear-gradient(135deg, #0b0f19, #161b27 60%, #2a0a0d); }
.mentor-set-hero b { display: block; margin-top: 6px; font: italic 800 30px 'Barlow Semi Condensed', Barlow, sans-serif; color: #fff; }
.mentor-set-hero .muted { color: #aab6c8 !important; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid #eef1f5; }
.switch-row:last-child { border-bottom: 0; }
.switch-row small { display: block; color: #6b7688; font-size: 12.5px; }
.switch { position: relative; width: 46px; height: 26px; flex: 0 0 46px; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 13px; background: #cfd5de; transition: .18s; }
.switch span::after { content: ''; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: .18s; }
.switch input:checked + span { background: #1f9a3e; }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:disabled + span { opacity: .5; }
.switch input:focus-visible + span { outline: 2px solid #e11d24; outline-offset: 2px; }
.mentor-roles { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.mentor-roles label { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 18px; background: #f3f6fa; font-size: 13px; cursor: pointer; }
@media (max-width: 760px) { .mentor-set { grid-template-columns: 1fr; } .mentor-card { left: 12px; right: 12px; width: auto; } }
@media print { .mentor-fab, .mentor-card, .mentor-tour { display: none !important; } }
.dd-mentor svg { border-radius: 50%; background: #0b0f19; }
.dd-mentor em { margin-left: auto; font-style: normal; font-size: 11.5px; font-weight: 700; color: #6b7688; }
/* le mécano ne doit jamais cacher les boutons d'action en bas de page */
.mentor-proc a:first-child span { align-self: flex-start; }
.mentor-proc a:last-child span { align-self: flex-end; }
/* arabe : Kalil regarde vers le texte, titre en police arabe */
.mentor-card[dir=rtl] .mentor-head-av svg, .mentor-tip[dir=rtl] .mentor-tip-av svg { transform: scaleX(-1); }
.mentor-card[dir=rtl] .mentor-head { padding: 0 6px 0 14px; background: linear-gradient(245deg, transparent 0 18%, rgba(225, 29, 36, .9) 18% 21%, transparent 21% 25%, rgba(225, 29, 36, .55) 25% 26.5%, transparent 26.5%), radial-gradient(circle at 80% 110%, #5a0d12 0%, transparent 55%), linear-gradient(225deg, #0b0f19 0%, #161b27 55%, #2a0a0d 100%); }
.mentor-card[dir=rtl] .mentor-head h3 { font: 800 40px/1.1 Tajawal, 'Segoe UI', sans-serif; }
.mentor-card[dir=rtl] .mentor-head::after { background: linear-gradient(270deg, #e11d24, #ff5a5f, transparent); }

/* ---------- Formation Kalil ---------- */
.kt-head { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.kt-av { flex: none; }
.kt-prog { height: 10px; border-radius: 5px; background: #eef1f5; overflow: hidden; max-width: 520px; }
.kt-prog i { display: block; height: 100%; background: linear-gradient(90deg, #1b9e4b, #2ecc71); border-radius: 5px; transition: width .5s; }
.kt-grid { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 16px; align-items: start; }
.kt-nav { padding: 8px; position: sticky; top: 80px; max-height: calc(100vh - 100px); overflow: auto; }
.kt-phase { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); padding: 10px 8px 4px; }
.kt-item { display: flex; gap: 10px; align-items: center; width: 100%; text-align: start; border: 0; background: transparent; padding: 8px; border-radius: 8px; cursor: pointer; font: inherit; font-size: 13.5px; color: var(--text); }
.kt-item:hover { background: #f4f6f9; }
.kt-item.on { background: #fdecec; }
.kt-item i { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 700; font-size: 12px; background: #eef1f5; color: #4b5563; }
.kt-item.on i { background: #d7141b; color: #fff; }
.kt-item.done i { background: #1b9e4b; color: #fff; }
.kt-item span { display: flex; flex-direction: column; line-height: 1.25; }
.kt-item small { color: var(--muted); font-size: 11.5px; }
.kt-step { padding: 22px 26px; }
.kt-title { display: flex; gap: 10px; align-items: center; font-size: 22px; margin: 6px 0 8px; }
.kt-who { font-size: 13.5px; color: #374151; display: flex; gap: 6px; align-items: center; margin-bottom: 12px; }
.kt-why { background: #f4f7fc; border-inline-start: 4px solid #2f6fdb; padding: 10px 14px; border-radius: 6px; font-size: 14px; }
.kt-why p { margin: 4px 0 0; }
.kt-h { display: flex; gap: 8px; align-items: center; font-size: 15.5px; margin: 18px 0 8px; }
.kt-warn { color: #b45309; }
.kt-clicks { margin: 0; padding-inline-start: 0; list-style: none; counter-reset: kt; display: grid; gap: 8px; }
.kt-clicks li { counter-increment: kt; display: flex; gap: 10px; font-size: 14px; line-height: 1.5; background: #fff; border: 1px solid var(--line, #e6e9ef); border-radius: 8px; padding: 10px 12px; }
.kt-clicks li::before { content: counter(kt); flex: none; width: 24px; height: 24px; border-radius: 50%; background: #14223b; color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.kt-watch { margin: 0; padding-inline-start: 20px; font-size: 13.5px; line-height: 1.6; color: #6b4b00; }
.kt-result { margin-top: 16px; background: #ecfdf3; border: 1px solid #b7ebc9; color: #14532d; padding: 10px 14px; border-radius: 8px; font-size: 14px; }
.kt-acts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line, #e6e9ef); }
.kt-nextprev { display: flex; justify-content: space-between; margin-top: 14px; }
.kt-page[lang=ar] { font-family: Tajawal, 'Segoe UI', Tahoma, Arial, sans-serif; }
.kalil-train-link { display: flex; gap: 8px; align-items: center; margin: 8px 0 4px; padding: 8px 10px; border-radius: 8px; background: #fdecec; color: #b3121a; font-weight: 600; font-size: 13px; text-decoration: none; }
.kalil-coach { position: fixed; left: 16px; bottom: 16px; z-index: 940; display: flex; gap: 10px; align-items: center; background: #fff; border: 1px solid #e3e7ee; border-radius: 12px; box-shadow: 0 10px 30px rgba(16, 27, 45, .18); padding: 8px 10px; max-width: calc(100vw - 32px); flex-wrap: wrap; }
.kalil-coach[dir=rtl] { left: auto; right: 16px; }
.kalil-coach-t { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; max-width: 300px; }
.kalil-coach-t small { color: var(--muted); font-size: 11px; }
.kalil-coach-t b { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kalil-coach .mentor-link { font-size: 12px; }
.kalil-coach-panel { top: auto; bottom: 86px; left: 16px; right: auto; }
.kalil-coach-panel[dir=rtl] { left: auto; right: 16px; }
@media (max-width: 900px) { .kt-grid { grid-template-columns: 1fr; } .kt-nav { position: static; max-height: none; } .kt-step { padding: 16px; } }
.kalil-coach .mentor-x { background: #f1f3f6; color: #374151; width: 26px; height: 26px; font-size: 18px; }
.kt-head .mentor-lang { background: #f1f3f6; }
.kt-head .mentor-lang button { color: #374151; }
.kt-head .mentor-lang button.on { background: #14223b; color: #fff; }
.kalil-coach-panel { max-height: calc(100vh - var(--top-h, 64px) - 110px); }
.kalil-coach-panel .mentor-head h3 { font-size: 18px; line-height: 1.2; }
/* v1.87 — téléphone : nouveau conseil signalé par un halo (pas d'ouverture plein écran) ; pied de fiche qui passe à la ligne */
.mentor-fab.mentor-fab-new { animation: mentorNew 1.6s ease-in-out infinite; }
@keyframes mentorNew { 0%, 100% { box-shadow: 0 0 0 0 rgba(215,20,27,.55); } 50% { box-shadow: 0 0 0 9px rgba(215,20,27,0); } }
@media (max-width: 760px) {
  .mentor-foot { flex-wrap: wrap; }
  .mentor-foot > * { min-width: 0; }
  .mentor-foot .btn { flex: 1 1 auto; white-space: normal; }
  .mentor-card { max-height: calc(100vh - 140px); }
}
