/* =========================================================================
   ESPACE ENSEIGNANT
   ========================================================================= */

.teacher-main { min-width: 0; }
.teacher-main > .panel + .stats,
.teacher-main > .stats + .panel,
.teacher-main > .panel + .teacher-block,
.teacher-main > .teacher-block + .teacher-block { margin-top: 20px; }
.teacher-main > .panel + .panel { margin-top: 20px; }

/* Carte d'identité du tableau de bord */
.teacher-id {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px 20px;
    padding: 18px 22px;
}

.teacher-id .person strong { font-size: 1.05rem; }
.teacher-id-badges { display: flex; flex-wrap: wrap; gap: 8px; }

.teacher-stats { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.teacher-stats .stat { padding: 16px 16px; min-width: 0; }
.teacher-stats .stat-label { font-size: .84rem; gap: 6px; min-width: 0; overflow-wrap: anywhere; }
.teacher-stats .stat-value { font-size: 1.8rem; }

/* Mémoires encadrés */
.teacher-memories { display: grid; }
.teacher-mrow { grid-template-columns: 56px minmax(0, 1fr) auto; }
.teacher-mrow .cover { width: 56px; }
.teacher-followup { font-size: .86rem; }

/* Recommandations données */
.teacher-recos { display: grid; gap: 14px; }

.teacher-reco {
    position: relative;
    margin: 0;
    padding: 18px 20px 18px 24px;
    border-radius: var(--r-md);
    background: var(--canvas);
}

.teacher-reco::before {
    content: "";
    position: absolute;
    left: 0;
    top: 16px;
    bottom: 16px;
    width: 4px;
    border-radius: 0 4px 4px 0;
    background: var(--marker);
}

.teacher-reco blockquote {
    margin: 0 0 10px;
    font-family: var(--font-serif);
    font-size: 1.12rem;
    line-height: 1.45;
}

.teacher-reco figcaption { font-size: .88rem; }
.teacher-reco figcaption a { font-weight: 600; }

/* Profil : en-tête */
.teacher-hero {
    display: flex;
    align-items: center;
    gap: 26px;
    flex-wrap: wrap;
    padding: 28px;
    margin-bottom: 20px;
    background:
        radial-gradient(70% 120% at 100% 0%, rgba(255, 225, 77, .22), transparent 60%),
        var(--paper);
}

.teacher-hero-body { flex: 1; min-width: 240px; }
.teacher-hero-body h2 { margin: 0 0 4px; font-size: 1.7rem; letter-spacing: -.03em; }
.teacher-hero-job { margin: 0 0 4px; font-family: var(--font-serif); font-size: 1.2rem; color: var(--ink); }
.teacher-hero-inst { display: flex; align-items: center; gap: 7px; margin: 0 0 14px; color: var(--ink-2); font-size: .94rem; }
.teacher-hero-inst .icon { color: var(--ink-3); width: 17px; height: 17px; }

.teacher-split { grid-template-columns: minmax(0, 1fr) 300px; }

.teacher-bio { font-size: 1.02rem; line-height: 1.7; color: #2A2E4E; max-width: 68ch; }
.teacher-main .dl dt { display: flex; align-items: center; gap: 7px; }
.teacher-main .dl dt .icon { width: 16px; height: 16px; }

.teacher-verified-card { text-align: left; }
.teacher-verified-card .badge { margin-top: 4px; }

.teacher-verified-icon {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-bottom: 12px;
    border-radius: 14px;
    background: var(--green-50);
    color: var(--green);
}

.teacher-verified-icon .icon { width: 22px; height: 22px; }

/* Formulaire */
.teacher-form .form-section .form-actions { margin-top: 24px; }
.teacher-visibility label { margin: 0 0 2px; }
.teacher-visibility span { display: block; }

/* Champ spécialités (piloté par assets/teacher-specialty.js) */
.teacher-specialties { position: relative; }
.teacher-specialties-select-wrapper { display: none; }

.teacher-specialties-box {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    min-height: 48px;
    padding: 6px 8px;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: var(--paper);
    transition: border-color .15s ease, box-shadow .15s ease;
}

.teacher-specialties-box:focus-within { border-color: var(--green); box-shadow: 0 0 0 4px var(--green-50); }

.teacher-specialties-tags { display: contents; }
.teacher-specialties-input-wrapper { flex: 1; min-width: 180px; }

.teacher-specialties-box input.teacher-specialties-input {
    min-height: 34px;
    padding: 4px 6px;
    border: 0;
    box-shadow: none;
    background: transparent;
}

.teacher-specialties-box input.teacher-specialties-input:focus { box-shadow: none; }

.teacher-specialty-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 6px 4px 11px;
    border-radius: 999px;
    background: var(--ink);
    color: #fff;
    font-size: .85rem;
    font-weight: 550;
}

.teacher-specialty-tag-remove {
    display: inline-grid;
    place-items: center;
    width: 20px;
    height: 20px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .16);
    color: #fff;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
}

.teacher-specialty-tag-remove:hover { background: var(--danger); }

.teacher-specialties-suggestions:not(:empty) {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    z-index: 20;
    display: flex;
    flex-direction: column;
    padding: 6px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-3);
}

.teacher-specialty-suggestion,
.teacher-specialty-create {
    padding: 9px 12px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--ink);
    text-align: left;
    font-size: .93rem;
    cursor: pointer;
}

.teacher-specialty-suggestion:hover { background: var(--canvas); }
.teacher-specialty-create { color: var(--green); font-weight: 600; }
.teacher-specialty-create:hover { background: var(--green-50); }

.teacher-specialties-empty,
.teacher-specialties-max,
.teacher-specialties-error { padding: 9px 12px; font-size: .88rem; color: var(--ink-3); }
.teacher-specialties-error { color: var(--danger); }

/* Vérification : parcours en étapes */
.teacher-start {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 36px;
    align-items: center;
}

.teacher-start-copy h2 { font-size: 1.5rem; }
.teacher-start-copy .muted { margin-bottom: 22px; }

.tstepper { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }

.tstep {
    position: relative;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 14px;
    padding-bottom: 22px;
}

.tstep:last-child { padding-bottom: 0; }

.tstep:not(:last-child)::before {
    /* fil entre deux étapes */
    content: "";
    position: absolute;
    left: 16px;
    top: 36px;
    bottom: 2px;
    border-left: 2px dashed #CDD1DE;
}

.tstep-dot {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--paper);
    border: 2px solid var(--line);
    color: var(--ink-3);
    font-weight: 700;
    font-size: .88rem;
    font-variant-numeric: tabular-nums;
}

.tstep-dot .icon { width: 17px; height: 17px; }
.tstep strong { display: block; font-size: .97rem; margin: 5px 0 2px; }
.tstep span:not(.tstep-dot) { display: block; color: var(--ink-2); font-size: .9rem; line-height: 1.45; }

.tstep.is-done .tstep-dot { background: var(--green); border-color: var(--green); color: #fff; }
.tstep.is-done:not(:last-child)::before { border-left-style: solid; border-color: var(--green-100); }
.tstep.is-current .tstep-dot { background: var(--marker); border-color: var(--marker); color: var(--ink); box-shadow: 0 0 0 5px var(--marker-50); }
.tstep.is-rejected .tstep-dot { background: var(--danger); border-color: var(--danger); color: #fff; }
.tstep.is-rejected strong { color: var(--danger); }

.tstepper-track { margin-top: 6px; }

.teacher-request-bio { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line-soft); }
.teacher-request-bio h3 { font-size: .95rem; margin-bottom: 6px; }
.teacher-request-bio p { margin: 0; color: #2A2E4E; }

.teacher-decision.is-pending .teacher-verified-icon { background: var(--warning-50); color: var(--warning); }
.teacher-decision.is-rejected .teacher-verified-icon { background: var(--danger-50); color: var(--danger); }
.teacher-decision .muted { margin-bottom: 16px; }
.teacher-decision .muted:last-child { margin-bottom: 0; }

.teacher-refusal {
    padding: 14px 16px;
    border-radius: var(--r-md);
    background: var(--danger-50);
    color: #7A221B;
    font-size: .93rem;
}

.teacher-refusal p { margin: 4px 0 0; }

.teacher-verification-form .note { margin: 6px 0 4px; }

@media (max-width: 1080px) {
    .teacher-split { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
    .teacher-start { grid-template-columns: 1fr; gap: 24px; }
    .teacher-mrow { grid-template-columns: 52px minmax(0, 1fr); }
    .teacher-mrow .cover { width: 52px; }
    .teacher-hero { padding: 22px; gap: 18px; }
    .teacher-hero .avatar-xl { width: 80px; height: 80px; font-size: 1.5rem; }
}
