/* ============================================================
   Vimiton — styles des ÉCRANS DU MODULE uniquement.
   Refonte design 2 (13/09/2026) : la coquille et le design
   system global (barres, panneaux, boutons, formulaires, menus,
   avatars...) vivent désormais dans le THÈME
   (humhub-data/themes/Vimiton/scss/). Ici : les polices
   auto-hébergées, les jetons de marque et les classes .vmt-*
   de nos écrans (communautés, coach, vie scolaire...).
   ============================================================ */

/* ---------- Polices ----------
   Charte du 08/10/2026 : Poppins (titres) et Inter (textes),
   auto-hébergées (remplacent Baloo 2 et Nunito de la refonte 2). */

@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('../fonts/poppins-latin-600.woff2') format('woff2');
}

@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/poppins-latin-700.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/inter-latin-400.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('../fonts/inter-latin-500.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('../fonts/inter-latin-600.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/inter-latin-700.woff2') format('woff2');
}

/* ---------- Jetons de marque (utilisés par les écrans ci-dessous) ----------
   Charte graphique du 08/10/2026 (docs/charte-graphique/) : vert
   principal, terre cuite, crème, brun profond. Les NOMS des jetons ne
   changent pas (teal gardé pour l'historique du code), seules les
   VALEURS passent à la nouvelle charte. */

:root {
    /* Encre */
    --vmt-ink: #3B2F22;
    --vmt-ink-2: #5C4F49;
    --vmt-muted: #6B625A;

    /* Vert principal (marque) et ses nuances */
    --vmt-teal: #265D3A;
    --vmt-teal-bright: #74A87A;
    --vmt-teal-deep: #24402E;
    --vmt-teal-soft: #E6F0E3;
    --vmt-teal-faint: #EAF1EB;

    /* Charte : terre cuite, sable, jaune doux, erreur */
    --vmt-terracotta: #B56A3C;
    --vmt-terracotta-clair: #E8C9B4;
    --vmt-sable: #E7D7B9;
    --vmt-jaune-doux: #F6E3B4;
    --vmt-erreur: #E74C3C;

    /* Surfaces et lignes */
    --vmt-line: #E7E1D2;
    --vmt-line-strong: #D8D0BC;
    --vmt-wash: #FAF7EF;

    /* Alias noyau : des widgets de HumHub (ex. le lien « (voir tout) »
       du widget tâches) posent color:var(--info) en style en ligne ;
       on repointe cet alias sur le vert de la charte pour que le bleu
       info du noyau ne perce plus nulle part. */
    --info: var(--vmt-teal);

    /* Formes : bulle du logo = rayons généreux */
    --vmt-radius-card: 20px;
    --vmt-radius-control: 12px;

    /* Profondeur : ombres teintées vert, jamais de noir pur */
    --vmt-shadow: 0 1px 2px rgba(59, 47, 34, 0.05),
        0 6px 18px rgba(38, 93, 58, 0.08);
    --vmt-shadow-lift: 0 4px 10px rgba(59, 47, 34, 0.06),
        0 14px 34px rgba(38, 93, 58, 0.18);

    --vmt-font-display: 'Poppins', 'Trebuchet MS', sans-serif;
    --vmt-font-body: 'Inter', 'Segoe UI', sans-serif;
}

/* ---------- Feuille de page (nos écrans) ---------- */

.container[style*="max-width"] {
    background: #fff;
    border: 1px solid var(--vmt-line);
    border-radius: calc(var(--vmt-radius-card) + 6px);
    box-shadow: var(--vmt-shadow);
    padding: 2rem 2.2rem 2.4rem;
    margin-top: 1.4rem;
}

.container[style*="max-width"] h1 {
    margin-bottom: 0.2rem;
}

.container[style*="max-width"] .lead {
    color: var(--vmt-muted);
    font-size: 1.02rem;
}

/* Surligneur sous le titre : trait turquoise + double point */

.container[style*="max-width"] h1::after {
    content: '';
    display: block;
    width: 64px;
    height: 5px;
    margin-top: 0.55rem;
    border-radius: 999px;
    background:
        radial-gradient(circle at 4px 2.5px, var(--vmt-teal) 2.4px, transparent 3px),
        radial-gradient(circle at 12px 2.5px, var(--vmt-teal-bright) 2.4px, transparent 3px),
        linear-gradient(90deg, var(--vmt-teal) 22px, var(--vmt-teal-soft) 22px);
    background-size: 16px 5px, 16px 5px, 100% 5px;
    background-repeat: no-repeat;
}

.vmt-kicker {
    font-family: var(--vmt-font-display);
    font-weight: 700;
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--vmt-teal);
    margin-bottom: 0.1rem;
}

.vmt-sign {
    margin-top: 2.2rem;
    color: var(--vmt-muted);
    font-style: italic;
    font-size: 0.9rem;
}

/* ---------- PASTILLES D'ICÔNES : la bulle du logo ---------- */

.vmt-icon-disc,
.vmt-empty-disc {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    border-radius: 32%;
    background: linear-gradient(140deg, var(--vmt-teal-soft) 0%, #C4EBE5 100%);
    color: var(--vmt-teal-deep);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.vmt-icon-disc {
    width: 56px;
    height: 56px;
    font-size: 1.4rem;
    box-shadow: inset 0 0 0 2px rgba(38, 93, 58, 0.25);
}

.vmt-empty-disc {
    width: 38px;
    height: 38px;
    font-size: 0.95rem;
}

/* ============================================================
   COMMUNAUTÉS
   ============================================================ */

.vmt-section {
    margin-bottom: 1.7rem;
}

.vmt-section-title {
    margin-bottom: 0.75rem;
}

.vmt-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #fff;
    border: 1px solid var(--vmt-line-strong);
    color: var(--vmt-ink);
    border-radius: 999px;
    padding: 0.3rem 0.55rem 0.3rem 0.4rem;
    font-family: var(--vmt-font-display);
    font-weight: 700;
    font-size: 0.86rem;
}

.vmt-type-badge .fa {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 32%;
    background: linear-gradient(140deg, var(--vmt-teal-soft), #C4EBE5);
    color: var(--vmt-teal-deep);
    font-size: 0.78rem;
}

.vmt-type-badge--soft {
    color: var(--vmt-muted);
}

.vmt-type-badge--soft .fa {
    background: #EEF2F5;
    color: var(--vmt-muted);
}

.vmt-type-count {
    background: var(--vmt-teal-soft);
    color: var(--vmt-teal-deep);
    border-radius: 999px;
    font-size: 0.72rem;
    padding: 0.05rem 0.5rem;
    font-family: var(--vmt-font-body);
}

/* La grille et la CARTE communauté : la réponse au « on ne sait pas
   que c'est cliquable ». Toute la carte est un lien, le survol la lève. */

.vmt-comm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 0.9rem;
}

.vmt-comm-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 1.05rem 2.6rem 1.05rem 1.15rem;
    background: #fff;
    border: 1px solid var(--vmt-line-strong);
    border-radius: var(--vmt-radius-card);
    text-decoration: none;
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease,
        border-color 0.18s ease;
}

/* Balayage de lumière au survol (CSS pur) */
.vmt-comm-card::before {
    content: '';
    position: absolute;
    inset: -60% 55% 55% -30%;
    background: radial-gradient(closest-side, rgba(23, 189, 169, 0.16), transparent);
    opacity: 0;
    transform: translate(-30%, -30%);
    transition: opacity 0.25s ease, transform 0.4s ease;
    pointer-events: none;
}

.vmt-comm-card:hover,
.vmt-comm-card:focus-visible {
    transform: translateY(-3px);
    border-color: var(--vmt-teal);
    box-shadow: var(--vmt-shadow-lift);
    text-decoration: none;
}

.vmt-comm-card:hover::before,
.vmt-comm-card:focus-visible::before {
    opacity: 1;
    transform: translate(0, 0);
}

.vmt-comm-name {
    font-family: var(--vmt-font-display);
    font-weight: 600;
    font-size: 1.04rem;
    color: var(--vmt-ink);
    line-height: 1.25;
}

.vmt-comm-card:hover .vmt-comm-name {
    color: var(--vmt-teal-deep);
}

.vmt-comm-meta {
    color: var(--vmt-muted);
    font-size: 0.85rem;
}

/* Chevron : glisse et s'allume au survol */
.vmt-comm-arrow {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%) translateX(-4px);
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--vmt-teal);
    background: var(--vmt-teal-faint);
    opacity: 0.55;
    transition: opacity 0.18s ease, transform 0.18s ease,
        background-color 0.18s ease, color 0.18s ease;
}

.vmt-comm-card:hover .vmt-comm-arrow,
.vmt-comm-card:focus-visible .vmt-comm-arrow {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
    background: var(--vmt-teal);
    color: #fff;
}

/* Section vide : une ligne discrète, jamais un bloc */

.vmt-empty-line {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.7rem;
    border: 1.5px dashed var(--vmt-line-strong);
    border-radius: 14px;
    color: var(--vmt-muted);
    font-size: 0.92rem;
}

.vmt-empty-line a {
    color: var(--vmt-teal-deep);
    font-weight: 700;
}

.vmt-empty-line a:hover {
    color: var(--vmt-teal);
}

/* ---------- États vides génériques ---------- */

.vmt-empty {
    text-align: center;
    padding: 1.6rem 1rem;
    color: var(--vmt-muted);
}

.vmt-empty .fa {
    display: block;
    font-size: 1.6rem;
    color: var(--vmt-teal);
    margin-bottom: 0.5rem;
}

/* ---------- Cartes de rôle et cartes-choix (parcours) ---------- */

.vmt-role {
    transition: transform 0.18s ease, box-shadow 0.18s ease,
        border-color 0.18s ease;
}

.vmt-role:hover {
    transform: translateY(-3px);
    border-color: var(--vmt-teal);
    box-shadow: var(--vmt-shadow-lift);
}

.vmt-role:hover .vmt-icon-disc {
    transform: scale(1.06) rotate(-3deg);
}

.vmt-choice {
    position: relative;
    display: block;
    border: 1.5px solid var(--vmt-line-strong);
    border-radius: var(--vmt-radius-card);
    padding: 0.95rem 1.1rem;
    cursor: pointer;
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease,
        background-color 0.15s ease, transform 0.15s ease;
}

.vmt-choice:hover {
    border-color: var(--vmt-teal);
    transform: translateY(-2px);
    box-shadow: var(--vmt-shadow);
}

.vmt-choice input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.vmt-choice:has(input:checked) {
    border-color: var(--vmt-teal);
    background: var(--vmt-teal-faint);
    box-shadow: 0 0 0 3px var(--vmt-teal-soft);
}

.vmt-choice:has(input:focus-visible) {
    outline: 3px solid var(--vmt-teal-soft);
    outline-offset: 2px;
}

.vmt-choice-title {
    font-family: var(--vmt-font-display);
    font-weight: 700;
    color: var(--vmt-ink);
}

.vmt-choice-desc {
    color: var(--vmt-muted);
    font-size: 0.92rem;
}

/* ---------- Fil du coach : bulles de dialogue (comme le logo) ---------- */

.vmt-thread {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.vmt-bubble {
    max-width: 85%;
    border-radius: 18px;
    padding: 0.75rem 1.05rem;
    font-size: 0.96rem;
    line-height: 1.5;
}

.vmt-bubble-user {
    align-self: flex-end;
    background: linear-gradient(135deg, var(--vmt-ink) 0%, #12305A 100%);
    color: #F2FBFA;
    border-bottom-right-radius: 6px;
}

.vmt-bubble-coach {
    align-self: flex-start;
    background: #fff;
    border: 1px solid var(--vmt-line-strong);
    border-bottom-left-radius: 6px;
    box-shadow: var(--vmt-shadow);
}

.vmt-bubble-meta {
    font-family: var(--vmt-font-display);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--vmt-muted);
    margin-bottom: 0.2rem;
}

.vmt-bubble-coach .vmt-bubble-meta {
    color: var(--vmt-teal-deep);
}

/* ---------- Patience du coach ---------- */

.vmt-wait {
    border: 1.5px dashed var(--vmt-teal);
    background: linear-gradient(160deg, var(--vmt-teal-faint), #fff);
    border-radius: var(--vmt-radius-card);
    padding: 1.2rem 1.25rem;
    text-align: center;
}

.vmt-wait-dots {
    display: inline-flex;
    gap: 0.32rem;
    margin-bottom: 0.5rem;
}

.vmt-wait-dots span {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--vmt-teal);
    display: inline-block;
    animation: vmtPulse 1.2s ease-in-out infinite;
}

.vmt-wait-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.vmt-wait-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes vmtPulse {
    0%, 100% { opacity: 0.25; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(-3px); }
}

/* ---------- Mobile (écrans du module) ---------- */

@media (max-width: 767.98px) {
    .container[style*="max-width"] {
        padding: 1.3rem 1.1rem 1.6rem;
    }

    .vmt-icon-disc {
        width: 46px;
        height: 46px;
        font-size: 1.15rem;
    }

    .vmt-bubble {
        max-width: 100%;
    }

    .vmt-comm-grid {
        grid-template-columns: 1fr;
    }

    .vmt-comm-card {
        padding: 0.9rem 2.4rem 0.9rem 1rem;
    }
}

/* ---------- Navigation interne des modules (onglets) ----------
   Une rangée d'onglets partagée par toutes les vues d'un même module
   (partiel views/_onglets.php) : fin des allers-retours par le hub
   pour passer d'un écran à son voisin. État actif calculé côté
   serveur, même grammaire visuelle que le rail. */

.vmt-onglets {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    margin: 0 0 1.25rem;
    padding: 0;
}

.vmt-onglet {
    display: inline-block;
    padding: 7px 14px;
    border: 1px solid var(--vmt-sable);
    border-radius: var(--vmt-radius-control);
    background: #fff;
    color: var(--vmt-ink);
    font-size: 13.5px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.vmt-onglet:hover,
.vmt-onglet:focus {
    background: var(--vmt-teal-soft);
    color: var(--vmt-teal);
    text-decoration: none;
}

.vmt-onglet--actif,
.vmt-onglet--actif:hover,
.vmt-onglet--actif:focus {
    background: var(--vmt-teal);
    border-color: var(--vmt-teal);
    color: #fff;
}
