:root {
    --accent: #F63854;
    --ink: #1a1a1a;
    --muted: #5c5c5c;
    --bg: #f7f5f2;
    --bg-alt: #efeae4;
    --card: #ffffff;
    --font: "Proza Libre", Georgia, serif;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: var(--font);
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(246, 56, 84, 0.08), transparent 40%),
        linear-gradient(180deg, #fff 0%, var(--bg) 35%, var(--bg-alt) 100%);
}

main { flex: 1 0 auto; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
    width: min(1100px, calc(100% - 2rem));
    margin-inline: auto;
}

.narrow { width: min(420px, calc(100% - 2rem)); }

.site-header {
    position: sticky;
    top: 0;
    backdrop-filter: blur(8px);
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    z-index: 10;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 0;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--ink);
    text-decoration: none;
}

.brand-logo {
    height: 2.2rem;
    width: auto;
    display: block;
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    font-size: 0.95rem;
}

.hero {
    padding: 3.2rem 0 2.4rem;
}

.hero-layout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.hero-damier {
    display: block;
    width: 10rem;
    height: auto;
    margin: 0.4rem 0 1rem;
}

.hero-pieces {
    width: min(220px, 34vw);
    height: auto;
    flex-shrink: 0;
}

.hero-wave {
    display: block;
    width: min(920px, calc(100% - 6rem));
    height: auto;
    margin: 1.25rem auto 0;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.8rem;
    color: var(--accent);
    margin: 0 0 0.5rem;
}

.hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    margin: 0 0 0.75rem;
}

.lede {
    font-size: 1.15rem;
    color: var(--muted);
    max-width: 40rem;
}

.section { padding: 2.5rem 0; }
.section-alt { background: rgba(255, 255, 255, 0.45); }

.section h2 {
    margin-top: 0;
    margin-bottom: 1.2rem;
}

.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.section-head h2 { margin-bottom: 0.4rem; }

.section-heading { text-align: center; margin-bottom: 1.4rem; }
.section-heading h1,
.section-heading h2 { margin: 0 0 0.45rem; }
.section-heading h2 a { color: inherit; text-decoration: none; }
.section-heading h2 a:hover { color: var(--accent); }
.shape {
    display: block;
    width: 60px;
    height: 3px;
    margin: 0 auto 0.6rem;
    background: var(--accent);
}
.section-actions { margin-top: 1.2rem; }
.btn {
    display: inline-block;
    margin: 0.25rem 0.4rem 0 0;
    padding: 0.5rem 0.95rem;
    border: 2px solid var(--accent);
    color: var(--accent);
    text-decoration: none;
}
.btn:hover { background: var(--accent); color: #fff; text-decoration: none; }

.results-layout {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1.5rem;
    align-items: center;
}
.results-logo img { width: 140px; height: auto; display: block; margin: 0 auto; }
.result-item { margin-bottom: 1rem; }
.result-item h3 { margin: 0 0 0.25rem; font-size: 1.05rem; }
.result-item p { margin: 0; color: var(--muted); }

.page-narrow { max-width: 42rem; }
.page-narrow h2 { font-size: 1.2rem; }

.footer-contact {
    display: flex;
    gap: 1rem;
    align-items: center;
}
.footer-logo { height: 4.5rem; width: auto; }
.footer-title { margin: 0 0 0.3rem; font-weight: 700; color: var(--ink); }
.footer-legal {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.25rem;
    margin: 0;
}

.muted { color: var(--muted); }

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(18rem, 22rem));
    gap: 0.75rem;
}

.card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--card);
    border: 1px solid rgba(0, 0, 0, 0.12);
    padding: 0.75rem;
}

.card-body {
    flex: 1;
    min-width: 0;
}

.card-thumb {
    width: 7.5rem;
    height: 5.625rem;
    object-fit: cover;
    flex-shrink: 0;
}

.card h3 { margin: 0 0 0.4rem; font-size: 1.05rem; }
.meta { margin: 0; color: var(--muted); font-size: 0.9rem; }

.event-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.event-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.tag {
    display: inline-block;
    margin-left: 0.4rem;
    padding: 0.15rem 0.45rem;
    border: 1px solid var(--accent);
    color: var(--accent);
    font-size: 0.75rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.site-footer {
    padding: 2rem 0;
    color: var(--muted);
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.login-form {
    display: grid;
    gap: 0.6rem;
}

.login-form input {
    padding: 0.65rem 0.75rem;
    border: 1px solid #ccc;
    font: inherit;
}

.login-form button {
    margin-top: 0.5rem;
    padding: 0.7rem 1rem;
    border: 0;
    background: var(--accent);
    color: #fff;
    font: inherit;
    cursor: pointer;
}

.error { color: #b00020; }

.agenda-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.agenda-heading {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.agenda-heading h1 {
    margin: 0;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.agenda-heading > a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: #fff;
    color: var(--ink);
    text-decoration: none;
    font-size: 1.4rem;
    line-height: 1;
}

.agenda-today {
    padding: 0.4rem 0.7rem;
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: #fff;
    color: var(--ink);
    text-decoration: none;
}

.agenda-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: center;
}

.agenda-views,
.agenda-nav {
    display: flex;
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: #fff;
}

.agenda-views a,
.agenda-nav a {
    padding: 0.4rem 0.7rem;
    color: var(--ink);
    text-decoration: none;
}

.agenda-views a.is-active,
.agenda-nav a:hover,
.agenda-views a:hover {
    background: var(--accent);
    color: #fff;
}

.agenda-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    border-left: 1px solid rgba(0, 0, 0, 0.1);
    background: #fff;
}

.agenda-dow,
.agenda-day {
    border-right: 1px solid rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.agenda-dow {
    padding: 0.35rem 0.4rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
    background: #faf8f6;
}

.agenda-day {
    min-height: 6.5rem;
    padding: 0.3rem;
}

.agenda-grid.is-week .agenda-day { min-height: 16rem; }
.agenda-grid.is-compact .agenda-day { min-height: 1.6rem; padding: 0.1rem; }

.agenda-day.is-outside { background: #f6f4f1; color: #9a9a9a; }
.agenda-day.is-today .agenda-num { background: var(--accent); color: #fff; }

.agenda-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.4rem;
    height: 1.4rem;
    border-radius: 999px;
    font-size: 0.8rem;
    color: inherit;
    text-decoration: none;
}

.agenda-events {
    list-style: none;
    margin: 0.25rem 0 0;
    padding: 0;
}

.agenda-event {
    display: block;
    margin-top: 0.2rem;
    padding: 0.12rem 0.3rem;
    background: #fde8ec;
    color: var(--ink);
    font-size: 0.75rem;
    line-height: 1.3;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.agenda-event.type-annonce { background: #fde8ec; }
.agenda-event.type-tournoi_interne { background: #e7f0f8; }
.agenda-event.type-formation { background: #f3e9fb; }
.agenda-event.type-reunion { background: #f4eee9; }
.agenda-event.type-competition_equipes,
.agenda-event.type-competition_individuelle,
.agenda-event.type-competition_jeunes,
.agenda-event.type-competition_scolaire { background: #e7f4ea; }

.agenda-dot {
    display: inline-block;
    width: 0.35rem;
    height: 0.35rem;
    margin-left: 0.15rem;
    border-radius: 50%;
    background: var(--accent);
    vertical-align: middle;
}

.year-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
    gap: 1rem;
}

.mini-month {
    padding: 0.6rem;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.mini-month h2 {
    margin: 0 0 0.4rem;
    font-size: 1rem;
    text-transform: capitalize;
}

.agenda-num.has-event {
    text-decoration: none;
    color: inherit;
}

.journal { max-width: 46rem; }
.journal-head {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}
.journal-thumb {
    width: 96px;
    height: 96px;
    object-fit: contain;
    flex-shrink: 0;
    background: #fff;
    border-radius: 4px;
    padding: 6px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}
.journal-article {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    padding: 1.1rem 1.25rem 1.35rem;
    margin-bottom: 2.75rem;
}
.journal-article h2 { margin: 0 0 0.3rem; }
.journal-list {
    list-style: none;
    padding: 0.6rem 0 0;
    margin: 0;
    border-top: 3px solid var(--accent);
}
.journal-list li { border-top: 1px solid rgba(0, 0, 0, 0.08); }
.journal-list a {
    display: flex;
    gap: 0.8rem;
    padding: 0.45rem 0;
    color: inherit;
    text-decoration: none;
}
.journal-list .is-current a { color: var(--accent); font-weight: 700; }

.day-events {
    list-style: none;
    margin: 0;
    padding: 0;
    max-width: 40rem;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.day-events li {
    display: flex;
    gap: 1rem;
    padding: 0.9rem 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.day-events li:last-child { border-bottom: 0; }

.day-event-time {
    min-width: 3.2rem;
    font-weight: 700;
    color: var(--accent);
}

.article-page { max-width: 42rem; }
.article-page h1 { margin: 0 0 0.4rem; }
.article-hero {
    width: 96px;
    height: 96px;
    object-fit: contain;
    background: #fff;
    border-radius: 4px;
    padding: 6px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}
.article-content { line-height: 1.55; }

@media (max-width: 800px) {
    .hero-layout { flex-direction: column; align-items: flex-start; }
    .hero-pieces { width: 180px; }
    .results-layout { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
    .header-inner { flex-direction: column; align-items: flex-start; }
    .agenda-day { min-height: 4.2rem; }
    .agenda-event { white-space: normal; }
}
