/* Manody stylesheet, part 11 — Finishing touches: pricing, login and sign-up, public page sharing, getting started, interface theme switcher.
   Loaded in order by core/templates/core/includes/stylesheets.html. */

/* ---------- Pricing: finishing touches ---------- */
.pricing-hero { position: relative; overflow: hidden; isolation: isolate; }
.pricing-hero .container { display: grid; justify-items: center; }
.pricing-hero h1 { font-weight: 800; letter-spacing: -0.045em; }

.pricing-trust {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 28px;
    margin: 36px 0 0;
    padding: 0;
    list-style: none;
    font-size: 0.88rem;
    font-weight: 500;
}

.pricing-trust li { display: inline-flex; align-items: center; gap: 8px; }

.pricing-trust svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    color: #059669;
}

.plan-card { transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease); }
.plan-card:hover { transform: translateY(-4px); }
.plan-card .plan-price strong { font-weight: 800; }
.plan-card.is-recommended { box-shadow: 0 24px 70px color-mix(in srgb, var(--brand-2) 20%, transparent); }
.plan-card.is-recommended .plan-cta .btn-primary { background: var(--brand-gradient); color: #ffffff; }
.plan-card.is-recommended .plan-features svg { color: var(--brand-2); }

/* ---------- Login and sign-up: finishing touches ---------- */
.page-auth main {
    position: relative;
    isolation: isolate;
    overflow: hidden;
}

.page-auth main::before {
    content: "";
    position: absolute;
    inset: -10% -10% auto;
    height: 560px;
    z-index: -1;
    background:
        radial-gradient(35% 45% at 25% 25%, color-mix(in srgb, var(--brand-1) 16%, transparent), transparent 70%),
        radial-gradient(30% 40% at 75% 15%, color-mix(in srgb, var(--brand-3) 13%, transparent), transparent 70%);
    filter: blur(20px);
    pointer-events: none;
}

.auth-card {
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.auth-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: var(--brand-gradient);
}

.auth-header h1 { font-weight: 800; letter-spacing: -0.035em; }

.signup-status { margin-top: 6px; padding-left: 2px; }

/* ---------- Public page: sharing and Manody invitation ---------- */
.share-button {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 15;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
    border-radius: 50%;
    background: color-mix(in srgb, var(--surface) 75%, transparent);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    color: var(--text);
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s var(--ease), box-shadow 0.2s ease;
}

.share-button:hover { transform: translateY(-1px) scale(1.04); box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12); }

.share-button svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.owner-bar ~ .share-button { top: 60px; }

.share-toast {
    position: fixed;
    top: 66px;
    right: 16px;
    z-index: 15;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--text);
    color: var(--bg);
    font-size: 0.8rem;
    font-weight: 500;
    animation: sheet-in 0.18s var(--ease);
}

.share-toast[hidden] { display: none; }

/* "Créé avec Manody" badge: discreet, then an invitation on hover */
.public-footer .made-with {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px 7px 8px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: color-mix(in srgb, var(--surface) 70%, transparent);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    color: var(--text-muted);
    transition: color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.public-footer .made-with:hover {
    color: var(--text);
    border-color: var(--text-muted);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.made-with-cta {
    max-width: 0;
    overflow: hidden;
    white-space: nowrap;
    opacity: 0;
    font-weight: 600;
    transition: max-width 0.35s var(--ease), opacity 0.25s ease;
}

.made-with:hover .made-with-cta,
.made-with:focus-visible .made-with-cta {
    max-width: 240px;
    opacity: 1;
}

/* On touch screens (no hover), the invitation stays visible. */
@media (hover: none) {
    .made-with-cta { max-width: none; opacity: 1; }
    .made-with-cta::before { content: "· "; font-weight: 400; }
}

/* Profile and links fade in gently */
.public-profile,
.public-links > li {
    animation: public-in 0.6s var(--ease) both;
}

.public-links > li:nth-child(1) { animation-delay: 0.06s; }
.public-links > li:nth-child(2) { animation-delay: 0.12s; }
.public-links > li:nth-child(3) { animation-delay: 0.18s; }
.public-links > li:nth-child(4) { animation-delay: 0.24s; }
.public-links > li:nth-child(5) { animation-delay: 0.3s; }
.public-links > li:nth-child(n+6) { animation-delay: 0.36s; }

@keyframes public-in {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .public-profile, .public-links > li { animation: none; }
}

/* The editor redraws the preview on every change: no entrance animation. */
.builder-stage .public-profile,
.builder-stage .public-links > li { animation: none; }

/* ---------- Dashboard: getting started and upgrading to Pro ---------- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.onboarding {
    background:
        linear-gradient(var(--surface), var(--surface)) padding-box,
        linear-gradient(120deg, color-mix(in srgb, var(--brand-1) 45%, var(--border)), color-mix(in srgb, var(--brand-3) 45%, var(--border))) border-box;
    border: 1px solid transparent;
}

.onboarding .card-header { align-items: flex-start; margin-bottom: 14px; }
.onboarding .card-header p { margin-top: 4px; }

.onboarding-score {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.onboarding-bar {
    height: 6px;
    margin-bottom: 16px;
    border-radius: 999px;
    background: var(--bg-soft);
    overflow: hidden;
}

.onboarding-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--brand-gradient);
    transition: width 0.6s var(--ease);
}

.onboarding-list {
    display: grid;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.onboarding-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.92rem;
}

.onboarding-list li:not(.is-done):hover { background: var(--bg-soft); }
.onboarding-list a { color: var(--text); font-weight: 500; text-decoration: none; }
.onboarding-list a::after { content: " →"; color: var(--text-muted); }
.onboarding-list li.is-done { color: var(--text-muted); text-decoration: line-through; text-decoration-color: var(--border-strong); }

.onboarding-check {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1.5px solid var(--border-strong);
    font-size: 0.72rem;
    font-weight: 700;
}

.is-done .onboarding-check {
    border: 0;
    background: #10b981;
    color: #ffffff;
}

.upsell-card {
    position: relative;
    display: grid;
    gap: 12px;
    margin-top: 20px;
    padding: 22px;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background:
        linear-gradient(var(--surface), var(--surface)) padding-box,
        var(--brand-gradient) border-box;
    border: 1.5px solid transparent;
    box-shadow: 0 18px 44px color-mix(in srgb, var(--brand-2) 16%, transparent);
}

.upsell-card::after {
    content: "";
    position: absolute;
    inset: -60% -40% auto auto;
    width: 220px;
    height: 220px;
    background: radial-gradient(closest-side, color-mix(in srgb, var(--brand-3) 22%, transparent), transparent);
    pointer-events: none;
}

.upsell-eyebrow { display: flex; align-items: center; gap: 8px; font-size: 0.82rem; font-weight: 600; color: var(--text-muted); }
.upsell-card h3 { font-size: 1.1rem; letter-spacing: -0.02em; line-height: 1.25; }

.upsell-card ul {
    display: grid;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 0.88rem;
}

.upsell-card li::before { content: "✓"; margin-right: 8px; font-weight: 700; color: var(--brand-2); }
.upsell-more { font-size: 0.82rem; color: var(--text-muted); text-align: center; text-decoration: none; }
.upsell-more:hover { color: var(--text); }

/* Last card of the grid: full width, in two columns. */
.bento-full {
    grid-column: 1 / -1;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    min-height: 0;
}

.bento-full .bento-text { order: -1; }

@media (max-width: 1024px) {
    .bento-full { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
    .bento-full { grid-template-columns: 1fr; }
    .bento-full .bento-text { order: 0; }
}

.audience-icon svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Grid: illustrations of equal height, large card vertically centered. */
.bento-card .bento-visual { min-height: 170px; }
.bento-wide { align-content: center; }
.bento-wide .bento-visual { min-height: 220px; }
.bento-full .bento-visual { min-height: 150px; }
.bento-card:not(.bento-wide):not(.bento-full) { align-content: start; }

/* Mobile: the hero column must never overflow the screen. */
@media (max-width: 900px) {
    .home-hero-inner { grid-template-columns: minmax(0, 1fr); }
    .hero-copy { min-width: 0; width: 100%; }
    .hero-copy > * { max-width: 100%; }
}

@media (max-width: 560px) {
    .hero-copy h1 { font-size: clamp(2.1rem, 10vw, 2.6rem); }
    .hero-copy .lead { font-size: 1.05rem; }
    .hero-chip { font-size: 0.8rem; text-align: left; }
    .home-hero { padding-top: 28px; }
}
@media (max-width: 900px) {
    .hero-copy { grid-template-columns: minmax(0, 1fr); }
    .hero-chip { white-space: normal; }
}
.section-head, .final-card, .pricing-hero .container { grid-template-columns: minmax(0, 1fr); }
.section-head > *, .final-card > * { max-width: 100%; }

/* Drawn flag: emoji flags do not render on Windows. */
.footer-badge { display: inline-flex; align-items: center; gap: 8px; }
.flag-fr { display: inline-flex; width: 18px; height: 12px; overflow: hidden; border-radius: 2px; box-shadow: 0 0 0 1px var(--border); }
.flag-fr i { flex: 1; }
.flag-fr i:nth-child(1) { background: #002395; }
.flag-fr i:nth-child(2) { background: #ffffff; }
.flag-fr i:nth-child(3) { background: #ed2939; }

/* Prefixed field: only the outer frame shows the focus. */
.input-prefixed input:focus,
.input-prefixed input:focus-visible { outline: none; box-shadow: none; border: 0; }
.signup-status:empty { display: none; }

/* The field placed in a prefixed frame (manody.com/…) has no border or shadow of its own:
   reinforced selector, because the general rule .field input:not(…) is more specific. */
.field .input-prefixed input:not([type="checkbox"]):not([type="radio"]):not([type="file"]) {
    height: 100%;
    padding: 0 0 0 2px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}
.nav-sheet .btn-primary,
.nav-sheet .btn-primary:hover { background: var(--accent); color: var(--accent-contrast); }

/* ---------- Interface theme switcher ---------- */
.theme-toggle {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.2s var(--ease);
}

.theme-toggle:hover { background: var(--bg-soft); border-color: var(--border-strong); }
.theme-toggle:active { transform: scale(0.94); }

.theme-toggle svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Icon: the moon offers dark mode, the sun offers light mode. */
.theme-icon-sun,
.theme-label-light { display: none; }
html[data-theme="dark"] .theme-icon-sun,
html[data-theme="dark"] .theme-label-light { display: inline; }
html[data-theme="dark"] .theme-icon-moon,
html[data-theme="dark"] .theme-label-dark { display: none; }

/* ---------- Language switcher (footer) ---------- */

.lang-switch { display: inline-flex; gap: 4px; margin: 0; }
.lang-switch button {
    border: 0; background: none; padding: 2px 6px; border-radius: 6px;
    color: inherit; font: inherit; opacity: .7; cursor: pointer;
}
.lang-switch button:hover { opacity: 1; }
.lang-switch button[aria-current="true"] { opacity: 1; font-weight: 600; background: var(--surface-2, rgba(127, 127, 127, .12)); }
