:root {
    color-scheme: light;
    --ink: #202d3d;
    --muted: #687789;
    --primary: #245b50;
    --primary-dark: #193f38;
    --accent: #e4b76b;
    --paper: #f7f8f5;
    --white: #ffffff;
    --border: #e1e7e2;
    --danger: #a13d3d;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
}

a {
    color: inherit;
}

.container {
    width: min(1120px, calc(100% - 40px));
    margin-inline: auto;
}

.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
}

.header-inner,
.brand,
.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-inner {
    min-height: 76px;
    gap: 20px;
}

.brand {
    justify-content: flex-start;
    gap: 12px;
    text-decoration: none;
    font-size: 1.02rem;
    font-weight: 750;
    letter-spacing: -0.02em;
}

.brand-mark {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 12px;
    background: var(--primary);
    color: white;
    font-size: 1.2rem;
}

.header-note {
    color: var(--muted);
    font-size: 0.9rem;
}

.hero {
    overflow: hidden;
    position: relative;
    background:
        radial-gradient(ellipse at 85% 20%, rgba(228, 183, 107, 0.19), transparent 34%),
        linear-gradient(120deg, #193f38, #286455);
    color: white;
}

.hero-content {
    padding-block: clamp(64px, 9vw, 112px);
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--primary);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero .eyebrow {
    color: var(--accent);
}

.hero h1 {
    max-width: 760px;
    margin: 0;
    font-size: clamp(2.5rem, 6vw, 4.6rem);
    line-height: 1.08;
    letter-spacing: -0.055em;
}

.hero-description {
    max-width: 610px;
    margin: 24px 0 30px;
    color: #e2ece7;
    font-size: clamp(1rem, 2vw, 1.13rem);
}

.hero-link {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 12px 17px;
    border: 1px solid rgba(255, 255, 255, 0.38);
    border-radius: 8px;
    color: white;
    text-decoration: none;
    font-weight: 650;
    transition: background 160ms ease;
}

.hero-link:hover {
    background: rgba(255, 255, 255, 0.1);
}

.events-section {
    padding-block: 66px 82px;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 30px;
}

.section-heading h2 {
    margin: 0;
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    letter-spacing: -0.04em;
    line-height: 1.2;
}

.section-intro {
    margin: 0 0 4px;
    color: var(--muted);
    font-size: 0.95rem;
}

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

.event-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 23px;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: var(--white);
    box-shadow: 0 8px 24px rgba(30, 48, 40, 0.035);
}

.event-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.event-label,
.availability {
    display: inline-block;
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 0.74rem;
    font-weight: 750;
}

.event-label {
    background: #edf3ef;
    color: var(--primary-dark);
}

.availability {
    background: #f1f5e9;
    color: #47612e;
}

.availability.full {
    background: #f9eaea;
    color: var(--danger);
}

.event-card h3 {
    margin: 0 0 18px;
    font-size: 1.28rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.event-date,
.event-location {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin: 0 0 10px;
    color: #435366;
    font-size: 0.91rem;
}

.detail-symbol {
    color: var(--primary);
    font-size: 1.12rem;
    font-weight: 800;
}

.event-description {
    margin: 14px 0 24px;
    color: var(--muted);
    font-size: 0.94rem;
    overflow-wrap: anywhere;
}

.muted {
    font-style: italic;
}

.event-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.82rem;
}

.footer-arrow {
    color: var(--primary);
    font-size: 1.2rem;
}

.empty-state {
    padding: 56px 24px;
    border: 1px dashed #cbd7ce;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.7);
    text-align: center;
}

.empty-icon {
    margin-bottom: 12px;
    color: var(--primary);
    font-size: 2rem;
}

.empty-state h3 {
    margin: 0 0 8px;
    font-size: 1.3rem;
}

.empty-state p {
    margin: 0;
    color: var(--muted);
}

.notice {
    padding: 16px 18px;
    border-radius: 10px;
}

.notice-error {
    border: 1px solid #edcaca;
    background: #fff1f1;
    color: var(--danger);
}

.site-footer {
    border-top: 1px solid var(--border);
    background: var(--white);
}

.footer-inner {
    min-height: 76px;
    gap: 16px;
    color: var(--muted);
    font-size: 0.86rem;
}

.footer-inner span:first-child {
    color: var(--ink);
    font-weight: 700;
}

@media (max-width: 900px) {
    .events-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .container {
        width: min(100% - 28px, 1120px);
    }

    .header-inner {
        min-height: 66px;
    }

    .header-note {
        max-width: 105px;
        text-align: right;
        font-size: 0.78rem;
    }

    .hero-content {
        padding-block: 60px;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .events-section {
        padding-block: 48px 58px;
    }

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

    .event-card {
        padding: 20px;
    }

    .footer-inner {
        align-items: flex-start;
        flex-direction: column;
        justify-content: center;
        padding-block: 18px;
        gap: 4px;
    }
}

.login-page {
    display: grid;
    min-height: calc(100vh - 76px);
    place-items: center;
    padding: 32px 16px;
    background: var(--paper);
}

.login-card,
.admin-panel {
    border: 1px solid var(--border);
    border-radius: 15px;
    background: var(--white);
    box-shadow: 0 8px 24px rgba(30, 48, 40, 0.04);
}

.login-card {
    width: min(100%, 470px);
    padding: clamp(24px, 5vw, 38px);
}

.login-card h1,
.admin-main h1 {
    margin-top: 0;
    line-height: 1.2;
    letter-spacing: -0.04em;
}

.login-card > p:not(.eyebrow) {
    color: var(--muted);
}

.back-link {
    display: inline-block;
    margin-bottom: 30px;
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
}

.login-card form,
.event-form {
    display: grid;
    gap: 11px;
}

.login-card label,
.event-form label,
.status-form label {
    font-weight: 650;
    font-size: 0.9rem;
}

.login-card input,
.event-form input,
.event-form textarea,
.status-form select {
    width: 100%;
    min-width: 0;
    padding: 11px 12px;
    border: 1px solid #cbd5cf;
    border-radius: 7px;
    background: white;
    color: var(--ink);
    font: inherit;
}

.login-card button,
.event-form button,
.status-form button,
.secondary-button {
    padding: 11px 16px;
    border: 0;
    border-radius: 7px;
    background: var(--primary);
    color: white;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.login-card button,
.event-form button {
    margin-top: 10px;
}

.login-card button:hover,
.event-form button:hover,
.status-form button:hover {
    background: var(--primary-dark);
}

.admin-main {
    padding-block: 42px 70px;
}

.admin-main > p:not(.eyebrow) {
    color: var(--muted);
}

.admin-panel {
    margin-top: 26px;
    padding: clamp(20px, 4vw, 30px);
}

.admin-panel h2 {
    margin-top: 0;
    font-size: 1.35rem;
}

.event-form {
    max-width: 760px;
}

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

.form-grid > div {
    display: grid;
    gap: 8px;
}

.admin-events {
    display: grid;
    gap: 14px;
}

.admin-event {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding: 18px 0;
    border-bottom: 1px solid var(--border);
}

.admin-event:last-child {
    border-bottom: 0;
}

.admin-event h3 {
    margin: 0 0 5px;
}

.admin-event p {
    color: var(--muted);
    font-size: 0.9rem;
}

.status-label {
    display: inline-block;
    margin: 0 6px 6px 0;
    padding: 4px 8px;
    border-radius: 999px;
    background: #edf3ef;
    color: var(--primary-dark);
    font-size: 0.76rem;
}

.status-form {
    display: grid;
    flex: 0 0 190px;
    gap: 8px;
}

.status-form .secondary-button,
.secondary-button {
    background: #eaf0ec;
    color: var(--primary-dark);
}

.notice:not(.notice-error) {
    margin-block: 18px;
    border: 1px solid #cbdccf;
    background: #eff7f0;
    color: var(--primary-dark);
}

@media (max-width: 650px) {
    .admin-event {
        flex-direction: column;
    }

    .status-form {
        width: 100%;
        flex-basis: auto;
    }

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

/* Formulaire de création de compte participant */
.account-section {
    padding-block: 56px 76px;
}

.account-card {
    width: min(100%, 560px);
    margin-inline: auto;
    padding: clamp(22px, 5vw, 38px);
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--white);
    box-shadow: 0 12px 36px rgba(30, 48, 40, 0.06);
}

.account-card h1 {
    margin: 0 0 12px;
    font-size: clamp(1.8rem, 4vw, 2.4rem);
    line-height: 1.2;
    letter-spacing: -0.04em;
}

.account-intro {
    margin: 0 0 26px;
    color: var(--muted);
}

.account-form {
    display: grid;
    gap: 19px;
}

.form-field {
    display: grid;
    gap: 7px;
}

.form-field label {
    font-weight: 650;
}

.form-field input {
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid #cbd5ce;
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    font: inherit;
}

.form-field input:focus {
    outline: 3px solid rgba(36, 91, 80, 0.18);
    border-color: var(--primary);
}

.form-field small {
    color: var(--muted);
    font-size: 0.86rem;
}

.account-submit,
.button-link {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 46px;
    padding: 11px 17px;
    border: 0;
    border-radius: 8px;
    background: var(--primary);
    color: white;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.account-submit:hover,
.button-link:hover {
    background: var(--primary-dark);
}

.notice {
    margin: 20px 0;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow-wrap: anywhere;
}

.notice p {
    margin-top: 0;
}

.notice ul {
    margin-bottom: 0;
    padding-left: 22px;
}

.notice-error {
    border-color: #e7b7b7;
    background: #fff5f5;
    color: var(--danger);
}

.notice-success {
    border-color: #b7d8c5;
    background: #f0faf3;
    color: #245b3a;
}

@media (max-width: 600px) {
    .account-section {
        padding-block: 28px 48px;
    }

    .account-card {
        padding: 22px 18px;
    }
}

/* Réservations et espace participant */
.header-account-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 12px;
}

.header-account-nav a,
.event-action-link,
.event-back-link a,
.participant-registration-info h3 a,
.participant-registration-actions > a {
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
}

.header-register-link {
    padding: 9px 13px;
    border: 1px solid var(--primary);
    border-radius: 8px;
}

.event-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.event-action-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.account-card-wide {
    width: min(100%, 850px);
}

.account-subheading {
    margin-top: 32px;
    margin-bottom: 18px;
}

.account-actions {
    margin: 18px 0;
}

.participant-registrations {
    display: grid;
    gap: 14px;
}

.participant-registration {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 12px;
}

.participant-registration-info h3 {
    margin: 0 0 8px;
}

.participant-registration-info p {
    margin: 5px 0;
    color: var(--muted);
}

.participant-registration-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.registration-status {
    display: inline-block;
    margin-top: 8px;
    padding: 5px 9px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 700;
}

.registration-confirmed {
    background: #eaf7ef;
    color: #245b3a;
}

.registration-waitlist {
    background: #fff4df;
    color: #79520b;
}

.account-logout {
    margin-top: 30px;
}

.event-detail-description {
    margin-block: 24px;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.event-capacity {
    margin-block: 24px;
    padding: 14px 18px;
    border-radius: 10px;
    background: #f5f7f4;
}

.event-capacity p {
    margin: 8px 0;
}

.event-back-link {
    margin-top: 24px;
}

.account-empty {
    padding: 22px 0;
}

@media (max-width: 650px) {
    .participant-registration {
        align-items: flex-start;
        flex-direction: column;
    }

    .participant-registration-actions {
        justify-content: flex-start;
    }

    .header-account-nav {
        gap: 8px;
    }
}

/* Carte des lieux de rassemblement */
.event-map-section {
    margin: 2rem 0 2.5rem;
}

.event-map-section h2 {
    margin-bottom: 0.5rem;
}

.map-intro,
.map-note {
    color: var(--muted, #667085);
    line-height: 1.6;
}

#event-map {
    width: 100%;
    height: 390px;
    margin-top: 1rem;
    border: 1px solid rgba(30, 60, 45, 0.18);
    border-radius: 14px;
    overflow: hidden;
    background: #eef2ed;
    z-index: 0;
}

.map-note {
    margin-top: 0.75rem;
    font-size: 0.92rem;
}

#event-map .leaflet-popup-content {
    line-height: 1.5;
}

#event-map .leaflet-popup-content p {
    margin: 0.4rem 0;
}
