/* ── Cours Réservation — Frontend Styles ─────────────────────── */
/* Palette héritée du header */
:root {
    --cr-blue:   #0067FF;
    --cr-violet: #631d76;
    --cr-noir:   #1d1d1d;
    --cr-bg:     #f8f8fb;
    --cr-border: #e8e8f0;
}

.cr-wrap { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }

/* Grid */
.cr-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 20px;
    margin: 1.5rem 0;
}

/* Card */
.cr-card {
    background: #ffffff;
    border: 1px solid var(--cr-border);
    border-radius: 12px;
    padding: 1.35rem 1.5rem;
    transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s;
}
.cr-card:hover {
    box-shadow: 0 6px 24px rgba(99,29,118,0.10);
    border-color: rgba(99,29,118,0.25);
    transform: translateY(-2px);
}

.cr-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}
.cr-card__title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--cr-noir);
    line-height: 1.3;
}
.cr-card__date {
    font-size: 0.84rem;
    color: #777;
    margin: 0 0 6px;
}
.cr-card__trainer {
    font-size: 0.82rem;
    color: var(--cr-violet);
    margin: 0 0 8px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.cr-card__trainer::before {
    content: '';
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--cr-violet);
    flex-shrink: 0;
}
.cr-card__desc {
    font-size: 0.88rem;
    color: #555;
    margin: 0 0 10px;
    line-height: 1.6;
}

/* Pills */
.cr-pill {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 999px;
    white-space: nowrap;
    flex-shrink: 0;
}
.cr-pill--ok   { background: #eaf3de; color: #27500a; }
.cr-pill--warn { background: #fff3cd; color: #7a4f00; }
.cr-pill--full { background: rgba(99,29,118,0.09); color: var(--cr-violet); }

/* Progress */
.cr-progress {
    height: 4px;
    background: var(--cr-border);
    border-radius: 999px;
    margin: 10px 0 6px;
    overflow: hidden;
}
.cr-progress__bar {
    height: 100%;
    border-radius: 999px;
    transition: width 0.4s ease;
}
.cr-progress__bar--ok   { background: var(--cr-blue); }
.cr-progress__bar--warn { background: #f0a500; }
.cr-progress__bar--full { background: var(--cr-violet); }

.cr-waitlist-count {
    font-size: 0.78rem;
    color: #888;
    margin: 0 0 10px;
}
.cr-full-msg {
    font-size: 0.82rem;
    color: #999;
    margin: 10px 0 0;
    font-style: italic;
}
.cr-empty {
    color: #888;
    font-style: italic;
}

/* Buttons */
.cr-btn {
    display: inline-block;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.18s ease;
}
.cr-btn--register {
    margin-top: 14px;
    width: 100%;
    padding: 11px;
    font-size: 0.9rem;
    font-weight: 600;
    background: var(--cr-violet);
    color: #fff;
    border: 1.5px solid var(--cr-violet);
}
.cr-btn--register:hover {
    background: #4e1660;
    border-color: #4e1660;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(99,29,118,0.28);
}
.cr-btn--register[data-full="1"] {
    background: #fff;
    color: var(--cr-violet);
    border-color: var(--cr-violet);
}
.cr-btn--register[data-full="1"]:hover {
    background: rgba(99,29,118,0.07);
}
.cr-btn--register:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

/* Notice */
.cr-notice {
    margin: 1rem 0;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
}
.cr-notice--success { background: #eaf3de; color: #27500a; border: 1px solid #c0dd97; }
.cr-notice--error   { background: rgba(99,29,118,0.07); color: var(--cr-violet); border: 1px solid rgba(99,29,118,0.2); }

/* Modal backdrop */
.cr-modal-bg {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.40);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

/* Modal box */
.cr-modal {
    background: #ffffff;
    border-radius: 14px;
    padding: 2rem;
    width: 100%;
    max-width: 420px;
    position: relative;
    font-family: inherit;
    box-shadow: 0 20px 60px rgba(0,0,0,0.20);
    border: 1px solid var(--cr-border);
}
.cr-modal__close {
    position: absolute;
    top: 14px; right: 16px;
    background: none;
    border: 1.5px solid var(--cr-border);
    border-radius: 6px;
    font-size: 1.1rem;
    cursor: pointer;
    color: #999;
    line-height: 1;
    padding: 3px 8px;
    transition: all 0.18s;
}
.cr-modal__close:hover {
    color: var(--cr-noir);
    border-color: var(--cr-noir);
}
.cr-modal__title {
    margin: 0 0 4px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--cr-noir);
}
.cr-modal__subtitle {
    margin: 0 0 20px;
    font-size: 0.84rem;
    color: #777;
}

/* Form */
.cr-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: #555;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.cr-input {
    display: block;
    width: 100%;
    padding: 10px 12px;
    font-size: 0.95rem;
    border: 1.5px solid var(--cr-border);
    border-radius: 8px;
    margin-bottom: 14px;
    color: var(--cr-noir);
    background: var(--cr-bg);
    box-sizing: border-box;
    transition: border-color 0.15s, box-shadow 0.15s;
    font-family: inherit;
}
.cr-input:focus {
    outline: none;
    border-color: var(--cr-violet);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(99,29,118,0.10);
}

.cr-btn--submit {
    width: 100%;
    padding: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    background: var(--cr-violet);
    color: #fff;
    margin-top: 4px;
    border-radius: 8px;
    border: 1.5px solid var(--cr-violet);
}
.cr-btn--submit:hover {
    background: #4e1660;
    border-color: #4e1660;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(99,29,118,0.28);
}
.cr-btn--submit:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

.cr-form-msg {
    margin-top: 14px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.88rem;
    line-height: 1.5;
}
.cr-form-msg--success { background: #eaf3de; color: #27500a; border: 1px solid #c0dd97; }
.cr-form-msg--error   { background: rgba(99,29,118,0.07); color: var(--cr-violet); border: 1px solid rgba(99,29,118,0.2); }
