/* ============================================
   Profile page, FR and EN (profil.html, en/profile.html)
   Step 15 of the audit of 28/09 (F-165): two columns from 1024 px, the
   « En bref » / « At a glance » card on the right and sticky (when the
   window is tall enough to show it whole); one column below 1024 px, card
   first and compact. Also holds the page styles that lived in an inline
   <style> of each page since step 12 (qualifications, publications, the
   teaching band), so that both languages share one copy.
   Tokens only (style.css :root and [data-theme="dark"]): no colour here
   needs a dark-mode override.
   ============================================ */

/* ----- Layout ----- */
.profile-layout {
    display: grid; gap: 32px;
    padding-top: 32px; padding-bottom: 64px;
}
.profile-main { min-width: 0; }
@media (min-width: 1024px) {
    .profile-layout {
        grid-template-columns: minmax(0, 1fr) minmax(280px, 320px);
        column-gap: 56px; align-items: start;
        padding-top: 56px; padding-bottom: var(--spacing-section);
    }
    /* The card comes first in the source (read first on a phone and by a
       screen reader), and sits in the right column here. */
    .profile-card { grid-column: 2; grid-row: 1; }
    .profile-main { grid-column: 1; grid-row: 1; }
}
/* Sticky only when the whole card fits under the fixed navigation bar
   (card about 670 px high + 94 px of offset, with a margin). */
@media (min-width: 1024px) and (min-height: 800px) {
    .profile-card { position: sticky; top: calc(var(--spacing-nav-height) + 24px); }
}

/* Sections of the main column: one background, separated by a rule. */
.profile-section { padding: 48px 0; border-top: 1px solid var(--border); }
.profile-section:first-child { padding-top: 0; border-top: 0; }
.profile-section:last-child { padding-bottom: 0; }
/* The proof list closes on its own rule: no second rule from the next section. */
.profile-section .proof-row:last-child { border-bottom: 0; }
@media (max-width: 640px) { .profile-section { padding: 40px 0; } }

/* Hero: the role is not split at its hyphen where the line is wide enough. */
@media (min-width: 640px) { .profile-role { white-space: nowrap; } }

/* ----- « En bref » card ----- */
.profile-card {
    background: var(--bg-alt); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 16px 18px;
}
.profile-card-title {
    font-size: 1rem; font-weight: 700; color: var(--text);
    line-height: 1.3; margin-bottom: 4px;
}
.glance { margin: 0; }
.glance > div {
    display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: 10px;
    padding: 7px 0; border-top: 1px solid var(--border);
}
.glance dt { font-size: var(--size-small); font-weight: 600; color: var(--text-secondary); line-height: 1.5; }
.glance dd { margin: 0; font-size: 0.9rem; color: var(--text); line-height: 1.5; }
.profile-card-actions {
    display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px;
    margin-top: 12px; padding-top: 16px; border-top: 1px solid var(--border);
}
.profile-card-actions .btn { width: 100%; }
.profile-card-docs { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 20px; }
.profile-card-docs a {
    display: inline-flex; align-items: center; min-height: 36px;
    color: var(--turquoise-text); font-size: var(--size-small); font-weight: 600;
    text-decoration: underline; text-underline-offset: 2px;
}
.profile-card-docs a:hover { color: var(--link-hover); }
/* Tablet: the rows on two columns, the button beside the documents. */
@media (min-width: 640px) and (max-width: 1023px) {
    .profile-card { padding: 24px; }
    .glance { display: grid; grid-template-columns: 1fr 1fr; column-gap: 32px; }
    .glance > div { grid-template-columns: 5.75rem minmax(0, 1fr); gap: 12px; padding: 8px 0; }
    .profile-card-actions .btn { width: auto; }
}
/* Sidebar: label above its value, the column is narrow. */
@media (min-width: 1024px) {
    .profile-card { padding: 20px 22px; }
    .glance > div { grid-template-columns: 1fr; gap: 0; padding: 8px 0; }
    .glance dd { line-height: 1.45; }
    .profile-card-docs { flex-direction: column; }
}
/* Portrait, once public/img/portrait.jpg exists (see the comment in the page). */
.profile-photo {
    width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover;
    border-radius: var(--radius-sm); margin-bottom: 16px; background: var(--bg);
}

/* ----- « Pourquoi me confier votre projet » ----- */
.why-title { margin-bottom: 24px; }
.why-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 24px; }
@media (min-width: 640px) { .why-list { grid-template-columns: 1fr 1fr; gap: 28px 32px; } }
.why-list li { border-top: 1px solid var(--border); padding-top: 16px; }
.why-list h3 { font-size: var(--size-h3); font-weight: 700; color: var(--text); line-height: 1.3; margin-bottom: 6px; }
.why-list p { color: var(--text-secondary); font-size: 0.95rem; line-height: 1.65; margin: 0; }
.why-list a { color: var(--turquoise-text); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.why-list a:hover { color: var(--link-hover); }

/* ----- Step 12 (F-090): verifiable qualifications ----- */
.proof-list { max-width: 880px; margin: 0; border-top: 1px solid var(--border); }
.proof-row { display: grid; grid-template-columns: 150px 1fr; gap: 24px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.proof-row dt { font-weight: 700; color: var(--text); font-size: 0.95rem; }
.proof-row dd { margin: 0; color: var(--text-secondary); font-size: 0.95rem; line-height: 1.65; }
.proof-row a { color: var(--turquoise-text); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.proof-row sup { line-height: 0; }
@media (max-width: 640px) { .proof-row { grid-template-columns: 1fr; gap: 2px; } }

/* ----- Publications (CMS block) ----- */
.publication-item { display: flex; gap: 24px; padding: 24px 0; border-bottom: 1px solid var(--border); }
.publication-item:last-child { border-bottom: none; }
.publication-year { font-size: 0.85rem; font-weight: 700; color: var(--turquoise-text); min-width: 80px; padding-top: 4px; }
.publication-content h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 4px; }
.publication-publisher { color: var(--text-secondary); font-size: 0.85rem; font-style: italic; margin-bottom: 8px; }
.publication-link { display: inline-flex; align-items: center; gap: 4px; min-height: 24px; color: var(--turquoise-text); font-weight: 600; font-size: 0.88rem; margin-top: 8px; transition: color 0.2s; }
.publication-link:hover { color: var(--link-hover); }
@media (max-width: 640px) { .publication-item { flex-direction: column; gap: 8px; } }

/* ----- Step 12 (F-090): « Je forme et je partage » ----- */
/* Stacked: the main column is too narrow for text and button side by side. */
.share-band { display: grid; gap: 20px; }
.share-band p { color: var(--text-secondary); max-width: 680px; line-height: 1.7; margin: 0; }
.share-band .btn { justify-self: start; }
