/* ============================================================
   EDUCOJEUX - Tooltips B2G
   ============================================================ */

.educojeux-help {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: help;
    outline: none;
}

.educojeux-help-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #f0f4ff;
    color: #000091;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.educojeux-help:hover .educojeux-help-icon,
.educojeux-help:focus .educojeux-help-icon,
.educojeux-help.is-open .educojeux-help-icon {
    background: #000091;
    color: #fff;
}

.educojeux-help-bubble {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    width: 280px;
    max-width: calc(100vw - 32px);
    padding: 12px 14px;
    background: #1a1a2e;
    color: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    font-size: 0.85rem;
    line-height: 1.45;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.16s ease, visibility 0.16s ease;
    z-index: 1000;
    pointer-events: none;
}

.educojeux-help-bubble strong {
    display: block;
    margin-bottom: 4px;
    color: #ffd54f;
    font-weight: 600;
    font-size: 0.9rem;
}

.educojeux-help-bubble::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #1a1a2e;
}

.educojeux-help:hover .educojeux-help-bubble,
.educojeux-help:focus .educojeux-help-bubble,
.educojeux-help.is-open .educojeux-help-bubble {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

/* Repositionnement à droite si trop près du bord gauche */
.educojeux-help.educojeux-help--right .educojeux-help-bubble {
    left: 0;
    transform: translateX(0);
}
.educojeux-help.educojeux-help--right .educojeux-help-bubble::after {
    left: 16px;
    transform: none;
}

/* --- Auto-injection sur les labels WC checkout : ⓘ après le texte du label --- */
.educojeux-help--inline {
    margin-left: 4px;
    vertical-align: middle;
}

@media (max-width: 640px) {
    /* Sur mobile, la bulle peut sortir de l'écran : on la centre */
    .educojeux-help-bubble {
        width: 260px;
        font-size: 0.82rem;
    }
}
