/* ── FITH Public Calendar — Datepicker inline style ──────────────────────── */

.fith-pc-wrap {
    max-width: 720px;
    margin: 0 auto 24px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ── Grille des deux mois côte à côte ───────────────────────────────────── */

#fith-public-cal {
    display: flex;
    gap: 0;
    border: 1px solid #e8ecf0;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 12px rgba(60,64,67,.08);
}

.fith-pc-month {
    flex: 1;
    padding: 20px 18px 16px;
}

.fith-pc-month:first-child {
    border-right: 1px solid #f0f0f0;
}

/* ── Navigation mois ─────────────────────────────────────────────────────── */

.fith-pc-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.fith-pc-month-title {
    font-size: 14px;
    font-weight: 600;
    color: #202124;
    letter-spacing: -.2px;
}

.fith-pc-nav-btn {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #5f6368;
    font-size: 20px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .12s;
    line-height: 1;
    padding: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: monospace;
}
.fith-pc-nav-btn:hover { background: #f1f3f4; }

/* ── Grille des jours ────────────────────────────────────────────────────── */

.fith-pc-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

/* En-tête jours semaine */
.fith-pc-dayname {
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: #9aa0a6;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: 4px 0 8px;
}

/* ── Cellules jours ──────────────────────────────────────────────────────── */

.fith-pc-cell {
    position: relative;
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: default;
    transition: background .12s;
    overflow: hidden;
    min-height: 36px;
}

.fith-pc-empty { background: transparent; }

/* Numéro du jour */
.fith-pc-day-num {
    font-size: 13px;
    font-weight: 400;
    line-height: 1;
    position: relative;
    z-index: 1;
}

/* ── Jours passés ────────────────────────────────────────────────────────── */

.fith-pc-past .fith-pc-day-num {
    color: #c5c8cc;
    font-weight: 300;
}

/* ── Aujourd'hui ─────────────────────────────────────────────────────────── */

.fith-pc-today .fith-pc-day-num {
    font-weight: 700;
    color: #1a73e8;
}

/* ── Jours disponibles ───────────────────────────────────────────────────── */

.fith-pc-avail {
    cursor: pointer;
}
.fith-pc-avail .fith-pc-day-num {
    color: #12c953;
    font-weight: 500;
}
.fith-pc-avail:hover {
    background: #e6f4ea;
}
.fith-pc-avail:hover .fith-pc-day-num {
    color: #137333;
}

/* ── Jours indisponibles ─────────────────────────────────────────────────── */

.fith-pc-unavail {
    background: #fde8e8;
    cursor: not-allowed;
}
.fith-pc-unavail .fith-pc-day-num {
    color: #5f6368;
}

/* Label "Indisponible" au survol */
.fith-pc-soldout {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(242, 139, 130, .92);
    color: #7d2121;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    opacity: 0;
    transition: opacity .15s;
    border-radius: 8px;
    padding: 2px;
    text-align: center;
    line-height: 1.2;
    z-index: 10;
}
.fith-pc-unavail:hover .fith-pc-soldout { opacity: 1; }

/* ── Sélection range ─────────────────────────────────────────────────────── */

/* Jour de début */
.fith-pc-range-start {
    background: #1a73e8 !important;
    border-radius: 8px 0 0 8px;
}
.fith-pc-range-start .fith-pc-day-num {
    color: #fff !important;
    font-weight: 600;
}

/* Jour de fin */
.fith-pc-range-end {
    background: #1a73e8 !important;
    border-radius: 0 8px 8px 0;
}
.fith-pc-range-end .fith-pc-day-num {
    color: #fff !important;
    font-weight: 600;
}

/* Si start = end (même jour) */
.fith-pc-range-start.fith-pc-range-end {
    border-radius: 8px;
}

/* Jours dans la range */
.fith-pc-in-range {
    background: #e8f0fe !important;
    border-radius: 0;
}
.fith-pc-in-range .fith-pc-day-num { color: #1a73e8 !important; }

/* Hover pendant la sélection */
.fith-pc-in-range-hover {
    background: #f0f4ff !important;
    border-radius: 0;
}
.fith-pc-in-range-hover .fith-pc-day-num { color: #4285f4 !important; }

/* ── Résumé de sélection ─────────────────────────────────────────────────── */

.fith-pc-summary {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.5;
}

.fith-pc-summary-hint {
    background: #f8f9fa;
    color: #5f6368;
    border: 1px dashed #dadce0;
}

.fith-pc-summary-ok {
    background: #e6f4ea;
    color: #137333;
    border: 1px solid #ceead6;
}

.fith-pc-nights {
    font-size: 12px;
    opacity: .75;
    margin-left: 6px;
}

/* ── Message d'erreur ────────────────────────────────────────────────────── */

.fith-pc-error {
    margin-top: 10px;
    padding: 10px 14px;
    background: #fce8e6;
    border: 1px solid #f5c6c4;
    border-radius: 8px;
    color: #c5221f;
    font-size: 13px;
    display: none;
}

/* ── Légende ─────────────────────────────────────────────────────────────── */

.fith-pc-legend {
    display: flex;
    gap: 20px;
    margin-top: 14px;
    flex-wrap: wrap;
    padding: 0 2px;
}

.fith-pc-legend-item {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    color: #5f6368;
}

.fith-pc-legend-item::before {
    content: '';
    width: 20px;
    height: 20px;
    border-radius: 5px;
    display: inline-block;
    flex-shrink: 0;
}

.fith-pc-legend-avail::before    { background: #12c953; border: 1.5px solid #ceead6; }
.fith-pc-legend-avail .fith-pc-legend-num    { color: #1e8c45; font-weight: 500; }
.fith-pc-legend-unavail::before  { background: #fde8e8; }
.fith-pc-legend-past::before     { background: #00000005;border: 1px solid #0002;}

.fith-pc-legend-num {
    position: absolute;
    font-size: 11px;
}

/* Exemples de numéros dans la légende */
.fith-pc-legend-avail::before    { position: relative; }
.fith-pc-legend-item span.demo   {
    display: inline-flex;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 500;
    flex-shrink: 0;
}
.demo-avail   { color: #1e8c45; background: transparent; }
.demo-unavail { color: #5f6368; background: #fde8e8; }
.demo-past    { color: #c5c8cc; font-weight: 300; }

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 600px) {
    #fith-public-cal {
        flex-direction: column;
    }
    .fith-pc-month:first-child {
        border-right: none;
        border-bottom: 1px solid #f0f0f0;
    }
    .fith-pc-cell {
        min-height: 40px;
    }
}

/* ── Formulaire de réservation ──────────────────────────────────────────── */

.fith-public-wrap { max-width: 860px; margin: 0 auto; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }

.fith-pc-container { margin-bottom: 8px; }

#fith-booking-form-wrap { margin-top: 40px; border-top: 2px solid #e8ecf0; padding-top: 32px; }

.fith-form-title {
    font-size: 22px; font-weight: 600; color: #202124;
    margin: 0 0 16px; letter-spacing: -.3px;
}

.fith-dates-recap {
    background: #e8f0fe; border: 1px solid #c5d8f9; border-radius: 10px;
    padding: 12px 18px; font-size: 14px; color: #1a73e8;
    margin-bottom: 28px; display: inline-block;
}
.fith-dates-recap span { opacity:.7; margin-left:6px; }

.fith-section-title {
    font-size: 13px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .06em; color: #5f6368; margin: 28px 0 14px;
    padding-bottom: 6px; border-bottom: 1px solid #f0f2f5;
}

.fith-form-row {
    display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 0;
}
.fith-form-field {
    flex: 1; min-width: 200px; margin-bottom: 16px;
}
.fith-form-field.fith-full { flex: 100%; }

.fith-form-field label {
    display: flex; flex-direction: column; gap: 6px;
    font-size: 13px; font-weight: 600; color: #3c4043;
}
.fith-form-field small { font-weight: 400; color: #9aa0a6; font-size: 11px; }

.fith-form-field input,
.fith-form-field select,
.fith-form-field textarea {
    padding: 10px 14px; border: 1.5px solid #dadce0; border-radius: 8px;
    font-size: 14px; color: #202124; background: #fff; font-family: inherit;
    width: 100%; box-sizing: border-box; transition: border-color .15s, box-shadow .15s;
}
.fith-form-field input:focus,
.fith-form-field select:focus,
.fith-form-field textarea:focus {
    outline: none; border-color: #1a73e8;
    box-shadow: 0 0 0 3px rgba(26,115,232,.12);
}

/* Radio participants */
.fith-radio-group {
    display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px;
}
.fith-radio-label {
    display: flex; align-items: center; gap: 8px;
    padding: 9px 14px; border: 1.5px solid #dadce0; border-radius: 8px;
    cursor: pointer; font-size: 13px; color: #3c4043;
    transition: border-color .15s, background .15s;
}
.fith-radio-label input[type="radio"] { accent-color: #1a73e8; margin: 0; }
.fith-radio-label:has(input:checked) {
    border-color: #1a73e8; background: #e8f0fe; color: #1a73e8; font-weight: 500;
}

/* Checkbox CGU */
.fith-terms { margin: 24px 0; }
.fith-checkbox-label {
    display: flex; align-items: flex-start; gap: 10px;
    font-size: 13px; color: #5f6368; cursor: pointer;
}
.fith-checkbox-label input { accent-color: #1a73e8; margin-top: 2px; flex-shrink: 0; }
.fith-checkbox-label a { color: #1a73e8; }

/* Bouton submit */
.fith-form-actions { margin-top: 24px; }
.fith-submit-btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 13px 32px; border: none; border-radius: 8px;
    background: #1a73e8; color: #fff; font-size: 15px; font-weight: 600;
    cursor: pointer; font-family: inherit;
    box-shadow: 0 2px 8px rgba(26,115,232,.35);
    transition: background .15s, box-shadow .15s;
}
.fith-submit-btn:hover { background: #1557b0; box-shadow: 0 4px 12px rgba(26,115,232,.45); }
.fith-submit-btn:disabled { background: #a8c7fa; cursor: not-allowed; box-shadow: none; }

.fith-form-error {
    margin-top: 14px; padding: 12px 16px; background: #fce8e6;
    border: 1px solid #f5c6c4; border-radius: 8px; color: #c5221f;
    font-size: 13px; display: none;
}

/* Message succès */
.fith-success-msg {
    text-align: center; padding: 48px 24px;
}
.fith-success-icon {
    width: 64px; height: 64px; background: #e6f4ea; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; color: #137333; margin: 0 auto 20px;
}
.fith-success-msg h3 { font-size: 22px; color: #137333; margin: 0 0 10px; }
.fith-success-msg p  { color: #5f6368; font-size: 15px; }

/* Admin CSS inline */
.fith-admin-wrap h1 { margin-bottom: 24px; }
.fith-admin-stats { display:flex; gap:16px; flex-wrap:wrap; margin-bottom:32px; }
.fith-stat { background:#fff; border:1px solid #dadce0; border-radius:12px; padding:20px 28px; text-align:center; min-width:120px; }
.fith-stat-num { display:block; font-size:36px; font-weight:700; line-height:1; }
.fith-stat-label { display:block; font-size:12px; color:#5f6368; margin-top:4px; font-weight:500; text-transform:uppercase; }
.fith-stat-pending .fith-stat-num { color:#f9ab00; }
.fith-stat-confirmed .fith-stat-num { color:#137333; }
.fith-stat-cancelled .fith-stat-num { color:#d93025; }
.fith-status { padding:3px 10px; border-radius:20px; font-size:12px; font-weight:600; }
.fith-status-pending   { background:#fef7e0; color:#b06000; }
.fith-status-confirmed { background:#e6f4ea; color:#137333; }
.fith-status-cancelled { background:#fce8e6; color:#c5221f; }
.fith-admin-teacher-select { display:flex; align-items:center; gap:12px; margin-bottom:16px; }
.fith-bookings-table .column-id { width:40px; }

@media (max-width:600px) {
    .fith-form-row { flex-direction:column; }
    .fith-radio-group { flex-direction:column; }
}

button#fith-submit {
    background: #000091;
    border-color: #000091;
    color: #fff;
}
button#fith-submit:hover {
    background: #fff;
    border-color: #000091;
    color: #000091;
}
/* ── Validation — champs invalides ──────────────────────────────────────── */

.fith-form-field input.fith-field-invalid,
.fith-form-field select.fith-field-invalid,
.fith-form-field textarea.fith-field-invalid {
    border-color: #d93025 !important;
    box-shadow: 0 0 0 3px rgba(217, 48, 37, .15) !important;
    background: #fff8f8;
}

/* Checkbox CGU invalide */
.fith-checkbox-label input.fith-field-invalid {
    outline: 3px solid rgba(217, 48, 37, .5);
    outline-offset: 2px;
}

/* Radio invalide */
.fith-radio-label:has(input.fith-field-invalid) {
    border-color: #d93025 !important;
    background: #fff8f8;
}

/* ── Banniere notification champs manquants ──────────────────────────────── */

.fith-validation-banner {
    margin-top: 16px;
    padding: 14px 18px;
    background: #fce8e6;
    border: 1.5px solid #f5c6c4;
    border-left: 4px solid #d93025;
    border-radius: 8px;
    color: #c5221f;
    font-size: 13px;
    line-height: 1.6;
}

.fith-validation-banner strong {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
}

.fith-validation-banner ul {
    margin: 0;
    padding-left: 18px;
}

.fith-validation-banner li {
    margin-bottom: 3px;
}

.fith-validation-banner a {
    color: #c5221f;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

.fith-validation-banner a:hover {
    color: #a50e0e;
}

/* Badge reCAPTCHA flottant : decommenter pour masquer (mention legale a afficher manuellement) */
/* .grecaptcha-badge { visibility: hidden; } */

/* ── Toast frontend ──────────────────────────────────────────────────────── */
.fith-front-toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(16px);
    background: #188038;
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 16px rgba(0,0,0,.18);
    opacity: 0;
    transition: opacity .25s, transform .25s;
    pointer-events: none;
    white-space: nowrap;
    z-index: 99999;
}
.fith-front-toast--show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.fith-front-toast--error { background: #c5221f; }