.ypa-wrap {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    overflow: visible;
}

/* La vue grille horaire reste dans le HTML pour compatibilité,
   mais le design "par jour" est désormais utilisé sur tous les écrans. */
.ypa-grid {
    display: none !important;
}

.ypa-mobile {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.ypa-mobile-day {
    overflow: hidden;
    width: 100%;
    min-width: 0;
    border: 1px solid rgba(49,39,30,.14);
    border-radius: 16px;
    background: #f9f6f1;
    box-sizing: border-box;
}

.ypa-mobile-day h3 {
    margin: 0;
    padding: .9rem 1rem;
    background: #31271e;
    color: #fff;
    font-size: .95rem;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.ypa-mobile-courses {
    display: grid;
    grid-template-columns: 1fr;
    gap: .65rem;
    padding: .75rem;
    box-sizing: border-box;
}

.ypa-mobile-course {
    display: grid;
    grid-template-columns: 6rem minmax(0, 1fr);
    gap: .15rem .8rem;
    align-items: start;
    min-width: 0;
    padding: .85rem;
    border-radius: 11px;
    background: #e29865;
    color: #31271e;
    text-decoration: none;
    box-shadow: 0 3px 10px rgba(49,39,30,.1);
    cursor: pointer;
    box-sizing: border-box;
}

.ypa-mobile-course:hover {
    color: #31271e;
    transform: translateY(-1px);
}

.ypa-mobile-course:focus-visible {
    outline: 3px solid #918e67;
    outline-offset: 2px;
}

.ypa-mobile-time {
    grid-row: 1 / span 2;
    font-size: .78rem;
    font-weight: 700;
    white-space: nowrap;
}

.ypa-mobile-course strong {
    min-width: 0;
    font-size: .86rem;
    line-height: 1.25;
}

.ypa-mobile-course small {
    min-width: 0;
    font-size: .74rem;
    opacity: .78;
}

.ypa-mobile-empty {
    margin: 0;
    padding: .2rem .1rem;
    color: #7b736c;
    font-size: .8rem;
}

.ypa-admin-note {
    padding: .75rem 1rem;
    background: #fff4d6;
    border: 1px solid #e4c46b;
}

@media (min-width: 768px) {
    .ypa-mobile {
        gap: 1.25rem;
    }

    .ypa-mobile-day h3 {
        padding: 1rem 1.15rem;
        font-size: 1rem;
    }

    .ypa-mobile-courses {
        padding: 1rem;
        gap: .75rem;
    }

    .ypa-mobile-course {
        grid-template-columns: 7rem minmax(0, 1fr);
        padding: 1rem;
    }

    .ypa-mobile-time {
        font-size: .82rem;
    }

    .ypa-mobile-course strong {
        font-size: .92rem;
    }

    .ypa-mobile-course small {
        font-size: .78rem;
    }
}
