/* Repères invisibles mais cliquables devant les personnages réels de la scène 3D.
   Un petit libellé apparaît au survol et au focus clavier. */
.team-target-layer { position:absolute; inset:0; z-index:4; pointer-events:none; overflow:hidden; }
.team-character-target {
  position:absolute; transform:translate(-50%,-50%);
  width:88px; height:96px; padding:0;
  border:1px solid transparent; border-radius:45% 45% 32% 32%;
  background:transparent; outline-offset:3px;
  color:#fff; cursor:pointer; pointer-events:auto;
  -webkit-tap-highlight-color:transparent;
}
.team-character-target[hidden] { display:none!important; }
.team-character-target span {
  position:absolute; bottom:-14px; left:50%;
  transform:translate(-50%,5px);
  display:block; padding:5px 9px; white-space:nowrap;
  border:1px solid #d5f0cb64; border-radius:10px;
  background:#143c36e8; color:#efffec;
  font:700 11px/1.4 system-ui,sans-serif;
  opacity:0; transition:opacity .16s,transform .16s;
  pointer-events:none; box-shadow:0 8px 24px #001d1b80;
}
.team-character-target:hover,
.team-character-target:focus-visible {
  border-color:#cef4bd90;
  background:radial-gradient(ellipse,#b7e6a11d,transparent 75%);
}
.team-character-target:hover span,
.team-character-target:focus-visible span { opacity:1; transform:translate(-50%,0); }
.team-character-target:focus-visible { outline:2px solid #d0f3bd; }

/* Bulle de dialogue : à côté du collègue après un déplacement de caméra. */
.team-intro[hidden] { display:none!important; }
.team-intro {
  position:absolute; z-index:12;
  top:34%; bottom:auto;
  left:calc(50% + 138px); right:auto;
  width:min(350px,calc(50vw - 158px)); min-width:255px;
  padding:22px 23px 18px;
  border:1px solid #cdeac278; border-radius:23px;
  background:linear-gradient(145deg,#143d39f5,#102f34f8);
  color:#f5fff2;
  box-shadow:0 25px 68px #031d258c,inset 0 1px #ffffff1f;
  backdrop-filter:blur(17px);
  animation:team-intro-in .27s ease-out both;
}
.team-intro::before {
  content:""; position:absolute; top:49px; left:-10px;
  width:19px;height:19px; background:#153b39;
  border-left:1px solid #cdeac278; border-bottom:1px solid #cdeac278;
  transform:rotate(45deg);
}
.team-intro[data-side="left"] { left:calc(50% - 490px); }
.team-intro[data-side="left"]::before {
  left:auto;right:-10px;transform:rotate(225deg);
}
.team-intro-top { display:flex; gap:12px; align-items:center; }
.team-intro-avatar {
  flex:none;width:54px;height:54px;border-radius:17px;
  display:grid;place-items:center;
  background:linear-gradient(150deg,#d9f2ae,#d7caa0);color:#174439;
  font:850 26px/1 system-ui,sans-serif;
}
.team-intro-identity { flex:1;min-width:0; }
.team-intro-kicker {font:800 9px/1.3 system-ui,sans-serif;letter-spacing:1.25px;color:#bbe6b6;text-transform:uppercase;}
.team-intro-identity h2 {font:850 23px/1.2 system-ui,sans-serif;margin:4px 0 2px;}
.team-intro-role {font:600 12px/1.4 system-ui,sans-serif;color:#c9e6d2;}
.team-intro-close {
  align-self:start;flex:none;width:32px;height:32px;cursor:pointer;
  background:#ffffff1f;color:#fff;border:1px solid #ffffff3f;
  border-radius:10px;font-size:24px;line-height:1;
}
.team-intro-close:hover,.team-intro-close:focus-visible {background:#ffffff38;outline-color:#cbefb8;}
.team-intro-summary {margin:16px 0 18px;font:450 14px/1.7 system-ui,sans-serif;color:#f1f9ee;}
.team-intro-actions {display:flex;justify-content:flex-end;border-top:1px solid #ffffff2b;padding-top:12px;}
.team-intro-back {
  background:#c9eeb5; color:#1a4638; border:0; border-radius:11px;
  font:800 12px/1.4 system-ui,sans-serif;padding:10px 14px;
  cursor:pointer;
}
.team-intro-back:hover,.team-intro-back:focus-visible {background:#e2ffd0;outline-color:#fff;}
@keyframes team-intro-in {from {opacity:0;transform:translateY(12px) scale(.97)}to {opacity:1;transform:none}}
@media (max-width:980px) and (min-width:761px) {
 .team-intro {left:calc(50% + 68px); min-width:245px; padding:17px;width:calc(50vw - 94px);}
 .team-intro[data-side="left"] {left:28px;}
}
@media (max-width:760px) {
 .team-character-target {width:68px;height:90px;}
 .team-intro,.team-intro[data-side="left"] {
   left:12px;right:12px;top:auto;bottom:calc(165px + env(safe-area-inset-bottom,0px));
   width:auto;min-width:0;max-height:calc(100dvh - 280px);overflow-y:auto;
   padding:16px 18px;border-radius:18px;
 }
 .team-intro::before {display:none;}
 .team-intro-identity h2 {font-size:20px;}
 .team-intro-summary {font-size:12px;line-height:1.55;margin:11px 0;}
 .team-intro-avatar {width:44px;height:44px;font-size:21px;}
 .team-intro-back {padding:8px 12px;}
}
@media(prefers-reduced-motion:reduce){.team-intro{animation:none}.team-character-target span{transition:none}}

/* Un petit choix alternatif apparaît en mode "Voir l'équipe" sur mobile, pour les
   collègues qui ne sont pas dans le champ de la caméra. */
.team-visit-roster[hidden] {display:none!important;}
.team-visit-roster {
  position:absolute;z-index:7;right:clamp(20px,3.5vw,64px);top:218px;
  max-width:min(505px,calc(100vw - 36px));
  display:flex;justify-content:flex-end;align-items:center;flex-wrap:wrap;gap:6px;
  padding:9px 10px;border:1px solid #bce3ad59;border-radius:15px;
  background:#123937e5;backdrop-filter:blur(12px);
  box-shadow:0 12px 32px #001c2070;
}
.team-visit-roster>span {font:800 10px/1.2 system-ui,sans-serif;color:#c7e9c1;margin-right:4px;}
.team-visit-roster>button {
  border:1px solid #d3e9c64a;border-radius:10px;cursor:pointer;
  padding:7px 9px;background:#ffffff13;color:#f2ffee;
  font:700 11px/1.2 system-ui,sans-serif;
}
.team-visit-roster>button:hover,.team-visit-roster>button:focus-visible {background:#d2f0bf;color:#163e35;outline-color:white;}
@media(max-width:760px){
 .team-visit-roster {top:177px;left:9px;right:9px;max-width:none;justify-content:center;padding:7px;gap:4px;}
 .team-visit-roster>span {width:100%;text-align:center;font-size:9px;}
 .team-visit-roster>button {padding:7px 8px;font-size:10px;}
}

/* Maya : une petite interface réelle de connexion, incluse dans sa présentation.
   Les actions passent par les formulaires OAuth sécurisés déjà existants. */
.team-intro[data-role="social"] {
  top:17%;bottom:auto;max-height:min(505px,calc(100dvh - 270px));overflow-y:auto;
  scrollbar-width:thin;scrollbar-color:#9cceb487 transparent;
}
.team-intro[data-role="social"] .team-intro-actions {position:sticky;bottom:-18px;padding:10px 0 0;background:#102f34;z-index:1;}
.maya-connections[hidden] {display:none!important;}
.maya-connections {margin:16px 0 0;border-top:1px solid #ffffff31;padding-top:14px;}
.maya-heading {display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:7px;}
.maya-heading-title {font:800 14px/1.3 system-ui,sans-serif;color:#f2ffed;}
.maya-refresh {background:transparent;color:#c6eab8;cursor:pointer;border:0;text-decoration:underline;font:650 10px/1.2 system-ui,sans-serif;}
.maya-connection-message {font:500 11px/1.4 system-ui,sans-serif;color:#d6e8d8;margin:5px 0 11px;}
.maya-platform-list {display:grid;gap:7px;}
.maya-provider-form {
  display:flex;align-items:center;justify-content:space-between;gap:9px;
  background:#ffffff0e;border:1px solid #ffffff2e;border-radius:12px;
  padding:9px 10px;
}
.maya-provider-info {display:flex;flex-direction:column;gap:4px;min-width:0;}
.maya-provider-info strong {font:750 12px/1.3 system-ui,sans-serif;color:#f0fff0;}
.maya-provider-info span {font:500 10px/1.25 system-ui,sans-serif;color:#c2d7cc;}
.maya-provider-form button {
  border:0;border-radius:9px;padding:8px 11px;min-width:91px;
  color:#173c32;background:#c8eab3;cursor:pointer;
  font:750 11px/1.2 system-ui,sans-serif;
}
.maya-provider-form button:hover:not(:disabled) {background:#dffccd;}
.maya-provider-form button:disabled {opacity:.6;cursor:not-allowed;}
.maya-provider-note {font:500 10px/1.45 system-ui,sans-serif;color:#b7d0c0;margin:12px 0 0;}
@media(max-width:760px) {
 .team-intro[data-role="social"],.team-intro[data-role="social"][data-side="left"] {
    top:auto;bottom:calc(165px + env(safe-area-inset-bottom,0px));
    max-height:calc(100dvh - 330px);overflow-y:auto;
 }
 .team-intro[data-role="social"] .team-intro-summary {font-size:11px;line-height:1.45;}
 .maya-connections {margin-top:10px;padding-top:9px;}
 .maya-platform-list {gap:5px;}
 .maya-provider-form {padding:7px 8px;}
}

/* Salle de réunion temporairement retirée du bureau visuel ; les missions et dossiers restent intacts. */
.nexus-meeting-launch { display:none!important; }

/* Dialogues follow the projected 3D mouth; the panel remains beside the face,
   never drawn on top of the character or the computer monitor. */
@media (min-width:761px) {
  .team-intro[data-anchor="mouth"] {
    right:auto;bottom:auto;
    min-width:0;max-width:320px;
    max-height:min(440px,calc(100dvh - 245px));
    overflow-y:auto;scrollbar-width:thin;
    padding:16px 18px 14px;
    border-radius:19px;
    animation:team-intro-in .18s ease-out both;
  }
  .team-intro[data-anchor="mouth"]::before {
    content:"";top:var(--speech-tail-top,47px);
    left:calc(-1 * var(--speech-line-length,26px));
    right:auto;width:var(--speech-line-length,26px);height:2px;
    background:#bcefc4;transform:none;
    border:0;box-shadow:0 1px 8px #021f1e;
    border-radius:2px;
  }
  .team-intro[data-anchor="mouth"][data-side="left"]::before {
    left:auto;right:calc(-1 * var(--speech-line-length,26px));transform:none;
  }
  .team-intro[data-anchor="mouth"]::after {
    content:"";position:absolute;
    top:calc(var(--speech-tail-top,47px) - 5px);
    left:calc(-1 * var(--speech-line-length,26px) - 5px);
    width:11px;height:11px;border-radius:50%;
    background:#d6f7c7;box-shadow:0 0 0 3px #26544b88;
  }
  .team-intro[data-anchor="mouth"][data-side="left"]::after {
    left:auto;right:calc(-1 * var(--speech-line-length,26px) - 5px);
  }
  .team-intro[data-anchor="mouth"] .team-intro-avatar {
    width:37px;height:37px;font-size:17px;border-radius:12px;
  }
  .team-intro[data-anchor="mouth"] .team-intro-top {gap:9px}
  .team-intro[data-anchor="mouth"] .team-intro-identity h2 {font-size:19px}
  .team-intro[data-anchor="mouth"] .team-intro-summary {
    margin:10px 0 12px;font-size:12px;line-height:1.53;
  }
  .team-intro[data-anchor="mouth"] .team-intro-actions {padding-top:9px}
  .team-intro[data-anchor="mouth"][data-role="social"] {
    bottom:auto;max-height:min(440px,calc(100dvh - 245px));
  }
}
/* In portrait mode keep the text readable while preserving the top half
   of the camera view for faces. The tail is omitted where space is insufficient. */
@media (max-width:760px) {
  .team-intro[data-anchor="compact"] {
    top:auto;bottom:calc(165px + env(safe-area-inset-bottom,0px));
    max-height:min(280px,calc(100dvh - 365px));
  }
  .team-intro[data-anchor="compact"][data-role="social"] {
    top:auto;bottom:calc(165px + env(safe-area-inset-bottom,0px));
    max-height:min(310px,calc(100dvh - 340px));
  }
}

.ines-actions[hidden]{display:none!important}
.ines-actions{margin-top:12px}
.ines-ads-open{width:100%;border:0;border-radius:11px;padding:12px 14px;
 background:#c8eab3;color:#173c32;cursor:pointer;text-align:center;
 font:750 12px/1.35 system-ui,sans-serif}
.ines-ads-open:hover,.ines-ads-open:focus-visible{background:#e0f6d1;outline:2px solid #fff8}
@media(max-width:760px){.team-intro[data-anchor="compact"][data-role="ads"]{
 max-height:min(310px,calc(100dvh - 340px));overflow-y:auto;}}

/* A lightweight leader is drawn outside the scrollable dialogue, so it remains
   visible even when the longer Maya connections view scrolls. */
.team-speech-leader {
  position:fixed;z-index:11;pointer-events:none;transform-origin:0 50%;
  height:2px;background:linear-gradient(90deg,#dbffd0aa,#bbe5c4);
  box-shadow:0 1px 7px #031d1f55;border-radius:2px;
}
.team-speech-leader[hidden]{display:none!important}
.team-speech-leader::before {
  content:"";position:absolute;left:-3px;top:-3px;
  width:8px;height:8px;border-radius:50%;
  background:#e0ffcf;box-shadow:0 0 0 3px #1c4d4780;
}
@media(min-width:761px){
  .team-intro[data-anchor="mouth"]{box-sizing:border-box;overflow-x:hidden}
  .team-intro[data-anchor="mouth"]::before,
  .team-intro[data-anchor="mouth"]::after{display:none!important}
}

/* Every colleague has the same unmistakable next-action button. */
.team-primary-action:not([hidden]){display:block;width:100%;margin:12px 0 6px;padding:13px 15px;min-height:46px;background:#d9f2c6;color:#14382d;border:0;border-radius:10px;font:800 14px/1.35 system-ui,Arial,sans-serif;cursor:pointer;text-align:center}
.team-primary-action:focus-visible{outline:3px solid #fff;outline-offset:3px}
