/*
|--------------------------------------------------------------------------
| Planning public moderne
|--------------------------------------------------------------------------
*/

.public-schedule-page {
    background:
        radial-gradient(circle at 12% 8%, rgba(196,154,74,.07), transparent 22rem),
        #f7f2e9;
}

.public-page-hero--schedule {
    background:
        radial-gradient(circle at 82% 20%, rgba(221,183,111,.18), transparent 24rem),
        linear-gradient(135deg, #063f38 0%, #0a554c 58%, #0e665a 100%);
}

.public-schedule-content {
    padding-top: clamp(2.5rem, 5vw, 4.5rem);
    padding-bottom: clamp(3.5rem, 7vw, 6rem);
}

.public-schedule-section + .public-schedule-section {
    margin-top: clamp(3rem, 6vw, 5rem);
}

.public-schedule-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.25rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.public-schedule-heading__badges {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .55rem;
    flex-wrap: wrap;
}

.public-status-pill {
    display: inline-flex;
    align-items: center;
    gap: .42rem;
    min-height: 34px;
    padding: .4rem .7rem;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 800;
    white-space: nowrap;
}

.public-status-pill--success {
    color: #326451;
    background: #e8f2ed;
    border: 1px solid #c6ded1;
}

.public-status-pill--warning {
    color: #8b621a;
    background: #fff3d9;
    border: 1px solid #ecd49d;
}

.public-status-pill--gold {
    color: #79571b;
    background: #f7ead0;
    border: 1px solid #dfc68f;
}

.public-status-pill--muted {
    color: #5e625d;
    background: #f1eee8;
    border: 1px solid #ddd7cd;
}

.public-schedule-card,
.public-registration-card {
    overflow: hidden;
    background: rgba(255,253,248,.96);
    border: 1px solid #ded4c4;
    border-radius: 22px;
    box-shadow: 0 18px 55px rgba(49,42,31,.08);
}

.public-schedule-table-wrap {
    overflow: auto;
    scrollbar-width: thin;
}

.public-schedule-table {
    width: 100%;
    min-width: 1080px;
    margin: 0;
    border-collapse: separate;
    border-spacing: 0;
}

.public-schedule-table th,
.public-schedule-table td {
    padding: 1rem;
    color: #33423d;
    text-align: center;
    vertical-align: middle;
    border-right: 1px solid #e8e0d4;
    border-bottom: 1px solid #e8e0d4;
}

.public-schedule-table thead th {
    position: sticky;
    top: 0;
    z-index: 4;
    color: #17483f;
    background: #f3eadc;
    font-size: .78rem;
    font-weight: 900;
    letter-spacing: .03em;
}

.public-schedule-table tbody tr:last-child td {
    border-bottom: 0;
}

.public-schedule-table th:last-child,
.public-schedule-table td:last-child {
    border-right: 0;
}

.public-schedule-table td {
    min-width: 140px;
    height: 108px;
    background: #fffdf8;
}

.public-schedule-table td.has-course {
    background:
        radial-gradient(circle at 85% 15%, rgba(77,128,108,.09), transparent 8rem),
        #f9fcfa;
}

.public-schedule-table td.has-course--ramadan {
    background:
        radial-gradient(circle at 85% 15%, rgba(200,147,49,.10), transparent 8rem),
        #fffaf0;
}

.public-schedule-time-col {
    position: sticky;
    left: 0;
    z-index: 3;
    width: 190px;
    min-width: 190px !important;
    text-align: left !important;
    background: #f7f0e4 !important;
    box-shadow: 10px 0 20px rgba(54,47,35,.04);
}

.public-schedule-table thead .public-schedule-time-col {
    z-index: 5;
}

.public-schedule-time-col strong,
.public-schedule-time-col small {
    display: block;
}

.public-schedule-time-col strong {
    color: #173f37;
    font-size: .9rem;
    font-weight: 900;
}

.public-schedule-time-col small {
    margin-top: .28rem;
    color: #7a7d77;
    font-size: .7rem;
    line-height: 1.45;
}

.public-schedule-time-col small span {
    display: block;
    margin-top: .25rem;
}

.public-time-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    min-width: 118px;
    padding: .48rem .72rem;
    color: #2f6654;
    background: #e7f2ed;
    border: 1px solid #c7ded2;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 850;
    white-space: nowrap;
}

.public-time-pill--ramadan {
    color: #865d18;
    background: #fff0cf;
    border-color: #ecd49f;
}

.public-schedule-empty {
    color: #c6c0b7;
}

.public-old-schedule {
    display: block;
    margin-top: .5rem;
    color: #8a8175;
    font-size: .68rem;
}

.public-schedule-note {
    display: flex;
    align-items: flex-start;
    gap: .8rem;
    margin: 1rem;
    padding: 1rem;
    color: #73591e;
    background: #fff4dc;
    border: 1px solid #edd5a2;
    border-radius: 15px;
}

.public-schedule-note__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    color: #9b6c16;
    background: rgba(255,255,255,.65);
    border-radius: 12px;
}

.public-schedule-note strong {
    color: #694b14;
}

.public-schedule-note p {
    margin-top: .2rem;
    line-height: 1.6;
}

.public-registration-card {
    padding: clamp(1rem, 2vw, 1.5rem);
}

.public-registration-alert {
    display: flex;
    align-items: flex-start;
    gap: .9rem;
    padding: 1rem;
    color: #2e5f50;
    background: #edf6f1;
    border: 1px solid #cce1d6;
    border-radius: 16px;
}

.public-registration-alert__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    color: #2f6654;
    background: #fff;
    border-radius: 13px;
    box-shadow: 0 6px 20px rgba(40,85,70,.08);
}

.public-registration-alert strong {
    color: #245144;
}

.public-registration-alert strong span {
    color: #a77922;
}

.public-registration-alert p {
    margin-top: .25rem;
    color: #647069;
    line-height: 1.55;
}

.public-rate-card {
    height: 100%;
    padding: 1rem;
    background: #fffdf8;
    border: 1px solid #e1d7c7;
    border-radius: 17px;
}

.public-rate-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .9rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.public-rate-card__header > div {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
}

.public-rate-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    color: #2f6654;
    background: #e8f2ed;
    border: 1px solid #c8dfd3;
    border-radius: 13px;
}

.public-rate-card__icon--gold {
    color: #8b621a;
    background: #fff1d5;
    border-color: #ecd49d;
}

.public-rate-card h3 {
    margin: 0;
    color: #173f37;
    font-size: .95rem;
    font-weight: 900;
}

.public-rate-card h3 small {
    display: block;
    margin-top: .2rem;
    color: #81796e;
    font-size: .72rem;
    font-weight: 700;
}

.public-rate-card p {
    margin: .3rem 0 0;
    color: #777b76;
    font-size: .72rem;
}

.public-rate-list {
    overflow: hidden;
    border: 1px solid #e4dbcd;
    border-radius: 13px;
}

.public-rate-list__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .78rem .9rem;
    background: #fff;
    border-bottom: 1px solid #eee6da;
}

.public-rate-list__item:last-child {
    border-bottom: 0;
}

.public-rate-list__item span {
    color: #5f655f;
}

.public-rate-list__item strong {
    color: #1f5b4a;
    font-size: .95rem;
}

.public-registration-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1.25rem;
    padding-top: 1.15rem;
    border-top: 1px solid #e5dccf;
}

.public-registration-date {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    color: #777a75;
    font-size: .78rem;
}

.public-registration-date strong {
    color: #8b621a;
}

@media (max-width: 991.98px) {
    .public-schedule-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .public-schedule-heading__badges {
        justify-content: flex-start;
    }
}

@media (max-width: 767.98px) {
    .public-schedule-content {
        padding-inline: .75rem;
    }

    .public-schedule-card,
    .public-registration-card {
        border-radius: 16px;
    }

    .public-registration-footer,
    .public-registration-footer .public-btn {
        width: 100%;
    }

    .public-registration-date {
        justify-content: center;
        width: 100%;
    }

    .public-rate-card__header {
        flex-direction: column;
    }
}

/* ==========================================================
   MODAL PUBLIC — priorité d’affichage
   ========================================================== */

.modal {
    z-index: 1065 !important;
}

.modal.show {
    display: block;
}

.modal-backdrop {
    z-index: 1060 !important;
}

.modal-dialog {
    position: relative;
    z-index: 1070 !important;
}

/* Empêche les couches décoratives de passer au-dessus */
.public-page-hero,
.public-page-hero::before,
.public-page-hero::after,
.public-schedule-page,
.public-schedule-page::before,
.public-schedule-page::after {
    z-index: auto;
}

/* Les contenus publics restent sous le modal */
.public-page-hero,
.public-schedule-content,
.public-schedule-section,
.public-schedule-card,
.public-registration-card {
    position: relative;
    z-index: 1;
}