@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800;900&display=swap');

:root {
    color-scheme: light;
    --bg: #f7f5f2;
    --bg-elevated: #ffffff;
    --bg-strong: #f1ede8;
    --surface-border: #ded7d0;
    --text: #333333;
    --text-soft: #69635e;
    --accent: #887361;
    --accent-strong: #493c30;
    --accent-contrast: #ffffff;
    --success: #3c7250;
    --danger: #9f3d35;
    --shadow: 0 18px 50px rgba(73, 60, 48, 0.11);
    --max-width: 1180px;
    --radius-lg: 20px;
    --radius-md: 12px;
    --radius-sm: 6px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.55;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

.page-width,
.site-shell,
.site-header__inner {
    width: min(calc(100% - 2rem), var(--max-width));
    margin-inline: auto;
}

.site-shell {
    padding-bottom: 3rem;
}

.site-header {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    min-height: 104px;
    padding: 0.8rem 0;
    background: #ffffff;
    border-bottom: 1px solid rgba(73, 60, 48, 0.08);
}

.site-shell > .site-header {
    background: transparent;
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--accent-strong);
    font-weight: 800;
}

.brand__logo {
    display: block;
    width: clamp(190px, 19vw, 270px);
    height: auto;
}

.brand__mark {
    display: inline-grid;
    place-items: center;
    width: 2.7rem;
    height: 2.7rem;
    border-radius: 50%;
    background: var(--accent-strong);
    color: #ffffff;
    font-size: 0.78rem;
}

.brand__text {
    font-size: 1rem;
}

.header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.header-link {
    padding: 0.7rem 0.25rem;
    color: var(--accent-strong);
    font-size: 0.9rem;
    font-weight: 700;
}

.header-link:hover,
.text-link:hover,
.site-footer a:hover {
    text-decoration: underline;
    text-underline-offset: 0.25em;
}

.header-badge,
.theme-toggle {
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-sm);
    background: #ffffff;
    color: var(--text-soft);
    font-size: 0.86rem;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.75rem 1.15rem;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 700;
    line-height: 1.2;
    transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

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

.button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid rgba(136, 115, 97, 0.3);
    outline-offset: 3px;
}

.button--primary {
    background: var(--accent-strong);
    color: #ffffff;
}

.button--primary:hover {
    background: #342a22;
}

.button--outline,
.button--ghost {
    border-color: var(--accent);
    background: #ffffff;
    color: var(--accent-strong);
}

.button--light {
    background: #ffffff;
    color: var(--accent-strong);
}

.button--transparent {
    border-color: rgba(255, 255, 255, 0.75);
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.button--quiet {
    border-color: var(--surface-border);
    background: var(--bg-strong);
    color: var(--accent-strong);
}

.button--wide {
    width: 100%;
}

.eyebrow,
.panel-kicker {
    margin: 0 0 0.75rem;
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.17em;
    text-transform: uppercase;
}

.eyebrow--light {
    color: rgba(255, 255, 255, 0.82);
}

h1,
h2,
h3 {
    color: var(--accent-strong);
    font-weight: 900;
    letter-spacing: -0.035em;
}

h1 {
    margin: 0;
    font-size: clamp(2.25rem, 5vw, 4.65rem);
    line-height: 1.02;
}

h2 {
    margin: 0 0 0.85rem;
    font-size: clamp(1.7rem, 3vw, 2.65rem);
    line-height: 1.08;
}

h3 {
    margin: 0 0 0.7rem;
    font-size: 1.15rem;
}

.member-hero {
    position: relative;
    min-height: 520px;
    display: grid;
    align-items: end;
    overflow: hidden;
    background-image: url('https://lescanardsboiteux.org/wp-content/uploads/2026/03/Ecureuil_web.jpg');
    background-position: center 42%;
    background-size: cover;
}

.member-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(30, 35, 24, 0.88) 0%, rgba(34, 43, 27, 0.62) 52%, rgba(34, 43, 27, 0.18) 100%);
}

.member-hero__content {
    position: relative;
    z-index: 1;
    padding-block: clamp(3rem, 8vw, 5.5rem);
}

.member-hero h1 {
    max-width: 830px;
    color: #ffffff;
}

.member-hero__content > p:not(.eyebrow) {
    max-width: 680px;
    margin: 1.2rem 0 0;
    color: #ffffff;
    font-size: clamp(1rem, 2vw, 1.2rem);
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin-top: 1.8rem;
}

.portal-section {
    padding-block: clamp(3.5rem, 8vw, 6.5rem);
}

.section-heading {
    max-width: 810px;
    margin-bottom: 2rem;
}

.section-heading > p:not(.eyebrow),
.card-copy {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.75;
}

.portal-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.portal-card {
    min-height: 270px;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-md);
    background: #ffffff;
    box-shadow: 0 8px 30px rgba(73, 60, 48, 0.06);
}

.portal-card--active {
    border-color: rgba(136, 115, 97, 0.6);
}

.portal-card__number {
    margin-bottom: 2.6rem;
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 800;
}

.portal-card p {
    margin: 0 0 1.25rem;
    color: var(--text-soft);
    line-height: 1.7;
}

.portal-card a,
.portal-card__status {
    margin-top: auto;
    color: var(--accent-strong);
    font-size: 0.88rem;
    font-weight: 800;
}

.portal-card__status {
    color: var(--accent);
}

.account-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 5rem;
    padding: 1.25rem 1.4rem;
    border-radius: var(--radius-md);
    background: var(--accent-strong);
    color: #ffffff;
}

.account-strip strong,
.account-strip__label {
    display: block;
}

.account-strip__label {
    margin-bottom: 0.2rem;
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0.35rem 0.75rem;
    border: 1px solid rgba(136, 115, 97, 0.35);
    border-radius: 999px;
    background: #ffffff;
    color: var(--accent-strong);
    font-size: 0.8rem;
    font-weight: 800;
    white-space: nowrap;
}

.site-footer {
    padding-block: 2.4rem;
    background: var(--accent-strong);
    color: #ffffff;
}

.site-footer__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

.site-footer p {
    margin: 0.25rem 0 0;
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.86rem;
}

.site-footer__links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.85rem;
    font-weight: 700;
}

.account-main {
    min-height: calc(100vh - 280px);
    padding-block: clamp(2.5rem, 7vw, 5rem);
}

.auth-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.75fr);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.auth-intro {
    min-height: 610px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: clamp(2rem, 5vw, 4rem);
    background:
        linear-gradient(0deg, rgba(39, 45, 31, 0.88), rgba(39, 45, 31, 0.22)),
        url('https://lescanardsboiteux.org/wp-content/uploads/2026/03/Ecureuil_web.jpg') center 42% / cover;
    color: #ffffff;
}

.auth-intro h1 {
    max-width: 650px;
    color: #ffffff;
}

.auth-intro > p:not(.eyebrow) {
    max-width: 580px;
    margin: 1rem 0 0;
    line-height: 1.75;
}

.form-card {
    padding: clamp(1.5rem, 4vw, 2.4rem);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-md);
    background: #ffffff;
    box-shadow: 0 8px 32px rgba(73, 60, 48, 0.06);
}

.auth-layout > .form-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.form-card__note {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--surface-border);
    color: var(--text-soft);
    font-size: 0.86rem;
}

.form-card__note p {
    margin: 0.35rem 0 0;
}

.notice {
    margin-bottom: 1rem;
    padding: 0.9rem 1rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
}

.notice--error {
    border: 1px solid rgba(159, 61, 53, 0.3);
    background: #fff1ef;
    color: var(--danger);
}

.notice--success {
    border: 1px solid rgba(60, 114, 80, 0.3);
    background: #edf7f0;
    color: var(--success);
}

.profile-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.profile-heading h1 {
    font-size: clamp(2.2rem, 5vw, 4rem);
}

.profile-heading p:not(.eyebrow) {
    margin: 0.75rem 0 0;
    color: var(--text-soft);
}

.profile-heading__status {
    display: flex;
    gap: 0.55rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.profile-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
    gap: 1rem;
    align-items: start;
}

.profile-sidebar {
    display: grid;
    gap: 1rem;
}

.form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid__full {
    grid-column: 1 / -1;
}

.form-divider {
    margin-top: 0.45rem;
    border-top: 1px solid var(--surface-border);
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.form-divider span {
    position: relative;
    top: -0.7rem;
    padding-right: 0.7rem;
    background: #ffffff;
}

.form-card--compact {
    padding: 1rem;
}

@media (max-width: 900px) {
    .site-header__inner,
    .site-shell > .site-header {
        align-items: flex-start;
    }

    .auth-layout,
    .profile-grid {
        grid-template-columns: 1fr;
    }

    .auth-intro {
        min-height: 400px;
    }

    .portal-grid {
        grid-template-columns: 1fr;
    }

    .portal-card {
        min-height: 230px;
    }
}

@media (max-width: 680px) {
    .site-header {
        min-height: auto;
    }

    .site-header__inner,
    .site-shell > .site-header,
    .site-footer__inner,
    .profile-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .brand__logo {
        width: 210px;
    }

    .header-actions {
        justify-content: flex-start;
    }

    .header-link {
        width: 100%;
    }

    .member-hero {
        min-height: 560px;
        background-position: 62% center;
    }

    .member-hero__overlay {
        background: linear-gradient(0deg, rgba(30, 35, 24, 0.93), rgba(34, 43, 27, 0.3));
    }

    .hero-actions .button,
    .form-grid .button {
        width: 100%;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-grid__full {
        grid-column: auto;
    }

    .account-strip {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition: none !important;
    }
}
