.public-profile {
    --profile-violet: #4b34c4;
    --profile-lilac: #efe9fc;
    min-height: 100dvh;
    background: #f8f6fb;
}

.public-profile-header {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: clamp(66px, 5.85vw, 90px);
    gap: 8px;
    padding-inline: clamp(18px, 4.5vw, 70px);
    background: #fff;
}

.public-profile-brand { font-size: clamp(29px, 2.55vw, 40px); }
.public-profile-brand img { width: clamp(38px, 3.2vw, 49px); }
.public-profile-business { display: grid; align-items: center; min-width: 0; min-height: 44px; }
.public-profile-business img { width: auto; height: auto; max-width: min(44vw, 180px); max-height: 46px; object-fit: contain; }
.public-profile-description { white-space: pre-line; overflow-wrap: anywhere; }

.public-profile-header .header-language summary {
    padding-inline: 8px 0;
    border: 0;
    background: transparent;
    font-size: clamp(16px, 1.35vw, 21px);
}

.public-profile-header .header-language summary:hover { background: #f3f0fd; }
.public-profile-header .language-label { display: none; }
.public-profile-header .language-short { margin: 0; }
.public-profile-header .language-options {
    position: absolute;
    inset-inline: auto 0;
    padding: 5px 9px;
    border: 1px solid #dfe2ee;
    border-radius: 14px;
    box-shadow: 0 12px 24px rgb(8 20 56 / .16);
}

.public-profile-header .language-options a { padding-inline: 8px; }

.public-profile-content {
    width: min(960px, calc(100% - 64px));
    margin-inline: auto;
    padding-top: clamp(36px, 5vw, 77px);
}

.public-profile-intro {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: clamp(17px, 2vw, 32px);
    min-height: clamp(210px, 17.45vw, 268px);
    padding: clamp(24px, 2.75vw, 42px);
    border-radius: 30px;
    background: #f2edfc;
}

.public-profile-art {
    position: absolute;
    z-index: -1;
    inset: 0 0 0 auto;
    width: 36%;
    pointer-events: none;
}

.public-profile-art img {
    width: 100%;
    height: 100%;
    mask-image: linear-gradient(to right, transparent, #000 44%);
}

.public-profile-initials {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: clamp(70px, 6.75vw, 104px);
    aspect-ratio: 1;
    border-radius: 50%;
    background: #dfd4f8;
    color: var(--profile-violet);
    font-size: clamp(28px, 2.85vw, 44px);
    font-weight: 740;
    letter-spacing: -.035em;
}

.public-profile-welcome { max-width: 545px; min-width: 0; }
.public-profile-welcome h1 {
    margin-bottom: 9px;
    font-size: clamp(36px, 3.6vw, 56px);
    font-weight: 755;
    letter-spacing: -.053em;
    line-height: 1.08;
    overflow-wrap: anywhere;
}

.public-profile-welcome p {
    color: var(--muted);
    font-size: clamp(18px, 1.55vw, 24px);
    line-height: 1.38;
}

.public-profile-motifs {
    display: grid;
    gap: 14px;
    margin: clamp(15px, 1.7vw, 26px) 0 0;
    padding: 0;
    list-style: none;
}

.public-profile-card {
    display: flex;
    align-items: center;
    gap: clamp(17px, 2.15vw, 33px);
    min-height: clamp(102px, 8.9vw, 137px);
    padding: clamp(17px, 1.55vw, 24px) clamp(17px, 1.7vw, 26px);
    border: 1px solid #dfd6f6;
    border-radius: 23px;
    background: #fff;
    box-shadow: 0 8px 20px rgb(43 29 83 / .055);
}

.public-profile-card :is(h2, h3) {
    color: var(--ink);
    font-size: clamp(22px, 2.1vw, 32px);
    font-weight: 720;
    letter-spacing: -.036em;
    line-height: 1.17;
    overflow-wrap: anywhere;
}

.public-profile-card p {
    margin-top: 8px;
    color: var(--muted);
    font-size: clamp(16px, 1.66vw, 26px);
    line-height: 1.25;
}

a.public-profile-card:hover { border-color: var(--profile-violet); }
.public-profile-motif-arrow {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: clamp(38px, 5vw, 68px);
    aspect-ratio: 1;
    margin-inline-start: auto;
    border-radius: 12px;
    background: var(--profile-lilac);
}

.public-profile-motif-arrow img {
    transform: rotate(180deg);
    filter: invert(20%) sepia(91%) saturate(3506%) hue-rotate(245deg);
}

.public-profile-motif-icon {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: clamp(66px, 5.85vw, 90px);
    aspect-ratio: 1;
    border-radius: 19px;
    background: color-mix(in srgb, var(--profile-accent, #4b34c4) 13%, white);
}

.public-profile-motif-icon img, .public-profile-initials img {
    filter: invert(20%) sepia(91%) saturate(3506%) hue-rotate(245deg);
}

.public-profile-initials.has-photo { overflow: hidden; background: #ffffff; }
.public-profile-initials.has-photo img.public-profile-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: none;
}

.public-profile-empty {
    margin-top: clamp(15px, 1.7vw, 26px);
    color: var(--muted);
    font-size: clamp(16px, 1.4vw, 21px);
}

.public-profile-footer {
    padding: clamp(25px, 3.25vw, 50px) 16px 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    column-gap: 18px;
}

.public-profile-footer a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-size: 14px;
}

.public-profile-attribution {
    color: var(--muted);
    font-weight: 650;
}

.public-profile-attribution:hover,
.public-profile-privacy {
    color: var(--profile-violet);
    text-decoration: underline;
    text-underline-offset: 2px;
}

@media (max-width: 640px) {
    .public-profile-header { min-height: 56px; }
    .public-profile-brand { gap: 6px; font-size: clamp(21px, 5.7vw, 25px); }
    .public-profile-brand img { width: 32px; }
    .public-profile-business img { max-height: 31px; }
    .public-profile-header .header-language summary { gap: 6px; font-size: 14px; }
    .public-profile-header .header-language summary img:first-child { width: 19px; height: 19px; }
    .public-profile-header .language-arrow { width: 15px; height: 15px; }
    .public-profile-content { width: calc(100% - 28px); padding-top: 26px; }
    .public-profile-intro {
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        gap: 5px;
        min-height: clamp(220px, 61vw, 260px);
        padding: 15px 22px 48px;
        border-radius: 17px;
    }

    .public-profile-art { inset: auto 0 0; width: auto; height: 33%; }
    .public-profile-art img { mask-image: linear-gradient(to bottom, transparent, #000 29%); }
    .public-profile-initials { width: 56px; font-size: 26px; }
    .public-profile-initials img { width: 26px; height: 26px; }
    .public-profile-welcome h1 { margin-bottom: 7px; font-size: clamp(28px, 8.3vw, 37px); }
    .public-profile-welcome p { font-size: 15px; line-height: 1.27; }
    .public-profile-card { gap: clamp(11px, 4.15vw, 19px); min-height: 74px; padding: 12px; border-radius: 14px; }
    .public-profile-card :is(h2, h3) { font-size: clamp(16px, 4.6vw, 20px); }
    .public-profile-card p { margin-top: 5px; font-size: 14px; }
    .public-profile-motif-icon { width: 49px; border-radius: 11px; }
    .public-profile-motif-icon img { width: 29px; height: 29px; }
    .public-profile-footer { padding-top: 22px; }
}

/* Forfaits de séances en vente, sous les motifs. */
.public-profile-packages { margin-top: clamp(26px, 3vw, 40px); }
.public-profile-packages > h2 { color: var(--ink); font-size: clamp(20px, 1.8vw, 26px); font-weight: 720; letter-spacing: -.03em; }

/* Logo du professionnel dans le rond d’accueil, quand il n’a pas de photo. */
.public-profile-initials.has-photo img.public-profile-logo-mark { padding: 14%; object-fit: contain; }

/* Motifs et catégories : thèmes Liste, Cartes, Sections et Onglets. */
.public-catalog { --category-accent: var(--profile-accent, #4b34c4); margin-top: clamp(18px, 2vw, 30px); }
.public-motifs { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.public-motifs--columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.public-motif {
    position: relative;
    display: flex;
    align-items: center;
    gap: clamp(12px, 1.4vw, 18px);
    min-height: 92px;
    padding: clamp(14px, 1.3vw, 20px) clamp(14px, 1.5vw, 22px);
    border: 1px solid #e6e1f2;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 6px 18px rgb(43 29 83 / .05);
    transition: border-color .15s, box-shadow .15s, transform .15s;
}
.public-motif:hover { border-color: var(--category-accent); box-shadow: 0 10px 26px rgb(43 29 83 / .09); }
.public-motif:focus-within { outline: 3px solid var(--category-accent); outline-offset: 2px; }
.public-motif-stripe { flex: 0 0 6px; align-self: stretch; border-radius: 6px; background: var(--category-accent); }
.public-motif-body { flex: 1; min-width: 0; }
.public-motif h3 {
    color: var(--ink);
    font-size: clamp(17px, 1.45vw, 21px);
    font-weight: 720;
    letter-spacing: -.02em;
    line-height: 1.25;
    overflow-wrap: anywhere;
}
.public-motif-link { color: inherit; outline: none; }
.public-motif-link::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.public-motif-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 6px; color: var(--muted); font-size: 14px; }
.public-motif-meta > span { display: inline-flex; align-items: center; gap: 5px; }
.public-motif-meta img { opacity: .7; }
.public-motif-badge {
    padding: 3px 10px;
    border: 1px solid #fed7aa;
    border-radius: 99px;
    background: #fff7ed;
    color: #b43c07;
    font-size: 13px;
    font-weight: 700;
}
.public-motif-badge.is-free { border-color: #a7f3d0; background: #ecfdf5; color: #047857; }
.public-motif-description { margin-top: 8px; color: #4b5060; font-size: 14px; line-height: 1.45; white-space: pre-line; overflow-wrap: anywhere; }
.public-motif-description.is-clamped { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.public-motif-more {
    position: relative;
    z-index: 2;
    margin-top: 4px;
    padding: 4px 0;
    border: 0;
    background: none;
    color: var(--profile-violet);
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}
.public-motif-more:hover { text-decoration: underline; }
.public-motif-arrow {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 42px;
    aspect-ratio: 1;
    border-radius: 12px;
    background: var(--category-accent);
}
.public-motif-arrow img { transform: rotate(180deg); filter: brightness(0) invert(1); }

.public-group-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: clamp(22px, 2.4vw, 34px) 0 12px;
    color: var(--ink);
    font-size: clamp(19px, 1.6vw, 24px);
    font-weight: 740;
    letter-spacing: -.03em;
}
.public-group-title::before { content: ""; width: 6px; height: 1.1em; border-radius: 6px; background: var(--category-accent); }
.public-catalog > .public-group-title:first-child { margin-top: 0; }

.public-category { margin-top: clamp(22px, 2.6vw, 38px); }
.public-category:first-child { margin-top: 0; }
.public-category-banner {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    min-height: clamp(104px, 11vw, 150px);
    padding: clamp(16px, 1.6vw, 24px);
    border-radius: 20px;
    background:
        radial-gradient(rgb(255 255 255 / .28) 1.5px, transparent 1.6px) 0 0 / 18px 18px,
        linear-gradient(135deg, var(--category-accent) 0%, color-mix(in srgb, var(--category-accent) 72%, white) 55%, color-mix(in srgb, var(--category-accent) 30%, white) 100%);
}
.public-category-banner > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.public-category-banner.has-image::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgb(10 12 30 / .62), rgb(10 12 30 / 0) 65%); }
.public-category-title {
    position: relative;
    z-index: 1;
    color: #fff;
    font-size: clamp(22px, 2.1vw, 30px);
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1.15;
    text-shadow: 0 1px 10px rgb(0 0 0 / .22);
    overflow-wrap: anywhere;
}
.public-category-summary { margin: 12px 0 14px; color: var(--muted); font-size: clamp(15px, 1.2vw, 17px); line-height: 1.45; }
.public-category-banner + .public-motifs { margin-top: 14px; }
.public-category-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    margin-bottom: 8px;
    color: var(--profile-violet);
    font-size: 15px;
    font-weight: 700;
}
.public-category-back:hover { text-decoration: underline; }
.public-category-missing { margin-bottom: 14px; padding: 12px 14px; border-radius: 12px; background: #fff7ed; color: #9a3412; font-size: 14px; }

/* Cartes : une grande carte par catégorie. */
.public-category-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 18px; margin: 0; padding: 0; list-style: none; }
.public-category-card {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid #e6e1f2;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 6px 18px rgb(43 29 83 / .06);
    transition: box-shadow .15s, transform .15s, border-color .15s;
}
.public-category-card:hover { border-color: var(--category-accent); box-shadow: 0 14px 30px rgb(43 29 83 / .11); transform: translateY(-2px); }
.public-category-card:focus-within { outline: 3px solid var(--category-accent); outline-offset: 2px; }
.public-category-card .public-category-banner { min-height: 150px; border-radius: 0; }
.public-category-card-body { display: flex; flex: 1; flex-direction: column; gap: 12px; padding: 16px 18px 18px; }
.public-category-card-body > p:first-child { color: var(--muted); font-size: 14px; line-height: 1.45; }
.public-category-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; color: var(--profile-violet); font-size: 14px; font-weight: 650; }
.public-category-card-link { display: grid; place-items: center; width: 38px; aspect-ratio: 1; border-radius: 11px; background: var(--category-accent); outline: none; }
.public-category-card-link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.public-category-card-link img { transform: rotate(180deg); filter: brightness(0) invert(1); }
.public-catalog--cards .public-category-cards + .public-category { margin-top: clamp(26px, 3vw, 42px); }

/* Sections : raccourcis puis toutes les catégories. */
.public-category-jump { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: clamp(18px, 2vw, 28px); }
.public-category-jump a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 6px 14px;
    border: 1px solid #e2e0ea;
    border-radius: 99px;
    background: #fff;
    color: var(--ink);
    font-size: 14px;
    font-weight: 650;
}
.public-category-jump a::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--category-accent); }
.public-category-jump a:hover { border-color: var(--category-accent); }
.public-catalog--sections .public-category-summary { margin-bottom: 12px; }
.public-catalog--sections .public-motif { align-items: flex-start; }

/* Onglets : une catégorie à la fois. */
.public-category-tabs { display: flex; gap: 10px; margin-bottom: 20px; padding-bottom: 4px; overflow-x: auto; scrollbar-width: thin; }
.public-category-tabs a {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 10px;
    min-height: 50px;
    padding: 7px 14px 7px 8px;
    border: 1px solid #e2e0ea;
    border-radius: 14px;
    background: #fff;
    color: var(--ink);
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
}
.public-category-tabs a small { color: var(--muted); font-size: 13px; font-weight: 650; }
.public-category-tabs a[aria-current="page"] {
    border: 2px solid var(--category-accent);
    background: color-mix(in srgb, var(--category-accent) 8%, white);
}
.public-tab-mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--category-accent), color-mix(in srgb, var(--category-accent) 40%, white)) center / cover;
}
.public-category-tabbed { display: grid; grid-template-columns: minmax(220px, 300px) minmax(0, 1fr); gap: 20px; align-items: start; }
.public-category-side { overflow: hidden; border: 1px solid #e6e1f2; border-radius: 20px; background: #fff; }
.public-category-side .public-category-banner { min-height: 170px; border-radius: 0; }
.public-category-side-body { display: grid; gap: 10px; padding: 16px 18px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.public-category-side-foot { color: #7a7f8c; font-size: 13px; }

@media (max-width: 760px) {
    .public-motifs--columns, .public-category-tabbed { grid-template-columns: minmax(0, 1fr); }
    .public-motif { min-height: 80px; padding: 12px; border-radius: 15px; }
    .public-motif-arrow { width: 36px; border-radius: 10px; }
    .public-motif-arrow img { width: 18px; height: 18px; }
    .public-category-banner { min-height: 96px; border-radius: 16px; }
    .public-category-side .public-category-banner { min-height: 110px; }
    .public-category-tabs { margin-inline: -14px; padding-inline: 14px; }
}

@media (prefers-reduced-motion: reduce) {
    .public-motif, .public-category-card { transition: none; }
    .public-category-card:hover { transform: none; }
}
.public-category-back + .public-category { margin-top: 4px; }
.public-category-tabs a:first-child .public-tab-mark { background: #eceaf3 url("../icons/category.svg") center / 20px no-repeat; }

/* Bandeau éteint : seul le titre reste. */
.public-profile-plain { display: grid; gap: 8px; margin-bottom: 8px; }
.public-profile-plain h1 { font-size: clamp(30px, 3.2vw, 46px); font-weight: 755; letter-spacing: -.045em; line-height: 1.1; overflow-wrap: anywhere; }
.public-profile-plain p { max-width: 640px; color: var(--muted); font-size: clamp(16px, 1.3vw, 19px); line-height: 1.45; }

/* Onglets des catégories sur téléphone : fondu au bord pour montrer qu’on peut faire défiler. */
@media (max-width: 760px) {
    .public-category-tabs { scroll-snap-type: x proximity; mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent); scrollbar-width: none; }
    .public-category-tabs::-webkit-scrollbar { display: none; }
    .public-category-tabs.is-end { mask-image: none; }
    .public-category-tabs a { scroll-snap-align: start; flex: 0 0 auto; }
}
