/* ============================================================
   EDUCOJEUX - Widget support flottant
   Desktop : bouton bas-droite qui ouvre un panneau au clic.
   Mobile  : barre fixe en bas (téléphone) + bouton flottant.
   ============================================================ */

.educojeux-support {
    position: fixed;
    bottom: 22px;
    right: 22px;
    z-index: 9998;
}

/* --- Bouton déclencheur --- */
.educojeux-support__trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #000091;
    border: none;
    border-radius: 999px;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 145, 0.32);
    transition: all 0.18s ease;
}

.educojeux-support__trigger:hover {
    background: #000074;
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(0, 0, 145, 0.42);
}

.educojeux-support__trigger-icon {
    font-size: 1.3rem;
    line-height: 1;
}

/* Cache le bouton trigger quand le panneau est ouvert */
.educojeux-support[data-open="true"] .educojeux-support__trigger {
    display: none;
}

/* --- Panneau ouvert --- */
.educojeux-support__panel {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 340px;
    max-width: calc(100vw - 28px);
    background: #fff;
    border: 1px solid #d8def0;
    border-radius: 12px;
    padding: 20px 18px 16px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
    animation: educojeux-support-slide-in 0.22s ease both;
}

@keyframes educojeux-support-slide-in {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.educojeux-support__close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #f0f4ff;
    border: none;
    color: #000091;
    font-size: 1rem;
    cursor: pointer;
    line-height: 1;
}

.educojeux-support__close:hover {
    background: #000091;
    color: #fff;
}

.educojeux-support__title {
    margin: 0 30px 4px 0;
    color: #000091;
    font-size: 1.15rem;
    font-weight: 700;
}

.educojeux-support__lede {
    margin: 0 0 16px;
    color: #475467;
    font-size: 0.88rem;
    line-height: 1.4;
}

/* --- Actions --- */
.educojeux-support__action {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    margin-bottom: 8px;
    background: #f9fafc;
    border: 1px solid #e5e8ef;
    border-radius: 8px;
    color: #1a1a2e;
    text-decoration: none;
    transition: all 0.16s ease;
}

.educojeux-support__action:hover {
    border-color: #000091;
    background: #f0f4ff;
    transform: translateX(2px);
    text-decoration: none;
    color: #1a1a2e;
}

.educojeux-support__action--call:hover {
    background: #ecfdf5;
    border-color: #2e7d32;
}

.educojeux-support__action--meet:hover {
    background: #fff7ed;
    border-color: #c2410c;
}

.educojeux-support__action-icon {
    flex-shrink: 0;
    font-size: 1.5rem;
    line-height: 1;
}

.educojeux-support__action-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.educojeux-support__action-body strong {
    color: #1a1a2e;
    font-size: 0.92rem;
    font-weight: 600;
}

.educojeux-support__action-body span {
    color: #475467;
    font-size: 0.86rem;
}

.educojeux-support__action-body small {
    color: #93a0b3;
    font-size: 0.76rem;
    margin-top: 2px;
}

/* --- Barre mobile sticky bottom --- */
.educojeux-support__mobile-bar {
    display: none;
}

@media (max-width: 640px) {
    /* Sur mobile : on rend le bouton trigger plus rond/compact et on ajoute une vraie barre du bas */
    .educojeux-support {
        bottom: 76px; /* place pour la barre mobile en dessous */
        right: 14px;
    }
    .educojeux-support__trigger-label {
        display: none; /* compact : juste l'icône */
    }
    .educojeux-support__trigger {
        width: 56px;
        height: 56px;
        padding: 0;
        justify-content: center;
    }
    .educojeux-support__trigger-icon {
        font-size: 1.6rem;
    }

    /* Barre fixe en bas avec le téléphone — action #1 sur mobile */
    .educojeux-support__mobile-bar {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 9997;
        background: #000091;
        color: #fff;
        text-decoration: none;
        padding: 14px 18px;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        font-size: 0.95rem;
        font-weight: 600;
        box-shadow: 0 -4px 14px rgba(0, 0, 0, 0.12);
    }

    .educojeux-support__mobile-bar:hover,
    .educojeux-support__mobile-bar:focus {
        color: #fff;
        background: #000074;
        text-decoration: none;
    }

    .educojeux-support__mobile-bar strong {
        font-size: 1.05rem;
        letter-spacing: 0.3px;
    }

    /* Le panneau s'ouvre en plein-écran modal sur mobile */
    .educojeux-support__panel {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-width: 100%;
        border-radius: 16px 16px 0 0;
        padding: 22px 18px 20px;
    }
}
