/* AJF Planning V2 — Public Styles */

/* ── Calendrier ── */
.ajfp-calendar { font-family: inherit; margin: 20px 0; overflow-x: auto; }

.ajfp-cal-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 12px;
}
.ajfp-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    border-radius: 50%;
    background: #1d6fa4;
    color: #fff;
    text-decoration: none;
    font-size: 18px;
    transition: background .15s;
}
.ajfp-nav-btn:hover { background: #155a87; color: #fff; }
.ajfp-week-label { font-size: 16px; font-weight: 600; color: #333; }

.ajfp-cal-grid { min-width: 620px; }

.ajfp-cal-header,
.ajfp-cal-row {
    display: grid;
    grid-template-columns: 56px repeat(7, 1fr);
}
.ajfp-cal-header {
    border-bottom: 2px solid #1d6fa4;
    margin-bottom: 2px;
}
.ajfp-th-hour { }
.ajfp-th-day {
    text-align: center;
    padding: 6px 2px;
    font-size: 12px;
    color: #555;
}
.ajfp-th-day.ajfp-today .ajfp-day-num {
    display: inline-block;
    background: #1d6fa4;
    color: #fff;
    width: 26px; height: 26px;
    border-radius: 50%;
    line-height: 26px;
}
.ajfp-day-name { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: #888; }
.ajfp-day-num  { display: block; font-size: 16px; font-weight: 600; color: #333; }

.ajfp-cal-row { min-height: 42px; border-bottom: 1px solid #f0f0f0; }
.ajfp-cal-row:hover { background: #fafcff; }
.ajfp-td-hour {
    display: flex;
    align-items: flex-start;
    padding-top: 6px;
    font-size: 11px;
    color: #999;
    border-right: 1px solid #e8e8e8;
}
.ajfp-td-cell {
    padding: 3px 2px;
    min-height: 40px;
    border-right: 1px solid #f4f4f4;
}

/* Créneaux */
.ajfp-slot {
    border-radius: 5px;
    padding: 4px 6px;
    margin: 2px 1px;
    font-size: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2px;
}
.ajfp-slot-nationality {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    text-align: center;
    padding: 4px 2px;
    line-height: 1.3;
}
.ajfp-slot img { border-radius: 50%; width: 32px; height: 32px; object-fit: cover; }
.ajfp-slot-name { font-size: 11px; font-weight: 600; color: #333; line-height: 1.2; }

.ajfp-slot-private  { background: #e8f4fd; border: 1px solid #c2ddf5; }
.ajfp-slot-skype    { background: #e8fde8; border: 1px solid #a8e6a8; }
.ajfp-slot-public   { background: #fff8e6; border: 1px solid #f5d98c; }

.ajfp-slot-available .ajfp-slot-link {
    display: inline-block;
    margin-top: 2px;
    padding: 2px 8px;
    background: #1d6fa4;
    color: #fff !important;
    text-decoration: none;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
}
.ajfp-slot-available .ajfp-slot-link:hover { background: #155a87; }
.ajfp-slot-taken { opacity: .55; }
.ajfp-slot-full { font-size: 10px; color: #999; }

/* ── Formulaire de réservation ── */
.ajfp-booking-form, .ajfp-booking-confirm {
    max-width: 500px;
    margin: 20px auto;
    padding: 24px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.ajfp-booking-form h2, .ajfp-booking-confirm h2 { margin-bottom: 16px; }
.ajfp-recap-table { width: 100%; border-collapse: collapse; margin-bottom: 20px; }
.ajfp-recap-table th { text-align: left; padding: 6px 10px; color: #666; font-weight: 500; width: 130px; }
.ajfp-recap-table td { padding: 6px 10px; border-bottom: 1px solid #f0f0f0; }

.ajfp-btn-book {
    display: block;
    width: 100%;
    padding: 12px;
    background: #1d6fa4;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
}
.ajfp-btn-book:hover { background: #155a87; }

.ajfp-success { background: #e6f4ea; border: 1px solid #a8d5b5; border-radius: 5px; padding: 12px 16px; color: #1e7e34; }
.ajfp-error   { background: #fce8e8; border: 1px solid #f5c6c6; border-radius: 5px; padding: 10px 16px; color: #c0392b; margin-bottom: 12px; }
.ajfp-positive { color: #1e7e34; font-weight: 600; }
.ajfp-negative { color: #c0392b; font-weight: 600; }

/* ── Compte étudiant ── */
.ajfp-account, .ajfp-form { max-width: 500px; }
.ajfp-form label { display: block; margin-bottom: 12px; font-size: 14px; color: #444; }
.ajfp-input {
    display: block;
    width: 100%;
    margin-top: 4px;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}
.ajfp-btn {
    padding: 9px 22px;
    background: #1d6fa4;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
}
.ajfp-btn:hover { background: #155a87; }

/* ── Tableau leçons étudiant ── */
.ajfp-lessons-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.ajfp-lessons-table th { text-align: left; padding: 8px 10px; border-bottom: 2px solid #1d6fa4; color: #555; font-size: 12px; text-transform: uppercase; }
.ajfp-lessons-table td { padding: 8px 10px; border-bottom: 1px solid #f0f0f0; }
.ajfp-lessons-table tr:hover td { background: #fafcff; }

/* ── Professeurs ── */
.ajfp-profs-grid { display: flex; flex-wrap: wrap; gap: 20px; margin: 16px 0; }
.ajfp-prof-card  { background: #fff; border: 1px solid #e0e0e0; border-radius: 8px; padding: 16px; max-width: 260px; text-align: center; }
.ajfp-prof-card img { border-radius: 50%; margin-bottom: 10px; }
.ajfp-prof-card h3, .ajfp-prof-card h4 { margin: 0 0 4px; font-size: 15px; }
.ajfp-prof-jp { display: block; font-size: 13px; color: #888; }
.ajfp-prof-card p { font-size: 13px; color: #555; margin: 4px 0; }

/* Crédits */
.ajfp-credits-count { font-weight: 700; color: #1d6fa4; }

/* ── Page Mon Compte [ajf_mon_compte] ── */
.ajfp-mon-compte { max-width: 700px; margin: 0 auto; font-family: inherit; }

.ajfp-notice-success {
    background: #e6f4ea; border: 1px solid #a8d5b5; border-radius: 6px;
    padding: 10px 16px; color: #1e7e34; font-size: 14px; margin-bottom: 16px;
}

/* En-tête compte */
.ajfp-compte-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    background: #f8faff;
    border: 1px solid #dce8f5;
    border-radius: 10px;
    padding: 24px 28px;
    margin-bottom: 24px;
}

/* Identité */
.ajfp-compte-identite { flex: 1; }
.ajfp-compte-nom {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 4px;
    line-height: 1.2;
}
.ajfp-compte-jp {
    font-size: 15px;
    color: #888;
    margin: 0 0 8px;
}
.ajfp-compte-email {
    font-size: 13px;
    color: #666;
    margin: 0 0 4px;
}
.ajfp-compte-detail {
    font-size: 13px;
    color: #666;
    margin: 2px 0;
}

/* Boîte crédits */
.ajfp-compte-credits-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #fff;
    border: 2px solid #1d6fa4;
    border-radius: 10px;
    padding: 16px 20px;
    min-width: 130px;
    text-align: center;
    gap: 4px;
}
.ajfp-credits-number {
    font-size: 36px;
    font-weight: 800;
    color: #1d6fa4;
    line-height: 1;
}
.ajfp-credits-label {
    font-size: 12px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 10px;
}
.ajfp-btn-planning {
    display: inline-block;
    background: #1d6fa4;
    color: #fff !important;
    padding: 7px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background .15s;
}
.ajfp-btn-planning:hover { background: #155a87; }

/* Tabs */
.ajfp-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e8edf3;
    margin-bottom: 20px;
}
.ajfp-tab {
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #888;
    margin-bottom: -2px;
    transition: all .15s;
    display: flex;
    align-items: center;
    gap: 6px;
}
.ajfp-tab:hover { color: #1d6fa4; }
.ajfp-tab.active { color: #1d6fa4; border-bottom-color: #1d6fa4; font-weight: 700; }
.ajfp-tab-count {
    background: #e8f0fb;
    color: #1d6fa4;
    border-radius: 10px;
    padding: 1px 7px;
    font-size: 12px;
    font-weight: 700;
}

/* Tab contents */
.ajfp-tab-content { display: none; }
.ajfp-tab-content.active { display: block; }

/* Profil form */
.ajfp-profile-form { max-width: 420px; }
.ajfp-field-group { margin-bottom: 16px; }
.ajfp-field-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 5px;
}

.ajfp-empty { color: #888; font-style: italic; padding: 20px 0; }
.ajfp-jp { font-size: 14px; color: #888; font-weight: 400; }

/* Responsive */
@media (max-width: 520px) {
    .ajfp-compte-header { flex-direction: column; }
    .ajfp-compte-credits-box { flex-direction: row; align-items: center; min-width: unset; width: 100%; gap: 12px; }
    .ajfp-credits-number { font-size: 26px; }
    .ajfp-credits-label { margin-bottom: 0; }
    .ajfp-tab { padding: 8px 12px; font-size: 13px; }
}

/* ── Page Connexion [ajf_login] ── */
.ajfp-login-wrap {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 40px 16px;
    min-height: 60vh;
}

.ajfp-login-card {
    background: #fff;
    border: 1px solid #e8edf3;
    border-radius: 12px;
    padding: 40px 36px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 4px 24px rgba(0,0,0,.07);
}

/* Logo / nom du site */
.ajfp-login-logo {
    text-align: center;
    margin-bottom: 28px;
}
.ajfp-logo-img { max-height: 60px; width: auto; }
.ajfp-login-sitename {
    font-size: 20px;
    font-weight: 700;
    color: #1d6fa4;
    letter-spacing: -.3px;
}

/* Titre */
.ajfp-login-title {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 6px;
    text-align: center;
}
.ajfp-login-subtitle {
    font-size: 14px;
    color: #888;
    text-align: center;
    margin: 0 0 28px;
}

/* Erreur */
.ajfp-login-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 6px;
    padding: 10px 14px;
    color: #dc2626;
    font-size: 14px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.ajfp-login-error-icon { font-size: 16px; flex-shrink: 0; }

/* Champs */
.ajfp-login-field {
    margin-bottom: 20px;
}
.ajfp-login-field label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}
.ajfp-login-forgot {
    font-size: 12px;
    font-weight: 400;
    color: #1d6fa4;
    text-decoration: none;
}
.ajfp-login-forgot:hover { text-decoration: underline; }

.ajfp-login-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.ajfp-login-icon {
    position: absolute;
    left: 12px;
    color: #9ca3af;
    display: flex;
    align-items: center;
    pointer-events: none;
}
.ajfp-login-input-wrap input {
    width: 100%;
    padding: 11px 42px 11px 40px;
    border: 1.5px solid #d1d5db;
    border-radius: 7px;
    font-size: 14px;
    color: #1a1a2e;
    background: #fafafa;
    transition: border-color .15s, box-shadow .15s;
    outline: none;
    box-sizing: border-box;
}
.ajfp-login-input-wrap input:focus {
    border-color: #1d6fa4;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(29,111,164,.12);
}
.ajfp-login-input-wrap input::placeholder { color: #c0c8d4; }

/* Bouton afficher/masquer mot de passe */
.ajfp-toggle-password {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    color: #9ca3af;
    padding: 4px;
    display: flex;
    align-items: center;
    transition: color .15s;
}
.ajfp-toggle-password:hover { color: #1d6fa4; }

/* Case à cocher "Rester connecté" */
.ajfp-login-remember { margin-bottom: 24px; }
.ajfp-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
    color: #555;
    user-select: none;
}
.ajfp-checkbox-label input[type="checkbox"] { display: none; }
.ajfp-checkbox-custom {
    width: 18px;
    height: 18px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    background: #fff;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .15s;
}
.ajfp-checkbox-label input:checked + .ajfp-checkbox-custom {
    background: #1d6fa4;
    border-color: #1d6fa4;
}
.ajfp-checkbox-label input:checked + .ajfp-checkbox-custom::after {
    content: '';
    display: block;
    width: 4px;
    height: 8px;
    border: 2px solid #fff;
    border-top: none;
    border-left: none;
    transform: rotate(45deg) translateY(-1px);
}

/* Bouton submit */
.ajfp-login-submit {
    width: 100%;
    padding: 13px 20px;
    background: #1d6fa4;
    color: #fff;
    border: none;
    border-radius: 7px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background .15s, transform .1s;
}
.ajfp-login-submit:hover  { background: #155a87; }
.ajfp-login-submit:active { transform: scale(.98); }

/* Responsive */
@media (max-width: 480px) {
    .ajfp-login-card { padding: 28px 20px; }
    .ajfp-login-title { font-size: 20px; }
}
