/* ============================================================
   INDEX / PORTAIL BMPM - Styles spécifiques à la page d'accueil
   ============================================================ */

@media (max-width: 640px) {
    main {
        padding-top: 1rem;
    }
}

@media (hover: none) and (pointer: coarse) {
    a.group:active {
        transform: scale(0.98);
    }
}

html {
    scroll-behavior: smooth;
}

section h2 {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
}

* {
    -webkit-tap-highlight-color: transparent;
}

/* Carte module avec étoile favori */
.module-card {
    position: relative;
}
.module-favori-star {
    position: absolute;
    top: 0.0rem;
    right: 0.0rem;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 0.375rem;
    color: #94a3b8;
    transition: color 0.15s, transform 0.15s;
    z-index: 1;
}
.module-favori-star:hover {
    color: #f59e0b;
    transform: scale(1.1);
}
.module-favori-star.is-favori {
    color: #f59e0b;
}
.module-favori-star svg {
    width: 1.25rem;
    height: 1.25rem;
}

/* Sections thème repliables (sauf Favoris) */
.theme-section--collapsible .theme-section-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    text-align: left;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    margin-bottom: 1rem;
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
}
.theme-section--collapsible .theme-section-toggle:hover {
    opacity: 0.9;
}
.theme-section-chevron {
    margin-left: auto;
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}
.theme-section--collapsible.is-collapsed .theme-section-chevron {
    transform: rotate(-90deg);
}
.theme-section-body {
    overflow: hidden;
    transition: opacity 0.2s ease;
}
.theme-section--collapsible.is-collapsed .theme-section-body {
    display: none;
}
