@font-face {
    font-family: "League Spartan";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("../fonts/league-spartan-latin-wght-normal-kK4EMym.woff2") format('woff2');
}
@font-face {
    font-family: "Lato";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/lato-latin-400-normal-CzNc_Ij.woff2") format('woff2');
}
@font-face {
    font-family: "Lato";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("../fonts/lato-latin-700-normal-5CmM-eX.woff2") format('woff2');
}
@font-face {
    font-family: "Lato";
    font-style: normal;
    font-weight: 900;
    font-display: swap;
    src: url("../fonts/lato-latin-900-normal-sKlRauX.woff2") format('woff2');
}

/* Brand palette */
:root {
    --navy: #211d41;
    --blue: #294d9b;
    --lavender: #8786c0;
    --orange: #ef7b20;
    --orange-light: #f18848;
    --red: #e8443b;
    --cream: #f7edd9;
    --white: #ffffff;
    --card: rgba(33, 29, 65, 0.72);
    --ink: var(--navy);
    --muted: #5e5a7d;
    --line: #e6dfd0;
    --radius: 18px;
    --font: "Lato", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-heading: "League Spartan", var(--font);
}

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--font);
    line-height: 1.5;
}

h1, h2, h3 { font-family: var(--font-heading); }

img { max-width: 100%; height: auto; }

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
#contenu:focus { outline: none; }

body a.skip-link {
    position: absolute; top: .5rem; left: .5rem; z-index: 10;
    padding: .6em 1em; border-radius: 8px;
    background: var(--cream); color: var(--navy); font-weight: 700;
    transform: translateY(-200%);
}
body a.skip-link:focus { transform: none; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; }
    .button:hover, .button:focus-visible, .format-tile:hover, .event-format:hover img { transform: none; }
}

.button {
    display: inline-block;
    padding: .6em 1.3em;
    border: 0;
    border-radius: 999px;
    background: var(--orange);
    color: var(--navy);
    font: inherit;
    font-weight: 900;
    text-decoration: none;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.button:hover, .button:focus-visible { background: var(--orange-light); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(239, 123, 32, .4); }

/* ---------- Public site: the stage curtain of the flyer, without the season ---------- */

body.public {
    color: var(--cream);
    background-color: var(--navy);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}
/* A fixed layer instead of background-attachment: fixed, which repaints the whole page on every scroll. */
body.public::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(180deg, rgba(33, 29, 65, .15) 0%, rgba(33, 29, 65, .6) 100%),
        url("../images/rideau-WXvbyCz.webp");
    background-size: cover;
    background-position: center top;
}

.public a { color: inherit; }

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    max-width: 960px;
    width: 100%;
    margin: 0 auto;
    padding: 1rem 1rem 0;
}

.brand {
    display: block;
    background: var(--cream);
    border-radius: 0 0 48% 40% / 0 0 40% 30%;
    padding: .6rem 1rem .9rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, .3);
}
.brand img { display: block; width: 120px; }

.site-main { flex: 1; width: 100%; max-width: 960px; margin: 0 auto; padding: 1rem; }

.hero { text-align: center; padding: 2rem 0 1.5rem; }
.hero .kicker { margin: 0; font-size: clamp(1rem, 2.6vw, 1.35rem); font-weight: 700; }
.hero h1 {
    margin: .1em 0;
    font-size: clamp(2.4rem, 8vw, 4.2rem);
    font-weight: 800;
    line-height: 1.05;
    text-transform: uppercase;
    text-shadow: 0 4px 24px rgba(33, 29, 65, .45);
}
.hero .tagline { margin: 0; color: var(--orange); font-weight: 900; letter-spacing: .08em; text-transform: uppercase; font-size: .9rem; }

.agenda h2, .page-title {
    font-size: clamp(1.6rem, 4.5vw, 2.2rem);
    font-weight: 800;
    margin: 1.5rem 0 1rem;
}
.empty { background: var(--card); border-radius: var(--radius); padding: 1.25rem 1.5rem; }

.event-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1.25rem;
    background: var(--card);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    backdrop-filter: blur(2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
}

.date-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 92px;
    background: var(--cream);
    color: var(--navy);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 4px 0 var(--lavender);
    text-align: center;
}
.date-tile .month { width: 100%; background: var(--red); color: var(--white); font-weight: 900; font-size: .78rem; padding: .25em 0; letter-spacing: .02em; }
.date-tile .day { font-family: var(--font-heading); font-size: 2rem; font-weight: 800; line-height: 1.1; padding-top: .2em; }
.date-tile .weekday { font-weight: 700; padding-bottom: .35em; }

.event-body { min-width: 0; overflow-wrap: anywhere; }
.event-title { margin: 0 0 .3rem; font-size: clamp(1.25rem, 3.4vw, 1.75rem); font-weight: 800; line-height: 1.15; }
.event-title a { color: inherit; text-decoration: none; }
.event-title a:hover { text-decoration: underline; }
.event-meta { list-style: none; margin: 0 0 .6rem; padding: 0; font-weight: 700; font-size: 1.08rem; }
.event-meta li { display: flex; align-items: center; gap: .45rem; }
.event-meta .pin, .event-meta .clock, .event-meta .ticket {
    width: 1.1em; height: 1.1em; flex: none; background: center / contain no-repeat;
}
.event-meta .pin { background-image: url("../images/icons/lieu-rdp5IOr.png"); }
.event-meta .clock { background-image: url("../images/icons/heure-WwBGNPB.png"); }
.event-meta .ticket { background-color: var(--red); border-radius: 3px; transform: scale(.85, .65); }

.booking-soon {
    display: inline-block;
    padding: .45em 1.1em;
    border: 2px dashed rgba(247, 237, 217, .55);
    border-radius: 999px;
    font-weight: 700;
    font-size: .95rem;
    opacity: .9;
}

.member-edit {
    display: inline-block;
    margin-left: .6rem;
    padding: .3em .8em;
    border-radius: 999px;
    background: rgba(247, 237, 217, .14);
    font-size: .85rem;
    font-weight: 700;
    text-decoration: none;
}
.member-edit:hover { background: var(--cream); color: var(--navy); }

.event-format { display: block; width: 140px; text-align: center; text-decoration: none; }
.event-format img { max-height: 110px; object-fit: contain; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .3)); transition: transform .2s ease; }
.event-format:hover img { transform: rotate(-3deg) scale(1.05); }
.format-name { display: inline-block; border: 2px solid var(--lavender); border-radius: 10px; padding: .4em .7em; font-family: var(--font-heading); font-weight: 800; }

@media (max-width: 640px) {
    .event-card { grid-template-columns: auto 1fr; gap: .9rem; }
    .event-format { grid-column: 1 / -1; width: auto; }
    .event-format img { max-height: 80px; }
    .date-tile { width: 74px; }
    .date-tile .day { font-size: 1.6rem; }
    .brand img { width: 88px; }
}

.format-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); gap: 1rem; }
.format-tile {
    display: flex; flex-direction: column; align-items: center; text-align: center;
    background: var(--card); border-radius: var(--radius); padding: 1.5rem; text-decoration: none;
    transition: transform .2s ease;
}
.format-tile:hover { transform: translateY(-3px); }
.format-tile img { max-height: 130px; object-fit: contain; }
.format-tile h2, .format-tile h3 { margin: .6rem 0 .3rem; font-size: 1.5rem; font-weight: 800; }
.format-tile p { margin: 0; opacity: .9; }

.format-detail { background: var(--card); border-radius: var(--radius); padding: 1.5rem; text-align: center; }
.format-detail .page-title { margin-top: .5rem; }
.format-logo { max-height: 180px; object-fit: contain; }
.prose { text-align: left; max-width: 65ch; margin: 0 auto; font-size: 1.1rem; }

.login-box { max-width: 460px; margin: 2rem auto; text-align: center; background: var(--card); border-radius: var(--radius); padding: 2rem; }
.login-box .page-title { margin-top: 0; }
.dev-login { display: flex; flex-direction: column; gap: .75rem; }
.dev-login input { padding: .6rem .8rem; border-radius: 8px; border: 0; font: inherit; }

/* Some venue logos are dark on transparent: they need a light backdrop on the curtain. */
.venue-logo { display: flex; align-items: center; justify-content: center; width: 160px; height: 120px; padding: .6rem; background: var(--cream); border-radius: 12px; }
.venue-tile .venue-logo img { max-height: 100%; }

@media (max-width: 560px) {
    .format-tile { padding: 1rem; }
    .format-tile img { max-height: 90px; }
    .format-tile h2, .format-tile h3 { font-size: 1.3rem; }
    .venue-tile:has(.venue-logo) { display: grid; grid-template-columns: 96px 1fr; column-gap: 1rem; align-items: center; text-align: left; }
    .venue-tile .venue-logo { grid-row: span 2; width: 96px; height: 72px; padding: .4rem; }
    .venue-tile h3 { margin: 0; align-self: end; }
    .venue-tile p { align-self: start; }
    .venue-tile:not(:has(p)) h3 { align-self: center; }
}

.venue-detail { margin-bottom: 1rem; }
.venue-address { font-style: normal; font-size: 1.1rem; margin: 0 0 .75rem; }
.venue-address a, .venue-website { font-weight: 700; }

.site-header .socials { list-style: none; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .4rem; margin: 0; padding: 0; }
.socials a {
    display: inline-flex; align-items: center; gap: .45rem; padding: .45em 1em; border-radius: 999px;
    background: rgba(247, 237, 217, .12); font-weight: 700; text-decoration: none;
}
.socials a:hover { background: var(--cream); color: var(--navy); }
@media (max-width: 560px) {
    .socials a { padding: .55em; }
    .socials .social-label {
        position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
        overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
    }
}

.site-footer { text-align: center; padding: 2rem 1rem 1.5rem; }
.site-footer .small { font-size: .85rem; opacity: .75; margin: 0; }
.site-footer .contact { margin: 0 0 .75rem; overflow-wrap: anywhere; }

/* ---------- Members area ---------- */

/* Brand red is too light for small text on cream (3.3:1) */
body.admin { --red: #b8322b; background: #fbf7ef; color: var(--ink); }
.admin a { color: var(--blue); }
.admin a.button { color: var(--navy); }

.admin-header {
    display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap;
    background: var(--navy); color: var(--cream); padding: .5rem 1.25rem;
}
.brand-small img { display: block; background: var(--cream); border-radius: 10px; padding: 4px; width: 56px; }
.admin-nav { display: flex; gap: .25rem; flex-wrap: wrap; flex: 1; }
.admin-nav a { color: var(--cream); text-decoration: none; padding: .5em .9em; border-radius: 8px; font-weight: 700; }
.admin-nav a[aria-current="page"], .admin-nav a:hover { background: rgba(135, 134, 192, .3); }
.admin-user { display: flex; gap: 1rem; font-size: .9rem; opacity: .9; }
.admin-user a { color: var(--cream); }

.admin-main { max-width: 1100px; margin: 0 auto; padding: 1.5rem 1.25rem 3rem; }
.admin-main h1 { margin: 0 0 1rem; }
.admin-main h2 { margin: 2rem 0 .75rem; font-size: 1.2rem; }

.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.toolbar h1 { margin: 0; }
.hint { color: var(--muted); max-width: 70ch; }
.muted { color: var(--muted); }

.flash { padding: .8rem 1rem; border-radius: 10px; margin: 0 0 1rem; }
.flash-success { background: #e3f6ea; color: #14532d; }
.flash-error { background: #fde4e6; color: #8a1020; }

.table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: 12px; overflow: hidden; box-shadow: 0 1px 3px rgba(0, 0, 0, .06); }
.table th, .table td { padding: .65rem .8rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { background: #f3ecdd; font-size: .85rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .actions { white-space: nowrap; text-align: right; }
.table .actions > * + * { margin-left: .8rem; }
.table-scroll { overflow-x: auto; border-radius: 12px; }
.table-scroll .table { min-width: 560px; }

.admin a.to-fill { color: #8a4206; background: #fde3cc; padding: .1em .5em; border-radius: 6px; font-weight: 700; text-decoration: none; }

.thumb { height: 44px; width: 70px; object-fit: contain; vertical-align: middle; }

form.inline { display: inline; }
.link-danger { background: none; border: 0; padding: 0; color: var(--red); font: inherit; cursor: pointer; text-decoration: underline; }

details { margin-top: 2rem; }
summary { cursor: pointer; font-weight: 700; margin-bottom: .75rem; }

.form { max-width: 620px; background: var(--white); padding: 1.5rem; border-radius: 12px; box-shadow: 0 1px 3px rgba(0, 0, 0, .06); }
.form-inline { display: flex; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; max-width: none; }
.form-inline .field { flex: 1; min-width: 240px; margin: 0; }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 700; margin-bottom: .3rem; }
.field input[type="text"], .field input[type="url"], .field input[type="email"],
.field input[type="datetime-local"], .field select, .field textarea {
    width: 100%; padding: .6rem .75rem; border: 1px solid #cfc8dc; border-radius: 8px; font: inherit; background: var(--white);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--lavender); outline-offset: 1px; border-color: transparent; }
.field .help-text, .field [id$="_help"] { color: var(--muted); font-size: .88rem; margin-top: .25rem; }
.has-error input, .has-error select, .has-error textarea { border-color: var(--red); }
.field-checkbox { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.field-checkbox label { margin: 0; }
.field-checkbox input { width: 1.1rem; height: 1.1rem; }
.field-errors { list-style: none; padding: 0; margin: .3rem 0 0; color: var(--red); font-size: .9rem; }
.form-actions { display: flex; align-items: center; gap: 1rem; margin-top: 1.5rem; }
.current-logo { display: flex; align-items: center; gap: .75rem; color: var(--muted); }

.link-facts { display: grid; grid-template-columns: max-content 1fr; gap: .6rem 1.5rem; align-items: center; background: var(--white); padding: 1.25rem; border-radius: 12px; }
.link-facts dt { font-weight: 700; color: var(--muted); }
.link-facts dd { margin: 0; }
.copy-field { width: 100%; max-width: 480px; padding: .5rem .7rem; border: 1px solid #cfc8dc; border-radius: 8px; font: inherit; }
.big-number { font-family: var(--font-heading); font-size: 1.8rem; font-weight: 800; color: var(--navy); }
@media (max-width: 560px) { .link-facts { grid-template-columns: 1fr; } }

.bars { display: flex; align-items: flex-end; gap: 3px; height: 160px; background: var(--white); padding: 1rem 1rem 0; border-radius: 12px 12px 0 0; }
.bar { flex: 1; height: max(var(--h), 2px); background: var(--blue); border-radius: 3px 3px 0 0; position: relative; }
.bar-count { position: absolute; top: -1.2em; left: 50%; transform: translateX(-50%); font-size: .7rem; color: var(--muted); }
.bars-axis { display: flex; justify-content: space-between; background: var(--white); padding: .3rem 1rem .8rem; border-radius: 0 0 12px 12px; font-size: .8rem; color: var(--muted); }

.qr { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; background: var(--white); padding: 1.25rem; border-radius: 12px; }
.qr p { display: flex; flex-direction: column; gap: .75rem; align-items: flex-start; margin: 0; }
.danger-zone { margin-top: 2.5rem; }
