/* ── Mon profil ─────────────────────────────────────────────────────────────────────────────
   Read-only: the banner, then two even columns of cards — the licence, its contact details and the
   identity on the left; the e-mails, the account and the minibus on the right. Labels and values
   read side by side; a blue child, a yellow me. One column under 1100 px. */

.pf {
    display: flex;
    flex-direction: column;
    gap: 28px;
    padding: 32px 40px 56px;
}

.pf--state { align-items: center; justify-content: center; min-height: 60vh; }

.pf-mono { font-family: var(--font-mono); }
.pf-strong { font-weight: 700; }
.pf-dash { color: var(--dark-fg-3); }

/* A card's title. */
.pf-label {
    margin: 0;
    font: 800 18px/1.2 var(--font-condensed);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #fff;
}

.pf-count { font-family: var(--font-mono); color: var(--dark-fg-2); letter-spacing: 0; margin-left: 6px; }

/* Pills: roles and positions outlined and neutral, squads blue, a status white (done) or yellow. */
.pf-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }

.pf-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 24px;
    padding: 2px 10px;
    border-radius: 999px;
    box-shadow: inset 0 0 0 1px var(--dark-border-2);
    font: 700 12px/1.2 var(--font-condensed);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--dark-fg-2);
    white-space: nowrap;
}

.pf-chip--mono { font: 600 12px/1.2 var(--font-mono); letter-spacing: 0.04em; }
.pf-chip--blue { box-shadow: none; background: rgba(52, 164, 224, 0.14); color: var(--thonon-blue-bright); }
.pf-chip--ok { box-shadow: none; background: var(--thonon-graphite); color: #fff; }
.pf-chip--warn { box-shadow: none; background: rgba(240, 192, 48, 0.14); color: var(--thonon-yellow); }

.pf-avatar {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--thonon-yellow);
    font: 800 24px/1 var(--font-condensed);
    color: var(--thonon-black);
}

.pf-avatar--child { background: var(--thonon-blue); color: #fff; }
.pf-avatar--sm { width: 40px; height: 40px; font-size: 15px; }

/* The banner (app.css .pg-hero): the avatar, the name and its roles, the password on the right. */
.pf-head__row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 18px 20px;
}

.pf-head__text { display: flex; flex-direction: column; gap: 8px; min-width: 0; flex: 1 1 320px; }

.pf-head__action { margin-left: auto; }

/* Read-only band */
.pf-ro {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 14px 16px;
    border: 1px solid var(--dark-border-1);
    border-radius: var(--radius-card);
    background: var(--thonon-surface-2);
    font-size: 15px;
    line-height: 1.45;
    color: var(--dark-fg-2);
}

.pf-ro svg { flex-shrink: 0; color: var(--thonon-blue-bright); fill: currentColor; }

/* Grid: two even columns. */
.pf-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 20px;
}

.pf-main, .pf-rail { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.pf-main > *, .pf-rail > * { flex-shrink: 0; }

/* Cards and fields */
.pf-block {
    border: 1px solid var(--dark-border-1);
    border-radius: var(--radius-card);
    background: var(--thonon-night);
}

.pf-block__head, .pf-sub__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 20px 20px 0;
}

.pf-block__body { padding: 14px 20px 20px; }

.pf-sub { border-top: 1px solid var(--dark-border-1); }
.pf-sub__body { padding: 12px 20px 20px; }

/* A label beside its value (site.css .kv): each field's dt and dd join the card's grid. */
.pf-fields {
    display: grid;
    grid-template-columns: minmax(140px, 200px) minmax(0, 1fr);
    gap: 10px 16px;
    margin: 0;
}

.pf-block__body.pf-fields { padding: 14px 20px 20px; }
.pf-status + .pf-fields { margin-top: 16px; }

.pf-field { display: contents; }

.pf-field dt {
    padding-top: 2px;
    font: 700 13px/1.3 var(--font-condensed);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--dark-fg-3);
}

.pf-field dd {
    margin: 0;
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: 15px;
    line-height: 1.4;
    color: #fff;
}

/* The status, put forward: its pill, then what it means. */
.pf-status {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 12px;
}

.pf-status__dot { display: none; }
.pf-status__text { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; flex: 1 1 auto; min-width: 0; }

.pf-status__label {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 2px 10px;
    border-radius: 999px;
    background: var(--thonon-graphite);
    font: 700 12px/1.2 var(--font-condensed);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #fff;
}

.pf-status--ok .pf-status__label::before { content: "✓ "; }
.pf-status--warn .pf-status__label { background: rgba(240, 192, 48, 0.14); color: var(--thonon-yellow); }

.pf-status__sentence { font-size: 15px; color: var(--dark-fg-2); }
.pf-status__number { display: none; }

/* No licence */
.pf-empty {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px;
    border: 1px dashed var(--dark-border-2);
    border-radius: var(--radius-card);
}

.pf-empty__head { display: flex; align-items: center; gap: 12px; }

.pf-empty__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--dark-border-2);
    color: var(--dark-fg-3);
}

.pf-empty__title {
    margin: 0;
    font: 800 18px/1.2 var(--font-condensed);
    text-transform: uppercase;
    color: #fff;
}

.pf-empty__text { margin: 0; max-width: 560px; font-size: 15px; line-height: 1.55; color: var(--dark-fg-2); }

/* A card's links (Minibus): a row each, with its line under. */
.pf-link {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 64px;
    padding: 10px 20px;
    border-top: 1px solid var(--dark-border-1);
    color: var(--dark-fg-3);
    text-decoration: none;
}

.pf-block__head + .pf-link { margin-top: 14px; }
.pf-link:hover { background: var(--thonon-surface-2); }
.pf-link > span { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.pf-link b { font-size: 16px; font-weight: 600; color: #fff; }
.pf-link small { font-size: 14px; color: var(--dark-fg-2); }
.pf-link ::deep svg, .pf-link svg { fill: currentColor; }

/* Children: open cards on a desktop */
.pf-children { display: flex; flex-direction: column; gap: 12px; }

.pf-children__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }

.pf-children__title {
    margin: 0;
    font: 700 13px/1.2 var(--font-condensed);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #fff;
}

.pf-children__note { font-size: 13px; color: var(--dark-fg-3); }

.pf-child {
    border: 1px solid var(--dark-border-1);
    border-radius: var(--radius-card);
    background: var(--thonon-night);
    box-shadow: inset 0 3px 0 var(--thonon-blue);
}

.pf-child__head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 16px; }

.pf-child__name {
    margin: 0;
    font: 700 17px/1.1 var(--font-condensed);
    text-transform: uppercase;
    color: #fff;
}

.pf-child__number { margin-left: auto; font: 700 12px/1 var(--font-mono); color: var(--dark-fg-2); }

/* Children: a push list on a phone */
.pf-kids {
    display: none;
    overflow: hidden;
    border: 1px solid var(--dark-border-1);
    border-radius: var(--radius-card);
    background: var(--thonon-night);
}

.pf-kid {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 60px;
    padding: 0 12px;
    color: var(--dark-fg-3);
    text-decoration: none;
}

.pf-kid + .pf-kid { border-top: 1px solid var(--dark-border-1); }
.pf-kid__text { display: flex; flex-direction: column; gap: 4px; flex: 1 1 auto; min-width: 0; }
.pf-kid__name { font-size: 14px; color: #fff; }

.pf-kid__sub {
    display: flex;
    align-items: center;
    gap: 6px;
    font: 700 12px/1.2 var(--font-condensed);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--dark-fg-2);
}

.pf-kid__sep { color: var(--dark-fg-3); }
.pf-kid__status--ok { color: #22C55E; }
.pf-kid__status--warn { color: var(--thonon-yellow); }
.pf-kid__status::before { content: "● "; }

/* The e-mails block, with its switches */
.pf-mails__title {
    margin: 4px 0 8px;
    font: 700 20px/1.2 var(--font-condensed);
    text-transform: uppercase;
    color: #fff;
}

.pf-mails__intro { margin: 0 0 4px; font-size: 13px; line-height: 1.5; color: var(--dark-fg-2); }
.pf-mails__addresses { margin: 0; font-size: 12px; line-height: 1.5; color: var(--dark-fg-3); overflow-wrap: anywhere; }
.pf-mails__error { margin: 0 0 10px; font-size: 13px; color: #F06A75; }

/* Read by a screen reader once a switch is saved, never shown. */
.pf-mails .visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* The pushed screen of a child */
.pf-push__head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--dark-border-1);
}

.pf-back {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    color: #fff;
}

.pf-push__text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }

.pf-push__name {
    overflow: hidden;
    font: 700 17px/1.1 var(--font-condensed);
    text-transform: uppercase;
    color: #fff;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pf-push__sub { font-size: 13px; color: var(--dark-fg-3); }

/* Skeleton: the real structure, no spinner, no text */
.pf-skel { display: block; border-radius: 3px; background: rgba(255, 255, 255, 0.055); }
.pf-skel--avatar { width: 54px; height: 54px; border-radius: 50%; flex-shrink: 0; }
.pf-skel--title { width: 45%; height: 22px; }
.pf-skel--chip { width: 130px; height: 20px; }
.pf-skel--label { width: 120px; height: 10px; }
.pf-skel--key { width: 60%; height: 8px; }
.pf-skel--value { width: 90%; height: 12px; }

/* Error */
.pf-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: min(460px, 100%);
    padding: 28px 24px;
    border: 1px solid var(--dark-border-1);
    border-radius: 6px;
    background: var(--thonon-night);
    text-align: center;
}

.pf-error__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(240, 32, 48, 0.14);
    color: #F02030;
}

.pf-error__title {
    margin: 0;
    font: 700 20px/1.2 var(--font-condensed);
    text-transform: uppercase;
    color: #fff;
}

.pf-error__text { margin: 0; font-size: 13px; line-height: 1.55; color: var(--dark-fg-2); }

.pf-error__retry {
    height: 36px;
    padding: 0 18px;
    border: 0;
    border-radius: 4px;
    background: var(--thonon-yellow);
    font: 700 14px/1 var(--body-font, inherit);
    color: var(--thonon-black);
    cursor: pointer;
}

.pf-error__code { margin: 0; font-size: 13px; color: var(--dark-fg-3); }

/* Under 1100 px: one column. */
@media (max-width: 1099px) {
    .pf { gap: 24px; padding: 24px 24px 40px; }
    .pf-grid { grid-template-columns: minmax(0, 1fr); }
}

/* A phone: labels over their values, the children as a push list. */
@media (max-width: 699px) {
    .pf { gap: 22px; padding: 20px 16px 32px; }
    .pf-avatar { width: 52px; height: 52px; font-size: 20px; }
    .pf-head__action { width: 100%; }

    .pf-fields { grid-template-columns: minmax(0, 1fr); gap: 2px 0; }
    .pf-field dd { margin-bottom: 10px; }

    .pf-children { display: none; }
    .pf-kids { display: block; }

    .pf-error { padding: 24px 16px; }
    .pf-error__retry { width: 100%; height: 44px; }
}

/* « Changer mon mot de passe », from the « Compte » block. */
.pf-account-actions { padding-top: 0; }

.pf-pw__head { display: flex; flex-direction: column; gap: 8px; }
.pf-pw__forgot { margin: 16px 0 0; font-size: 15px; color: var(--dark-fg-2); }
.pf-pw__form { display: flex; flex-direction: column; gap: 18px; }
.pf-pw__missing { font-size: 13px; color: #FF8A93; }
.pf-pw__notice {
    margin: 0 0 16px;
    padding: 10px 12px;
    border: 1px solid rgba(240, 32, 48, 0.35);
    border-radius: 6px;
    background: rgba(240, 32, 48, 0.10);
    color: var(--dark-fg-1);
    font-size: 15px;
}
.pf-pw__notice--ok {
    border-color: rgba(52, 164, 224, 0.35);
    background: rgba(52, 164, 224, 0.10);
}
.pf-pw__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
