:root {
    color-scheme: light;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #233144;
    background: #f5f7fb;
}

* { box-sizing: border-box; }
body { margin: 0; line-height: 1.6; }
a { color: #24599a; }
.vitrine, .management { width: min(100% - 2rem, 1100px); margin: 0 auto; padding: 2rem 0 4rem; }
.vitrine-header { text-align: center; padding: 2rem 0 2.5rem; }
.brand { display: inline-block; margin-bottom: 2rem; font-size: 1.05rem; font-weight: 750; text-decoration: none; }
.brand-logo { display: block; width: min(320px, 90vw); height: auto; }
.eyebrow { margin: 0; color: #526883; font-size: .78rem; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
h1 { margin: .45rem 0 .75rem; font-size: clamp(2rem, 5vw, 3rem); line-height: 1.15; }
.vitrine-header > p:last-child, .management-header > p:last-child { color: #526174; }
.directory { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 1.25rem; }
.profile { display: grid; grid-template-columns: minmax(0, 1fr) 146px; align-items: start; gap: .75rem; overflow: hidden; border: 1px solid #dfe6ef; border-radius: 14px; background: #fff; box-shadow: 0 4px 16px #2331440c; }
.profile-photo, .profile-placeholder { display: grid; grid-column: 2; grid-row: 1; align-self: start; justify-self: end; width: 130px; height: 174px; margin: 1rem 1rem 0 0; border-radius: 8px; object-fit: cover; object-position: center top; background: #e8edf4; }
.profile-placeholder { place-items: center; color: #526883; font-size: 4rem; }
.profile-content { display: flex; grid-column: 1; grid-row: 1; min-width: 0; flex-direction: column; align-items: flex-start; padding: 1rem 0 1rem 1rem; }
.profile-content h2 { margin: .2rem 0 0; font-size: 1.4rem; line-height: 1.3; }
.crp { margin: .2rem 0 1rem; color: #526174; font-size: .92rem; }
dl { width: 100%; margin: 0; }
dt { margin-top: .75rem; font-size: .86rem; font-weight: 750; }
dd { margin: .15rem 0 0; white-space: pre-line; overflow-wrap: anywhere; }
.presentation { width: 100%; margin: 1rem 0 1.25rem; white-space: pre-line; overflow-wrap: anywhere; }
.contact, .button, button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: .6rem 1rem; border: 1px solid #24599a; border-radius: 7px; background: #24599a; color: #fff; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.profile-content .contact { width: 100%; margin-top: 1rem; padding-right: .5rem; padding-left: .5rem; text-align: center; }
.contact:hover, .button:hover, button:hover { background: #194777; }
footer { margin-top: 2.5rem; color: #526174; font-size: .9rem; text-align: center; }
.empty { padding: 2rem; border: 1px dashed #aebccd; border-radius: 10px; background: #fff; text-align: center; }
.management { max-width: 900px; }
.management > nav { margin-bottom: 2.5rem; }
.management-header { margin-bottom: 1.5rem; }
.notice, .error { padding: .8rem 1rem; border-radius: 7px; background: #fff; }
.notice { border: 1px solid #a9d8bd; color: #1c6a3a; }
.error { border: 1px solid #e0b0b0; color: #a22929; }
.admin-profile { display: flex; align-items: center; gap: 1rem; margin: .8rem 0; padding: 1rem; border: 1px solid #dfe6ef; border-radius: 10px; background: #fff; }
.admin-photo { width: 76px; height: 76px; border-radius: 8px; object-fit: cover; }
.admin-profile-info { flex: 1; min-width: 0; }
.admin-profile h2 { margin: 0; font-size: 1.15rem; }
.admin-profile p { margin: .2rem 0 0; color: #526174; }
.admin-profile form { margin: 0; }
.danger { border-color: #a22929; background: #fff; color: #a22929; }
.danger:hover { background: #fff0f0; }
.button { border-color: #aebccd; background: #fff; color: #233144; }
.button:hover { background: #f0f3f8; }
.profile-form { padding: 1.5rem; border: 1px solid #dfe6ef; border-radius: 12px; background: #fff; }
.profile-form > label:not(.checkbox) { display: block; margin: 1rem 0 .35rem; font-weight: 700; }
.profile-form input:not([type=hidden]):not([type=checkbox]), .profile-form textarea { width: 100%; padding: .65rem; border: 1px solid #aebccd; border-radius: 6px; background: #fff; color: #233144; font: inherit; }
.profile-form input[type=file] { padding: .5rem; }
.profile-form small { display: block; margin-top: .4rem; color: #526174; }
.checkbox { display: flex; align-items: flex-start; gap: .55rem; margin: 1rem 0; font-weight: 650; }
.checkbox input { margin-top: .35rem; }
.publish { padding-top: 1rem; border-top: 1px solid #e6ebf2; }
.photo-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 1rem; margin-top: .7rem; }
.photo-controls .checkbox { margin: 0; }
.form-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.5rem; }
.secondary { min-height: 44px; }

@media (max-width: 540px) {
    .profile { grid-template-columns: minmax(0, 1fr) 116px; gap: .5rem; }
    .profile-photo, .profile-placeholder { width: 100px; height: 134px; margin: .8rem .75rem 0 0; }
    .profile-content { padding: .8rem 0 .8rem .8rem; }
    .profile-content h2 { font-size: 1.2rem; }
    .admin-profile { align-items: flex-start; flex-wrap: wrap; }
    .admin-profile-info { flex-basis: calc(100% - 100px); }
    .admin-profile form { margin-left: auto; }
    .form-page .profile-form { padding: 1rem; }
}
.specialties { border: 1px solid #aebccd; border-radius: 6px; margin: 1rem 0; padding: .5rem 1rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); column-gap: 1rem; }
.specialties legend { font-weight: 700; padding: 0 .4rem; }
.specialties .checkbox { margin: .35rem 0; font-weight: 500; }
.specialties-admin { margin-top: 2.5rem; }
.inline-form { display: flex; gap: .6rem; align-items: center; margin: 1rem 0; }
.inline-form input { flex: 1; padding: .65rem; border: 1px solid #aebccd; border-radius: 6px; font: inherit; }
.specialty-list { list-style: none; padding: 0; }
.specialty-list li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .4rem 0; border-bottom: 1px solid #e1e7ef; }
.specialty-list form { margin: 0; }
.searches { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.search { display: flex; flex-direction: column; gap: .5rem; padding: 1rem; border: 1px solid #d5dde8; border-radius: 8px; background: #fff; }
.search label { font-weight: 700; }
.search select { padding: .65rem; border: 1px solid #aebccd; border-radius: 6px; font: inherit; background: #fff; color: #233144; }
.clear-search { grid-column: 1 / -1; margin: 0; }
.profile-default { object-fit: contain; object-position: center; background: #fff; border: 1px solid #e1e7ef; box-sizing: border-box; padding: .25rem; }
