/* My GENYSIS homepage — design system from design/index.html */
.page-home {
    --mg-teal: #0081e5;
    --mg-teal-dark: #006bbf;
    --mg-teal-soft: #005a9e;
    --mg-ink: #0f1f2b;
    --mg-ink-soft: #2a3341;
    --mg-muted: #6b7683;
    --mg-body: #4a5566;
    --mg-nav: #3d4757;
    --mg-border: #eef1f4;
    --mg-border-card: #e6eaef;
    --mg-border-soft: #d7e5f0;
    --mg-border-btn: #cdd8d5;
    --mg-bg: #ffffff;
    --mg-bg-soft: #f5f9fc;
    --mg-bg-mint: #f0f6fc;
    --mg-chip: #d6dee2;
    --mg-placeholder: #eef3f8;
    --mg-placeholder-alt: #e6eef5;
    --mg-font: 'Space Grotesk', 'Instrument Sans', system-ui, sans-serif;
}

.page-home {
    font-family: var(--mg-font);
    background: var(--mg-bg) !important;
    color: var(--mg-ink);
}

.page-home main {
    background: var(--mg-bg) !important;
}

/* Force light brand chrome on homepage & catalogue */
.page-home .theme-nav,
.page-catalogue .theme-nav {
    background: #fff !important;
    border-color: var(--mg-border) !important;
}

.page-home .theme-nav .theme-link,
.page-home .theme-nav a.theme-link {
    color: var(--mg-nav) !important;
    border-color: transparent !important;
}

.page-home .theme-nav .theme-link:hover,
.page-home .theme-nav a.theme-link:hover {
    color: var(--mg-ink) !important;
}

.page-home .theme-nav a[aria-current="page"] {
    color: var(--mg-teal) !important;
    font-weight: 600;
    border-bottom: none;
}

.page-home .theme-logo-text {
    font-family: var(--mg-font);
    font-weight: 700;
    font-size: 23px;
    color: var(--mg-teal);
    line-height: 1;
}

.page-home .theme-logo-image {
    filter: invert(1) brightness(0.12);
    height: 20px;
    max-width: 108px;
    width: auto;
    object-fit: contain;
}

.page-home a.btn-nav-login,
.page-home .btn-nav-login {
    background: #0081e5 !important;
    background-color: #0081e5 !important;
    color: #fff !important;
    border-radius: 9px;
    padding: 11px 22px;
    font-weight: 600;
}

.page-home a.btn-nav-login:hover,
.page-home .btn-nav-login:hover {
    background: #006bbf !important;
    background-color: #006bbf !important;
}

.page-home .theme-toggle {
    border-color: var(--mg-border);
    color: var(--mg-nav);
}

.page-home .theme-footer {
    background: var(--mg-ink) !important;
    border-color: transparent !important;
    color: #a9c4bf;
}

.page-home .theme-footer h3 {
    color: #fff !important;
}

.page-home .theme-footer .theme-link,
.page-home .theme-footer a {
    color: #a9c4bf !important;
}

.page-home .theme-footer .theme-link:hover,
.page-home .theme-footer a:hover {
    color: #fff !important;
}

.page-home .theme-footer .theme-logo-text {
    color: #7ec8f5;
}

.page-home .theme-footer .theme-logo-image {
    filter: none;
    height: 19px;
}

.page-home .theme-footer .theme-secondary {
    color: #a9c4bf !important;
}

.page-home .theme-footer .border-t {
    border-color: rgba(169, 196, 191, 0.2) !important;
}

/* Homepage sections */
.home {
    color: var(--mg-ink);
    font-family: var(--mg-font);
}

.home a {
    text-decoration: none;
}

.home-hero {
    position: relative;
    padding: 88px 24px 72px;
    text-align: center;
    overflow: hidden;
    background: var(--mg-bg-soft);
}

.home-hero__glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 60% 55% at 50% 0%, rgba(0, 129, 229, 0.12), transparent 70%);
    pointer-events: none;
}

.home-hero__inner {
    position: relative;
    max-width: 1120px;
    margin: 0 auto;
}

.home-hero__eyebrow {
    font-size: 13px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--mg-teal-dark);
    font-weight: 700;
    margin-bottom: 22px;
}

.home-hero__title {
    font-size: clamp(2.25rem, 5vw, 3.875rem);
    line-height: 1.04;
    letter-spacing: -0.02em;
    color: var(--mg-ink);
    margin: 0 auto 22px;
    max-width: 880px;
    font-weight: 700;
}

.home-hero__lead {
    font-size: 19px;
    line-height: 1.6;
    color: var(--mg-body);
    margin: 0 auto 36px;
    max-width: 600px;
}

.home-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: center;
    margin-bottom: 44px;
}

.home-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    padding: 16px 30px;
    border-radius: 11px;
    transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
}

.home-btn:hover {
    transform: translateY(-1px);
}

.home-btn--primary {
    color: #fff;
    background: var(--mg-teal);
}

.home-btn--primary:hover {
    background: var(--mg-teal-dark);
    color: #fff;
}

.home-btn--secondary {
    color: var(--mg-ink);
    background: #fff;
    border: 1px solid var(--mg-border-btn);
}

.home-btn--secondary:hover {
    border-color: var(--mg-teal);
    color: var(--mg-ink);
}

.home-btn--block {
    display: block;
    width: 100%;
    padding: 14px;
    text-align: center;
    font-size: 15px;
}

.home-hero__visual {
    aspect-ratio: 16 / 7;
    max-width: 900px;
    margin: 0 auto;
    border-radius: 18px;
    background: repeating-linear-gradient(
        135deg,
        var(--mg-placeholder),
        var(--mg-placeholder) 12px,
        var(--mg-placeholder-alt) 12px,
        var(--mg-placeholder-alt) 24px
    );
    border: 1px solid #dbe6e3;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.home-hero__visual video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: none;
    z-index: 1;
}

.home-hero__visual-label {
    font-family: ui-monospace, monospace;
    font-size: 12px;
    color: #8a9c98;
    background: #fff;
    padding: 8px 12px;
    border-radius: 6px;
}

.home-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-bottom: 1px solid var(--mg-border);
    max-width: 1120px;
    margin: 0 auto;
    width: 100%;
}

.home-stats__item {
    padding: 28px 40px;
    border-right: 1px solid var(--mg-border);
    text-align: center;
}

.home-stats__item:last-child {
    border-right: none;
}

.home-stats__value {
    font-size: 34px;
    color: var(--mg-teal);
    font-weight: 700;
    line-height: 1.1;
}

.home-stats__label {
    font-size: 14px;
    color: var(--mg-muted);
    margin-top: 4px;
}

.home-section {
    padding: 64px 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.home-section--tight-top {
    padding-top: 64px;
    padding-bottom: 8px;
}

.home-section--tight-bottom {
    padding-top: 72px;
    padding-bottom: 56px;
}

.home-section__title {
    font-size: clamp(1.75rem, 3vw, 2.375rem);
    color: var(--mg-ink);
    margin: 0 0 6px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.home-section__title--center {
    text-align: center;
    margin-bottom: 28px;
}

.home-section__lead {
    margin: 0 0 28px;
    color: var(--mg-muted);
    font-size: 16px;
}

.home-section__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.home-section__link {
    font-size: 15px;
    font-weight: 600;
    color: var(--mg-teal);
    white-space: nowrap;
}

.home-section__link:hover {
    color: var(--mg-teal-dark);
}

.home-professions {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
}

.home-profession {
    border-radius: 16px;
    padding: 22px 20px;
    display: block;
    transition: transform 0.15s, box-shadow 0.15s;
}

.home-profession:hover {
    transform: translateY(-2px);
}

.home-profession--active {
    background: var(--mg-teal);
    color: #fff;
}

.home-profession--active .home-profession__desc {
    color: #cdeeea;
}

.home-profession--muted {
    background: var(--mg-bg-mint);
    border: 1px solid var(--mg-border-soft);
}

.home-profession__title {
    font-weight: 700;
    font-size: 18px;
    margin-bottom: 6px;
    color: inherit;
}

.home-profession--muted .home-profession__title {
    color: var(--mg-ink);
}

.home-profession__desc {
    font-size: 13px;
    color: var(--mg-muted);
    line-height: 1.45;
}

.home-courses {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.home-course {
    background: #fff;
    border: 1px solid var(--mg-border-card);
    border-radius: 16px;
    overflow: hidden;
    display: block;
    transition: transform 0.15s, box-shadow 0.15s;
}

.home-course:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px -18px rgba(15, 43, 40, 0.35);
}

.home-course__media {
    aspect-ratio: 16 / 9;
    background: repeating-linear-gradient(
        135deg,
        var(--mg-placeholder),
        var(--mg-placeholder) 10px,
        var(--mg-placeholder-alt) 10px,
        var(--mg-placeholder-alt) 20px
    );
    position: relative;
    display: flex;
    align-items: flex-end;
    padding: 14px;
    overflow: hidden;
}

.home-course__media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.home-course__media-label {
    position: relative;
    z-index: 1;
    font-family: ui-monospace, monospace;
    font-size: 11px;
    color: #8a9c98;
    background: #fff;
    padding: 4px 8px;
    border-radius: 5px;
}

.home-course__body {
    padding: 20px;
}

.home-course__meta {
    color: var(--mg-teal);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.home-course__title {
    color: var(--mg-ink);
    font-weight: 600;
    font-size: 17px;
    line-height: 1.35;
}

.home-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.home-tag {
    border: 1px solid var(--mg-chip);
    color: var(--mg-nav);
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 14px;
    background: #fff;
    transition: border-color 0.15s, color 0.15s;
}

.home-tag:hover {
    border-color: var(--mg-teal);
    color: var(--mg-teal-dark);
}

.home-cotisation {
    margin: 0 24px 64px;
    max-width: 1152px;
    margin-left: auto;
    margin-right: auto;
    border: 1px solid rgba(0, 129, 229, 0.3);
    border-radius: 20px;
    padding: 48px;
    background: linear-gradient(160deg, #f0f6fc, #f5f9fc);
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 48px;
    align-items: center;
}

.home-cotisation__badge {
    display: inline-block;
    background: rgba(0, 129, 229, 0.12);
    color: var(--mg-teal-dark);
    font-size: 13px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 100px;
    margin-bottom: 18px;
}

.home-cotisation__title {
    font-size: clamp(1.5rem, 2.5vw, 2.125rem);
    color: var(--mg-ink);
    margin: 0 0 16px;
    font-weight: 700;
}

.home-cotisation__benefits {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 28px;
}

.home-cotisation__benefit {
    font-size: 15px;
    color: var(--mg-nav);
}

.home-cotisation__price-card {
    background: #fff;
    border-radius: 16px;
    padding: 28px;
    color: var(--mg-ink);
    box-shadow: 0 16px 34px -20px rgba(0, 129, 229, 0.4);
}

.home-cotisation__from {
    font-size: 14px;
    color: var(--mg-muted);
}

.home-cotisation__price {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin: 4px 0;
}

.home-cotisation__amount {
    font-size: 44px;
    font-weight: 700;
    line-height: 1;
}

.home-cotisation__unit {
    color: var(--mg-muted);
    font-size: 15px;
}

.home-cotisation__period {
    font-size: 13px;
    color: var(--mg-muted);
    margin-bottom: 6px;
}

.home-cotisation__saving {
    font-size: 13px;
    font-weight: 600;
    color: var(--mg-teal-soft);
    background: #dcfaf3;
    padding: 6px 10px;
    border-radius: 8px;
    margin-bottom: 18px;
    display: inline-block;
}

.home-cotisation__note {
    text-align: center;
    font-size: 12px;
    color: #8a95a3;
    margin-top: 12px;
}

.home-why {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.home-why__card {
    background: #fff;
    border: 1px solid var(--mg-border-card);
    border-radius: 16px;
    padding: 26px;
}

.home-why__icon {
    width: 42px;
    height: 42px;
    border-radius: 11px;
    background: rgba(0, 129, 229, 0.12);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--mg-teal);
}

.home-why__icon svg {
    width: 22px;
    height: 22px;
}

.home-why__title {
    color: var(--mg-ink);
    font-weight: 600;
    font-size: 18px;
    margin-bottom: 8px;
}

.home-why__text {
    margin: 0;
    color: #5c6675;
    font-size: 15px;
    line-height: 1.55;
}

.home-testimonials {
    background: var(--mg-bg-soft);
    padding: 56px 24px;
}

.home-testimonials__inner {
    max-width: 1200px;
    margin: 0 auto;
}

.home-testimonials__lead {
    text-align: center;
    color: var(--mg-muted);
    margin: 0 0 28px;
}

.home-testimonials__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.home-testimonial {
    background: #fff;
    border: 1px solid var(--mg-border-card);
    border-radius: 16px;
    padding: 24px;
}

.home-testimonial__stars {
    color: var(--mg-teal);
    margin-bottom: 12px;
    letter-spacing: 0.05em;
}

.home-testimonial__quote {
    font-size: 16px;
    line-height: 1.5;
    color: var(--mg-ink-soft);
    margin: 0 0 18px;
}

.home-testimonial__author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.home-testimonial__avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--mg-teal);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
}

.home-testimonial__name {
    color: var(--mg-ink);
    font-weight: 600;
    font-size: 14px;
}

.home-testimonial__role {
    color: var(--mg-muted);
    font-size: 13px;
}

.home-cta {
    margin: 64px auto;
    max-width: 1152px;
    width: calc(100% - 48px);
    border-radius: 20px;
    padding: 64px 40px;
    text-align: center;
    background:
        radial-gradient(ellipse 70% 120% at 50% 0%, rgba(0, 129, 229, 0.14), transparent 70%),
        #f0f6fc;
    border: 1px solid var(--mg-border-soft);
}

.home-cta__title {
    font-size: clamp(1.75rem, 3vw, 2.625rem);
    color: var(--mg-ink);
    margin: 0 0 14px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.home-cta__lead {
    color: var(--mg-body);
    font-size: 17px;
    margin: 0 auto 28px;
    max-width: 520px;
}

.home-cta__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: center;
}

/* ── Social proof toasts ─────────────────────────────────────────── */
.home-sp {
    position: fixed;
    left: 20px;
    bottom: 20px;
    z-index: 60;
    width: min(340px, calc(100vw - 32px));
    pointer-events: none;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.home-sp--visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.home-sp__card {
    display: flex;
    align-items: flex-start;
    gap: 4px;
    padding: 12px 10px 12px 14px;
    background: #fff;
    border: 1px solid var(--mg-border-card);
    border-radius: 14px;
    box-shadow: 0 10px 28px rgba(15, 43, 40, 0.12);
    font-family: var(--mg-font);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.home-sp__link {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    flex: 1;
    min-width: 0;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.home-sp__card:hover {
    border-color: var(--mg-border-soft);
    box-shadow: 0 12px 32px rgba(15, 43, 40, 0.16);
}

.home-sp__card:hover .home-sp__detail {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.home-sp__avatar {
    position: relative;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--mg-bg-mint);
    color: var(--mg-teal-dark);
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.home-sp__badge {
    position: absolute;
    right: -2px;
    bottom: -2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--mg-teal);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
}

.home-sp__badge svg {
    width: 9px;
    height: 9px;
}

.home-sp__body {
    min-width: 0;
    flex: 1;
    padding-top: 1px;
}

.home-sp__title {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--mg-ink);
    line-height: 1.35;
}

.home-sp__detail {
    margin: 3px 0 0;
    font-size: 12.5px;
    color: var(--mg-teal-dark);
    font-weight: 500;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.home-sp__meta {
    margin: 4px 0 0;
    font-size: 11px;
    color: var(--mg-muted);
}

.home-sp__close {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    margin: -4px -6px 0 0;
    border: none;
    background: transparent;
    color: var(--mg-muted);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    border-radius: 6px;
}

.home-sp__close:hover {
    color: var(--mg-ink);
    background: var(--mg-bg-soft);
}

@media (max-width: 640px) {
    .home-sp {
        left: 12px;
        right: 12px;
        bottom: 12px;
        width: auto;
    }

    .home-sp__card {
        padding: 11px 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-sp {
        transition: none;
    }
}

@media (max-width: 1024px) {
    .home-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .home-stats__item:nth-child(2) {
        border-right: none;
    }

    .home-stats__item:nth-child(1),
    .home-stats__item:nth-child(2) {
        border-bottom: 1px solid var(--mg-border);
    }

    .home-professions {
        grid-template-columns: repeat(2, 1fr);
    }

    .home-courses,
    .home-why,
    .home-testimonials__grid {
        grid-template-columns: 1fr 1fr;
    }

    .home-cotisation {
        grid-template-columns: 1fr;
        padding: 32px;
        gap: 28px;
    }
}

@media (max-width: 640px) {
    .home-hero {
        padding: 56px 20px 48px;
    }

    .home-hero__title {
        font-size: clamp(1.75rem, 8vw, 2.25rem);
        line-height: 1.15;
    }

    .home-hero__lead {
        font-size: 16px;
        margin-bottom: 28px;
    }

    .home-hero__eyebrow {
        font-size: 11px;
        letter-spacing: 0.1em;
        margin-bottom: 16px;
    }

    .home-hero__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .home-hero__visual {
        aspect-ratio: 16 / 10;
        border-radius: 14px;
    }

    .home-stats {
        grid-template-columns: 1fr 1fr;
    }

    .home-stats__item {
        padding: 20px 12px;
    }

    .home-stats__value {
        font-size: 26px;
    }

    .home-stats__label {
        font-size: 12px;
    }

    .home-section {
        padding-left: 16px;
        padding-right: 16px;
    }

    .home-section__title {
        font-size: 1.5rem;
        line-height: 1.25;
    }

    .home-professions,
    .home-courses,
    .home-why,
    .home-testimonials__grid {
        grid-template-columns: 1fr;
    }

    .home-cotisation__benefits {
        grid-template-columns: 1fr;
    }

    .home-cotisation {
        margin-left: 16px;
        margin-right: 16px;
        padding: 28px 20px;
    }

    .home-cta {
        width: calc(100% - 32px);
        margin: 48px auto;
        padding: 28px 20px;
    }

    .home-section__header {
        align-items: flex-start;
        flex-direction: column;
    }
}
