/* D199 — LE MICRO FLOTTANT ET LES BOUTONS DE L'APPAREIL PHOTO.
   Chargé dans l'espace équipe ET dans le portail : rien ici ne compte sur
   equipe.css ni sur portail.css (les couleurs ont leur valeur de repli).

   Le micro flottant est posé par dictee.js au coin d'un champ quand on y
   entre. Il est en position fixe, hors de la page : il ne pousse rien,
   n'entre dans aucune grille, ne décale aucune cellule. */

.mic-flottant {
    position: fixed;
    z-index: 2147483000;
    top: 0;
    left: 0;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    margin: 0;
    padding: 0;
    border: 1px solid var(--bord, #D1D5DB);
    border-radius: 50%;
    background: var(--paper, #FFFFFF);
    color: var(--vp-texte, #111111);
    box-shadow: 0 2px 8px rgba(11, 18, 32, .16);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.mic-flottant[hidden] { display: none; }

.mic-flottant:hover,
.mic-flottant:focus-visible {
    border-color: var(--vp-fonce, #C9951B);
    color: var(--vp-fonce, #C9951B);
    outline: none;
}

/* Sur un écran tactile, une cible de 30 px est petite : la zone qu'on
   touche déborde du rond sans le grossir à l'œil. */
@media (pointer: coarse) {
    .mic-flottant::after {
        content: "";
        position: absolute;
        inset: -8px;
        border-radius: 50%;
    }
}

/* En dictée : rouge, et un pouls. Un micro ouvert qui ne se voit pas,
   c'est une conversation qui part au bureau. */
.mic-flottant.dicte {
    background: #C62828;
    border-color: #C62828;
    color: #FFFFFF;
    animation: mic-flottant-pouls 1.4s ease-in-out infinite;
}

@keyframes mic-flottant-pouls {
    0%, 100% { box-shadow: 0 0 0 0 rgba(198, 40, 40, .45); }
    50%      { box-shadow: 0 0 0 7px rgba(198, 40, 40, 0); }
}

@media (prefers-reduced-motion: reduce) {
    .mic-flottant.dicte { animation: none; }
}

/* Le mot discret quand le micro est refusé (champ sans bouton permanent). */
.dictee-avis {
    position: fixed;
    z-index: 2147483001;
    left: 16px;
    right: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    max-width: 480px;
    margin: 0 auto;
    padding: 10px 14px;
    border-radius: 10px;
    background: #111111;
    color: #FFFFFF;
    font-size: 14px;
    line-height: 1.35;
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity .2s, transform .2s;
}

.dictee-avis.on {
    opacity: 1;
    transform: none;
}

/* ── L'appareil photo, à côté d'un champ de fichiers (tactile) ── */

.camera-boutons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 6px 0;
    max-width: 100%;
}

.camera-bouton {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 40px;
    padding: 6px 12px;
    border: 1px solid var(--bord, #D1D5DB);
    border-radius: 999px;
    background: var(--paper, #FFFFFF);
    color: var(--vp-texte, #111111);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    touch-action: manipulation;
}

.camera-bouton:active { background: var(--champ, #F8FAFC); }

.camera-bouton svg { flex: none; }

.camera-avis {
    flex-basis: 100%;
    font-size: 13px;
    color: #C62828;
}

.camera-avis[hidden] { display: none; }
