/* =====================================================================
   APE Jean Macé – Styles du site public
   Identité : l'auvent jaune de l'école, lettrage noir, lignes franches.
   ===================================================================== */

:root {
    /* Couleurs */
    --yellow:        #FFD21F;  /* l'auvent */
    --yellow-strong: #F2C200;
    --yellow-soft:   #FFF4BF;
    --ink:           #000000;  /* le lettrage */
    --text:          #262626;
    --muted:         #5E5E5E;
    --line:          #E3E3DF;
    --stone:         #F4F4F2;
    --paper:         #FFFFFF;
    --wood:          #8A6E55;  /* le bardage bois */
    --sky:           #28579A;  /* liens dans les textes */
    --danger:        #B42318;
    --success:       #1D6B3A;

    /* Typographie */
    --display: 'Bricolage Grotesque', 'Arial Narrow', system-ui, sans-serif;
    --body:    'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

    /* Mise en page */
    --r:      6px;
    --wrap:   1180px;
    --gutter: clamp(1rem, 4vw, 2rem);
}

/* ---------------------------------------------------------------- Base */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
body {
    margin: 0;
    font-family: var(--body);
    font-size: 1.0625rem;
    line-height: 1.65;
    color: var(--text);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--sky); }
h1, h2, h3 { color: var(--ink); text-wrap: balance; }
p { text-wrap: pretty; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 2px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: 34rem; padding-block: 3rem; }
.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;
}
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--ink); color: #fff; padding: .6rem 1rem; }
.skip-link:focus { top: 1rem; }
.icon { width: 1.15em; height: 1.15em; flex: none; }

/* ---------------------------------------------------------------- Boutons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    min-height: 48px; padding: .7rem 1.3rem;
    font: inherit; font-weight: 700; line-height: 1.2; text-decoration: none;
    color: #fff; background: var(--ink);
    border: 2px solid var(--ink); border-radius: var(--r);
    cursor: pointer;
}
.btn:hover { background: #2B2B2B; border-color: #2B2B2B; }
.btn--yellow { background: var(--yellow); border-color: var(--yellow); color: var(--ink); }
.btn--yellow:hover { background: var(--yellow-strong); border-color: var(--yellow-strong); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: #fff; }
.btn--block { width: 100%; }
.btn--small { min-height: 40px; padding: .45rem 1rem; font-size: .95rem; }

/* ---------------------------------------------------------------- En-tête */
.site-header {
    position: sticky; top: 0; z-index: 30;
    background: rgba(255, 255, 255, .94);
    -webkit-backdrop-filter: saturate(1.5) blur(12px);
    backdrop-filter: saturate(1.5) blur(12px);
    border-bottom: 1px solid var(--line);
}
.site-header__inner { position: relative; display: flex; align-items: center; gap: 1rem; min-height: 68px; }

.brand { display: flex; align-items: center; gap: .7rem; margin: 0 auto 0 0; color: var(--ink); text-decoration: none; }
.logo-mark { width: 40px; height: 40px; object-fit: contain; flex: none; }
.brand__name { display: block; font-family: var(--display); font-weight: 800; font-size: 1.3rem; letter-spacing: -.025em; line-height: 1; }
.brand__place { display: block; font-size: .8rem; font-weight: 600; color: var(--muted); line-height: 1.4; }

.site-nav { display: flex; align-items: center; gap: .15rem; }
.site-nav a:not(.btn) {
    padding: .5rem .8rem; border-radius: var(--r);
    color: var(--ink); font-weight: 600; text-decoration: none;
}
.site-nav a:not(.btn):hover { background: var(--stone); }
.site-nav a[aria-current] { box-shadow: inset 0 -3px 0 var(--yellow); border-radius: 0; }
.site-nav .btn { margin-left: .75rem; }

.menu-toggle {
    display: none; align-items: center; gap: .4rem;
    min-height: 44px; padding: .4rem .8rem;
    font: inherit; font-weight: 700; color: var(--ink);
    background: var(--stone); border: 0; border-radius: var(--r); cursor: pointer;
}

@media (max-width: 899px) {
    .menu-toggle { display: inline-flex; }
    .site-nav {
        display: none;
        position: absolute; top: 100%; left: 0; right: 0;
        flex-direction: column; align-items: stretch; gap: 0;
        padding: .5rem var(--gutter) 1.25rem;
        background: var(--paper); border-bottom: 1px solid var(--line);
        box-shadow: 0 16px 24px -16px rgba(0, 0, 0, .18);
    }
    .site-nav.is-open { display: flex; }
    .site-nav a:not(.btn) { padding: .9rem .25rem; border-bottom: 1px solid var(--line); border-radius: 0; font-size: 1.1rem; }
    .site-nav a[aria-current] { box-shadow: inset 4px 0 0 var(--yellow); padding-left: 1rem; }
    .site-nav .btn { margin: 1rem 0 0; }
}

/* ---------------------------------------------------------------- Accueil : hero */
.hero {
    display: grid; gap: 2rem; align-items: center;
    padding-block: clamp(2rem, 5vw, 4.5rem) clamp(2.5rem, 5vw, 4rem);
}
@media (min-width: 900px) { .hero { grid-template-columns: 1.05fr 1fr; gap: 4rem; } }
.hero__title {
    margin: 0 0 1.25rem; max-width: 13ch;
    font-family: var(--display); font-weight: 800;
    font-size: clamp(2.4rem, 1.2rem + 4vw, 4.6rem);
    line-height: 1; letter-spacing: -.04em;
}
.hero__lead { margin: 0 0 1.75rem; max-width: 50ch; font-size: 1.15rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero__media { margin: 0; }
.hero__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r); }

/* ---------------------------------------------------------------- Sections */
.section { padding-block: clamp(2.5rem, 6vw, 4.5rem) 0; }
.section--tight { padding-top: 0; }
.section__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem 1rem; margin-bottom: 1.25rem; }
.section__title {
    margin: 0 0 1.25rem;
    font-family: var(--display); font-weight: 800;
    font-size: clamp(1.7rem, 1.2rem + 1.6vw, 2.5rem);
    letter-spacing: -.03em; line-height: 1.1;
}
.section__head .section__title { margin: 0; }
.link-more {
    color: var(--ink); font-weight: 700;
    text-underline-offset: 5px; text-decoration-thickness: 3px; text-decoration-color: var(--yellow);
}
.link-more:hover { text-decoration-color: var(--ink); }

.page-intro { position: relative; overflow: clip; padding-block: clamp(2rem, 5vw, 3.5rem) 1.5rem; }
.page-intro__title {
    margin: 0; font-family: var(--display); font-weight: 800;
    font-size: clamp(2.2rem, 1.3rem + 3.4vw, 4rem); line-height: 1; letter-spacing: -.04em;
}
.page-intro__lead { margin: .9rem 0 0; max-width: 55ch; font-size: 1.1rem; color: var(--muted); }

/* ---------------------------------------------------------------- Métadonnées & filtres */
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem 1rem; margin: 0; font-size: .9rem; color: var(--muted); }
.meta__cat { display: inline-flex; align-items: center; gap: .45rem; color: var(--ink); font-weight: 700; text-decoration: none; }
.meta__cat:hover { text-decoration: underline; }
.dot { width: .6rem; height: .6rem; border-radius: 50%; background: var(--cat, var(--yellow)); flex: none; }

.chips { display: flex; gap: .5rem; overflow-x: auto; margin: 0 calc(var(--gutter) * -1) 1.75rem; padding: 0 var(--gutter) .25rem; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
    flex: none; display: inline-flex; align-items: center; gap: .45rem;
    padding: .45rem .95rem; min-height: 40px;
    color: var(--ink); background: var(--paper); font-weight: 600; font-size: .95rem; text-decoration: none;
    border: 1.5px solid var(--line); border-radius: 999px;
}
.chip:hover { border-color: var(--ink); }
.chip[aria-current] { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------------------------------------------------------------- Images d'articles */
.media { display: block; aspect-ratio: 16 / 10; overflow: hidden; border-radius: var(--r); background: var(--yellow-soft); }
.media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.media--empty { display: grid; place-items: center; }
.media--empty .logo-mark { width: 28%; height: auto; transition: transform .4s ease; }

/* ---------------------------------------------------------------- À la une */
.features { display: grid; gap: 2.5rem; }
.feature { display: grid; gap: 1.25rem; padding-top: 1.5rem; border-top: 4px solid var(--ink); }
@media (min-width: 800px) {
    .feature { grid-template-columns: 1.2fr 1fr; gap: 3rem; align-items: center; }
}
.feature__title {
    margin: .5rem 0 .75rem;
    font-family: var(--display); font-weight: 800;
    font-size: clamp(1.6rem, 1.1rem + 1.8vw, 2.4rem); line-height: 1.08; letter-spacing: -.03em;
}
.feature__title a { color: inherit; text-decoration: none; }
.feature__title a:hover { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 5px; }
.feature__excerpt { margin: 0 0 1.25rem; max-width: 52ch; }

/* ---------------------------------------------------------------- Grille d'articles */
.grid { display: grid; gap: 2.25rem 1.75rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.post { display: flex; flex-direction: column; gap: .7rem; }
.post__title { margin: 0; font-family: var(--display); font-weight: 700; font-size: 1.3rem; line-height: 1.2; letter-spacing: -.02em; }
.post__title a {
    color: var(--ink); text-decoration: none;
    background: linear-gradient(var(--yellow), var(--yellow)) no-repeat 0 88% / 0 .38em;
    transition: background-size .25s ease;
}
.post:hover .post__title a, .post__title a:focus-visible { background-size: 100% .38em; }
.post__excerpt { margin: 0; color: var(--muted); font-size: .97rem; }

.empty { margin: 0; padding: 2.5rem 1.5rem; text-align: center; color: var(--muted); border: 2px dashed var(--line); border-radius: var(--r); }

.pager { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 3rem; }
.pager__count { color: var(--muted); font-size: .95rem; }

/* ---------------------------------------------------------------- Article */
.article__head { max-width: 900px; padding-top: clamp(1.5rem, 4vw, 3rem); }
.back { display: inline-block; margin-bottom: 1.5rem; color: var(--muted); font-weight: 600; font-size: .95rem; }
.back:hover { color: var(--ink); }
.article__title {
    margin: .75rem 0 0; max-width: 22ch;
    font-family: var(--display); font-weight: 800;
    font-size: clamp(2.1rem, 1.3rem + 3.2vw, 3.8rem); line-height: 1.02; letter-spacing: -.04em;
}
.notice { margin: 1.5rem 0 0; padding: .8rem 1rem; background: var(--stone); border-left: 4px solid var(--wood); }
.article__cover { margin: 2rem auto 0; }
.article__cover img { width: 100%; max-height: 600px; object-fit: cover; border-radius: var(--r); }

.article__body { display: grid; gap: 2rem; padding-block: 2.5rem 0; }
@media (min-width: 960px) {
    .article__body { grid-template-columns: minmax(0, 1fr) 340px; gap: 4rem; align-items: start; }
    .article__body .prose { grid-column: 1; grid-row: 1; }
    .article__body .article-share { grid-column: 1; grid-row: 2; }
    .article__body .downloads { grid-column: 2; grid-row: 1 / span 2; position: sticky; top: 92px; }
}

.prose { max-width: 68ch; font-size: 1.1rem; line-height: 1.75; }
.prose > :first-child { margin-top: 0; }
.prose h2 { margin: 2em 0 .5em; font-family: var(--display); font-size: 1.65rem; line-height: 1.2; letter-spacing: -.025em; }
.prose h3 { margin: 1.6em 0 .4em; font-size: 1.25rem; line-height: 1.3; }
.prose a { color: var(--sky); text-underline-offset: 3px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: .35em 0; }
.prose blockquote { margin: 1.75em 0; padding: .1em 0 .1em 1.25em; border-left: 5px solid var(--yellow); font-size: 1.15em; color: var(--ink); }

/* Bloc téléchargements : l'action principale d'un article de vente */
.downloads { padding: 1.5rem; background: var(--yellow); border-radius: var(--r); color: var(--ink); }
.downloads__title { margin: 0 0 1rem; font-family: var(--display); font-size: 1.3rem; letter-spacing: -.02em; }
.download-list { display: grid; gap: .6rem; margin: 0; padding: 0; list-style: none; }
.download {
    display: flex; align-items: center; gap: .9rem; padding: .75rem .9rem;
    color: var(--ink); text-decoration: none;
    background: var(--paper); border: 2px solid transparent; border-radius: var(--r);
}
.download:hover { border-color: var(--ink); }
.download__type {
    flex: none; display: grid; place-items: center; width: 2.75rem; height: 2.75rem;
    background: var(--ink); color: var(--yellow); border-radius: 4px;
    font-size: .75rem; font-weight: 800;
}
.download__text { display: grid; min-width: 0; line-height: 1.35; }
.download__text strong { overflow-wrap: anywhere; }
.download__text small { color: var(--muted); }
.download .icon { margin-left: auto; }
.downloads__hint { margin: 1rem 0 0; font-size: .92rem; }

/* ---------------------------------------------------------------- Pied de page */
.site-footer { margin-top: clamp(4rem, 9vw, 7rem); padding-block: 3rem 1.5rem; background: var(--ink); color: #E6E6E6; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: var(--yellow); text-decoration: underline; }
.site-footer :focus-visible { outline-color: var(--yellow); }
.site-footer__inner { display: grid; gap: 2rem; }
@media (min-width: 800px) { .site-footer__inner { grid-template-columns: 1.6fr 1fr 1fr; } }
.site-footer__about p { margin: 0 0 .75rem; max-width: 40ch; }
.brand--footer { color: #fff; }
.brand--footer .logo-mark {
    background: #fff; border-radius: 50%; padding: 5px; box-sizing: content-box;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .3);
}
.site-footer__links { display: grid; gap: .6rem; margin: 0; padding: 0; list-style: none; }
.site-footer__links a { display: inline-flex; align-items: center; gap: .55rem; }
.site-footer__legal { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid #333; font-size: .875rem; color: #9E9E9E; }
.site-footer__legal p { margin: 0; }

/* ---------------------------------------------------------------- Erreurs */
.error-page { padding-block: clamp(3rem, 10vw, 7rem) 0; }
.error-page__code {
    margin: 0; display: inline-block;
    font-family: var(--display); font-weight: 800; font-size: clamp(5rem, 16vw, 10rem);
    line-height: .85; letter-spacing: -.06em; color: var(--ink);
    box-shadow: inset 0 -.28em 0 var(--yellow);
}
.error-page__message { margin: 1.5rem 0 2rem; max-width: 40ch; font-size: 1.25rem; }

/* ---------------------------------------------------------------- Formulaires (partagés) */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: clamp(1.25rem, 4vw, 2rem); }
.form { display: grid; gap: 1.1rem; }
.form label, .field { display: grid; gap: .35rem; font-weight: 600; color: var(--ink); }
.input, .form input:not([type=checkbox]):not([type=radio]):not([type=file]), .form textarea, .form select {
    width: 100%; min-height: 46px; padding: .6rem .8rem;
    font: inherit; font-weight: 400; color: var(--text); background: var(--paper);
    border: 1.5px solid #CFCFCA; border-radius: var(--r);
}
.form input:focus, .form textarea:focus, .form select:focus, .input:focus {
    outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--yellow);
}
.alert { margin: 0 0 1rem; padding: .8rem 1rem; border-radius: var(--r); font-weight: 500; }
.alert--success { background: #E6F4EA; color: var(--success); }
.alert--error   { background: #FDECEA; color: var(--danger); }
.alert--info    { background: #E8EEF8; color: #1F3F73; }

/* ---------------------------------------------------------------- Mouvement réduit */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------------------------------------------------------------- Formulaires publics */
.form__row { display: grid; gap: 1.1rem; }
@media (min-width: 560px) { .form__row { grid-template-columns: 1fr 1fr; } }
.optional { font-weight: 500; color: var(--muted); font-size: .9em; }
.field__error { margin: 0; font-size: .9rem; font-weight: 600; color: var(--danger); }
.consent { display: flex !important; align-items: flex-start; gap: .7rem; font-weight: 400 !important; font-size: .95rem; }
.consent input { width: 1.25rem; height: 1.25rem; margin-top: .15rem; flex: none; accent-color: var(--ink); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.site-footer__legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1.5rem; }
.site-footer__legal a { color: #C9C9C9; }
.site-footer__legal-links { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .6rem; }
.site-footer__sep { color: #5A5A5A; }
.credit { white-space: nowrap; }
.credit a { font-weight: 700; }
.prose sup { line-height: 0; }


/* =====================================================================
   Étape 5 : un site plus vivant
   ===================================================================== */
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

/* En-tête : s'affine et prend une ombre pendant le défilement */
.site-header { transition: box-shadow .3s ease; }
.site-header__inner { transition: min-height .3s ease; }
.site-header.is-scrolled { box-shadow: 0 8px 24px -16px rgba(0, 0, 0, .35); }
.site-header.is-scrolled .site-header__inner { min-height: 58px; }

/* Boutons : léger enfoncement au clic */
.btn { transition: background-color .2s, color .2s, border-color .2s, transform .1s; }
.btn:active { transform: translateY(1px); }

/* Hero : la photo se dévoile, puis la pastille « % financé » apparaît */
.hero__media { position: relative; }
@media (prefers-reduced-motion: no-preference) {
    .hero__media img { animation: hero-reveal 1s cubic-bezier(.2, .7, .2, 1) both; }
    .sticker { animation: sticker-pop .55s cubic-bezier(.3, 1.6, .5, 1) .75s both; }
}
@keyframes hero-reveal { from { clip-path: inset(100% 0 0 0 round var(--r)); } to { clip-path: inset(0 0 0 0 round var(--r)); } }
@keyframes sticker-pop { from { opacity: 0; transform: scale(.4) rotate(-40deg); } }

.sticker {
    position: absolute; right: .75rem; bottom: -1.25rem;
    display: grid; place-content: center; gap: .1rem;
    width: 112px; aspect-ratio: 1; border-radius: 50%;
    background: var(--yellow); color: var(--ink); text-align: center; text-decoration: none;
    border: 3px solid var(--ink); box-shadow: 0 0 0 5px var(--paper);
    transform: rotate(-8deg);
    transition: transform .3s cubic-bezier(.3, 1.6, .5, 1);
}
.sticker:hover { transform: rotate(0) scale(1.06); }
.sticker strong { font-family: var(--display); font-size: 1.9rem; font-weight: 800; line-height: 1; letter-spacing: -.04em; }
.sticker span { font-size: .72rem; font-weight: 700; line-height: 1.15; padding-inline: .7rem; }
@media (min-width: 900px) {
    .sticker { right: auto; left: -2rem; bottom: -1.75rem; width: 132px; }
    .sticker strong { font-size: 2.3rem; }
    .sticker span { font-size: .8rem; }
}

/* Apparition en douceur des articles au défilement */
@media (prefers-reduced-motion: no-preference) {
    .js [data-reveal] {
        opacity: 0; transform: translateY(22px);
        transition: opacity .6s ease, transform .7s cubic-bezier(.2, .7, .2, 1);
        transition-delay: calc(var(--i, 0) * 90ms);
    }
    .js [data-reveal].is-visible { opacity: 1; transform: none; }
}

/* Cartes : zoom de l'image et étiquette de catégorie colorée */
.visual { position: relative; }
.post:hover .media img, .feature:hover .media img { transform: scale(1.05); }
.post:hover .media--empty .logo-mark, .feature:hover .media--empty .logo-mark { transform: translateY(-4px) rotate(-4deg); }
.media--empty {
    background-color: #FFF4BF;
    background-color: color-mix(in srgb, var(--cat, var(--yellow)) 20%, white);
    background-image: repeating-linear-gradient(90deg, rgba(0, 0, 0, .05) 0 2px, transparent 2px 18px);
}
.pill {
    position: absolute; top: .75rem; left: .75rem;
    padding: .3rem .75rem; border-radius: 999px;
    background: var(--cat); color: var(--on-cat, #000);
    font-size: .8rem; font-weight: 700; text-decoration: none; line-height: 1.3;
    box-shadow: 0 2px 8px -2px rgba(0, 0, 0, .25);
    transition: transform .2s ease;
}
.pill:hover { transform: translateY(-2px); }

/* Filtres : teinte de la catégorie au survol + nombre d'articles */
.chip { transition: background-color .2s, border-color .2s; }
.chip:hover { background: color-mix(in srgb, var(--cat, var(--yellow)) 14%, white); border-color: var(--cat, var(--ink)); }
.chip .dot { background: var(--cat, var(--yellow)); }
.chip__count { font-size: .8rem; font-weight: 700; color: var(--muted); }
.chip[aria-current] .chip__count { color: #BDBDBD; }
.chip[aria-current]:hover { background: var(--ink); }

.more { margin: 2.5rem 0 0; text-align: center; }

/* Pagination numérotée */
.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.pagination__pages { display: flex; align-items: center; gap: .35rem; margin: 0; padding: 0; list-style: none; }
.pagination__page {
    display: grid; place-items: center; min-width: 44px; height: 44px; padding: 0 .6rem;
    border-radius: var(--r); color: var(--ink); font-weight: 700; text-decoration: none;
    font-variant-numeric: tabular-nums; transition: background-color .2s;
}
a.pagination__page:hover { background: var(--stone); }
.pagination__page[aria-current] { background: var(--yellow); box-shadow: inset 0 -3px 0 var(--ink); }
.pagination__gap { color: var(--muted); padding: 0 .2rem; }
.pagination__step { display: inline-flex; align-items: center; gap: .35rem; min-height: 44px; padding: 0 .9rem; border: 1.5px solid var(--line); border-radius: var(--r); color: var(--ink); font-weight: 700; text-decoration: none; }
a.pagination__step:hover { border-color: var(--ink); }
.pagination__step.is-disabled { opacity: .35; }
@media (max-width: 599px) {
    .pagination__step span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    .pagination__step { padding: 0; width: 44px; justify-content: center; }
    .pagination { justify-content: center; }
}

/* Appel aux bénévoles, en bas de page : effet « affiche » */
.cta-wrap { margin-top: clamp(4rem, 9vw, 6.5rem); }
.cta {
    display: grid; gap: 1.25rem; align-items: center;
    padding: clamp(1.5rem, 4vw, 2.5rem);
    background: var(--paper); border: 3px solid var(--ink); border-radius: 12px;
    box-shadow: 10px 10px 0 var(--yellow);
}
@media (min-width: 800px) { .cta { grid-template-columns: 1fr auto; gap: 3rem; } }
.cta__title { margin: 0; font-family: var(--display); font-weight: 800; font-size: clamp(1.8rem, 1.2rem + 2.2vw, 2.8rem); letter-spacing: -.04em; line-height: 1.05; }
.cta__text { margin: .6rem 0 0; max-width: 52ch; }
.cta-wrap + .site-footer { margin-top: clamp(3rem, 7vw, 5rem); }

/* Bouton « revenir en haut », avec anneau de progression de lecture */
.to-top {
    position: fixed; z-index: 40;
    right: max(1rem, env(safe-area-inset-right)); bottom: calc(1rem + env(safe-area-inset-bottom));
    display: grid; place-items: center; width: 52px; height: 52px; padding: 0;
    color: var(--yellow); background: var(--ink); border: 0; border-radius: 50%; cursor: pointer;
    box-shadow: 0 8px 20px -8px rgba(0, 0, 0, .5);
    opacity: 0; transform: translateY(16px) scale(.85); pointer-events: none;
    transition: opacity .25s ease, transform .3s cubic-bezier(.3, 1.4, .5, 1), background-color .2s;
}
.to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: #2B2B2B; }
.to-top:hover .icon { transform: translateY(-2px); }
.to-top .icon { width: 22px; height: 22px; transition: transform .2s ease; }
.to-top:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }
.to-top__ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.to-top__ring circle {
    fill: none; stroke: var(--yellow); stroke-width: 3; stroke-linecap: round;
    stroke-dasharray: 144.5; stroke-dashoffset: calc(144.5px * (1 - var(--progress, 0)));
}


/* =====================================================================
   Étape 6 : annonce, mission, écoles, page « S'engager »
   ===================================================================== */

/* Annonce importante : la bande jaune (ou rouge si « Important ») */
.announce { position: relative; background: var(--yellow); color: var(--ink); padding-block: clamp(2.25rem, 5vw, 3.5rem); }
.announce::before {
    content: ""; position: absolute; top: 0; left: 0; right: 0; height: 10px;
    background: repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 14px);
}
.announce--urgent { background: #C9322B; color: #fff; }
.announce--urgent::before { background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .8) 0 2px, transparent 2px 14px); }
.announce__inner { display: grid; gap: 1.25rem; align-items: center; }
@media (min-width: 800px) { .announce__inner { grid-template-columns: 1fr auto; gap: 3rem; } }
.announce__label { display: inline-flex; align-items: center; gap: .5rem; margin: 0 0 .6rem; font-weight: 800; font-size: .95rem; }
.announce__label .icon { width: 1.3em; height: 1.3em; }
.announce__title {
    margin: 0; max-width: 30ch; color: inherit;
    font-family: var(--display); font-weight: 800;
    font-size: clamp(1.9rem, 1.2rem + 2.8vw, 3.3rem); line-height: 1.02; letter-spacing: -.04em;
}
.announce__text { margin: .9rem 0 0; max-width: 60ch; font-size: 1.1rem; font-weight: 500; }
.announce__btn { justify-self: start; }
.announce--urgent .announce__btn { background: #fff; color: var(--ink); border-color: #fff; }
.announce--urgent .announce__btn:hover { background: var(--yellow); border-color: var(--yellow); }
.announce--urgent :focus-visible { outline-color: #fff; }
.announce--compact { padding-block: 1.75rem 1.5rem; margin-bottom: clamp(2rem, 5vw, 3rem); }
.announce--compact .announce__title { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.8rem); max-width: 40ch; }

/* La pastille de l'accueil : adhésion */
.sticker span { max-width: 11ch; margin-inline: auto; }

/* « À quoi sert l'APE ? » */
.mission { margin-top: clamp(3.5rem, 8vw, 6rem); padding-block: clamp(2.5rem, 6vw, 4.5rem); background: var(--stone); }
.mission__inner { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 900px) { .mission__inner { grid-template-columns: 1.15fr 1fr; gap: 4rem; } }
.mission__photo { margin: 0; }
.mission__photo img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r); box-shadow: 10px 10px 0 var(--yellow); }
.mission__photo figcaption { margin-top: 1.1rem; font-size: .9rem; color: var(--muted); }
.mission__lead { margin: 0 0 1rem; font-size: 1.1rem; }
.tags { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1.75rem; padding: 0; list-style: none; }
.tags li { padding: .35rem .85rem; background: var(--paper); border: 1.5px solid var(--ink); border-radius: 999px; font-weight: 700; font-size: .92rem; }
.uses { display: grid; gap: .75rem; margin: 0; padding: 0; list-style: none; }
.uses li { display: flex; align-items: center; gap: 1rem; padding: .9rem 1rem; background: var(--paper); border-radius: var(--r); }
.uses .icon { width: 2.6rem; height: 2.6rem; padding: .55rem; flex: none; background: var(--yellow); color: var(--ink); border-radius: 50%; }
.uses span { display: grid; line-height: 1.35; color: var(--muted); }
.uses strong { color: var(--ink); font-size: 1.05rem; }

/* « Deux écoles, une association » */
.schools { display: grid; gap: 1.5rem; }
@media (min-width: 760px) { .schools { grid-template-columns: 1fr 1fr; } }
.school { margin: 0; }
.school img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--r); }
.school figcaption { display: grid; gap: .15rem; padding-top: .9rem; }
.school strong { font-family: var(--display); font-size: 1.35rem; letter-spacing: -.02em; color: var(--ink); }
.school span { color: var(--muted); }

/* Page « S'engager » */
.engage-photo { margin: 0 0 1.5rem; }
.engage-photo img { width: 100%; aspect-ratio: 21 / 8; object-fit: cover; border-radius: var(--r); }
@media (max-width: 599px) { .engage-photo img { aspect-ratio: 16 / 9; } }

.choices { display: grid; gap: 1rem; }
@media (min-width: 700px) { .choices { grid-template-columns: 1fr 1fr; } }
.choice {
    display: grid; grid-template-columns: auto 1fr; gap: .25rem 1rem; align-items: start;
    padding: 1.25rem 1.4rem; color: var(--text); text-decoration: none;
    background: var(--paper); border: 2px solid var(--ink); border-radius: 12px;
    transition: transform .2s ease, box-shadow .2s ease;
}
.choice:hover { transform: translate(-3px, -3px); box-shadow: 6px 6px 0 var(--yellow); }
.choice__icon { grid-row: span 2; display: grid; place-items: center; width: 3rem; height: 3rem; background: var(--yellow); border-radius: 50%; color: var(--ink); }
.choice__icon .icon { width: 1.5rem; height: 1.5rem; }
.choice__title { font-family: var(--display); font-weight: 800; font-size: 1.35rem; letter-spacing: -.02em; color: var(--ink); }
.choice__text { color: var(--muted); }

.engage { display: grid; gap: 2rem; align-items: start; padding-top: clamp(3rem, 7vw, 5rem); scroll-margin-top: 70px; }
@media (min-width: 900px) { .engage { grid-template-columns: 1fr 1.15fr; gap: 4rem; } }
.engage__text p { max-width: 55ch; }
.engage__lead { font-size: 1.2rem; font-weight: 500; color: var(--ink); }
.engage__facts { margin: 1.5rem 0 0; padding: 0; list-style: none; display: grid; gap: .75rem; }
.engage__facts li { position: relative; padding-left: 1.6rem; }
.engage__facts li::before { content: ""; position: absolute; left: 0; top: .45em; width: .85rem; height: .85rem; background: var(--yellow); box-shadow: inset 0 -3px 0 var(--ink); }
.engage__form { padding: clamp(1.25rem, 4vw, 2rem); background: var(--stone); border-radius: 12px; }
.engage__form .form label { font-weight: 700; }
.engage__extra { padding: .9rem 1rem; background: var(--yellow-soft); border-left: 4px solid var(--yellow-strong); border-radius: var(--r); }

.thanks { margin-bottom: 2rem; padding: clamp(1.25rem, 4vw, 2rem); background: var(--yellow-soft); border: 2px solid var(--ink); border-radius: 12px; scroll-margin-top: 90px; }
.thanks__title { margin: 0; font-family: var(--display); font-size: 2.2rem; font-weight: 800; letter-spacing: -.035em; }
.thanks p { margin: .75rem 0; max-width: 60ch; }
.site-footer__motto { font-family: var(--display); font-weight: 800; font-size: 1.3rem; color: var(--yellow); letter-spacing: -.02em; }
.cta__actions { display: flex; flex-wrap: wrap; gap: .6rem; }

/* Carte « bulletin d'adhésion » à télécharger */
.bulletin {
    padding: clamp(1.4rem, 4vw, 2.2rem); background: var(--paper);
    border: 3px solid var(--ink); border-radius: 12px; box-shadow: 10px 10px 0 var(--yellow);
}
.bulletin__year { margin: 0; font-weight: 800; color: var(--muted); }
.bulletin__price { margin: .2rem 0 1.5rem; font-size: 1.15rem; font-weight: 600; }
.bulletin__price strong { font-family: var(--display); font-size: clamp(2.8rem, 2rem + 3vw, 3.8rem); font-weight: 800; letter-spacing: -.05em; line-height: 1; color: var(--ink); margin-right: .25rem; }
.steps { margin: 0 0 1.5rem; padding: 0; list-style: none; display: grid; gap: .9rem; }
.steps li { display: flex; align-items: flex-start; gap: .85rem; }
.steps__n {
    flex: none; display: grid; place-items: center; width: 2rem; height: 2rem;
    background: var(--yellow); color: var(--ink); border-radius: 50%;
    font-family: var(--display); font-weight: 800;
}
.steps strong { color: var(--ink); }
.bulletin__btn { flex-wrap: wrap; min-height: 56px; font-size: 1.05rem; }
.bulletin__size { font-weight: 500; font-size: .85rem; opacity: .75; }
.bulletin__hint { margin: .8rem 0 0; font-size: .9rem; color: var(--muted); text-align: center; }

/* =====================================================================
   Étape 8 : ambiance « école » — couleurs du logo de l'APE, cahier Seyès,
   tableau noir, petits dessins. Moins de jaune et de blanc.
   ===================================================================== */
:root {
    --red:         #C9322B;
    --orange:      #F8B328;
    --blue:        #2DB5E7;
    --purple:      #9B2B8F;
    --mint:        #DFF3EC;
    --mint-strong: #A8DCC9;
    --chalk:       #2E4A3F;
    --chalk-text:  #E9F0EA;
    --chalk-yellow:#FCE38A;
    --hand: 'Caveat', 'Comic Sans MS', cursive;

    /* Page de cahier à grands carreaux (Seyès), avec sa marge rouge */
    --seyes:
        linear-gradient(90deg, transparent calc(var(--margin, 64px) - 1px), rgba(214, 69, 65, .55) calc(var(--margin, 64px) - 1px) calc(var(--margin, 64px) + 1px), transparent calc(var(--margin, 64px) + 1px)),
        repeating-linear-gradient(90deg, transparent 0 31px, rgba(155, 43, 143, .13) 31px 32px),
        repeating-linear-gradient(180deg, transparent 0 31px, rgba(45, 110, 190, .30) 31px 32px),
        repeating-linear-gradient(180deg, transparent 0 7px, rgba(45, 110, 190, .11) 7px 8px);
}
html, body { overflow-x: clip; }

/* Dessins */
.doodle { position: absolute; display: block; pointer-events: none; z-index: 2; }
.doodle svg { display: block; width: 100%; height: auto; }

/* En-tête : bande aux couleurs du logo, comme une boîte de crayons */
.site-header::before {
    content: ""; display: block; height: 5px;
    background: linear-gradient(90deg, var(--red) 0 20%, var(--orange) 20% 40%, var(--blue) 40% 60%, var(--purple) 60% 80%, #2B2B2B 80%);
}
.site-nav a[aria-current] { box-shadow: inset 0 -3px 0 var(--orange); }
@media (max-width: 899px) { .site-nav a[aria-current] { box-shadow: inset 4px 0 0 var(--orange); } }
.btn--red { background: var(--red); border-color: var(--red); color: #fff; }
.btn--red:hover { background: #A8261F; border-color: #A8261F; }
.link-more { text-decoration-color: var(--orange); }

/* Titres de section soulignés d'un trait « au feutre » */
.section__title::after, .page-intro__title::after {
    content: ""; display: block; width: clamp(80px, 10vw, 130px); height: 12px; margin-top: .5rem;
    background: var(--accent, var(--orange));
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 140 14%22 preserveAspectRatio=%22none%22%3E%3Cpath d=%22M3 9c9-7 17-7 26 0s17 7 26 0 17-7 26 0 17 7 26 0 17-7 26 0%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%224.5%22 stroke-linecap=%22round%22/%3E%3C/svg%3E") center / 100% 100% no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 140 14%22 preserveAspectRatio=%22none%22%3E%3Cpath d=%22M3 9c9-7 17-7 26 0s17 7 26 0 17-7 26 0 17 7 26 0 17-7 26 0%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%224.5%22 stroke-linecap=%22round%22/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}
main > section:nth-of-type(4n+1) { --accent: var(--blue); }
main > section:nth-of-type(4n+2) { --accent: var(--red); }
main > section:nth-of-type(4n+3) { --accent: var(--purple); }
main > section:nth-of-type(4n)   { --accent: var(--orange); }
.page-intro { --accent: var(--red); }

/* Accueil : slogan manuscrit, tache de couleur et dessins autour de la photo */
.hero__motto {
    margin: 0 0 .4rem; font-family: var(--hand); font-weight: 700;
    font-size: clamp(1.7rem, 1.2rem + 1.5vw, 2.3rem); line-height: 1; color: var(--purple);
    rotate: -2deg; transform-origin: left center;
}
.hero__media { isolation: isolate; }
.hero__media::before {
    content: ""; position: absolute; inset: -7% -5% -9% 9%; z-index: -1;
    background: var(--mint); border-radius: 44% 56% 52% 48% / 46% 42% 58% 54%;
}
.hero-star--1 { width: 34px; top: -20px; left: -18px; color: var(--blue); }
.hero-star--2 { width: 18px; top: 26px; left: -40px; color: var(--red); }
.hero-star--3 { width: 26px; right: -16px; top: 40%; color: var(--purple); }
.hero-plane   { width: 118px; top: -76px; right: 6%; }
.hero-pencil  { width: 170px; bottom: -30px; right: -28px; rotate: -22deg; }
@media (max-width: 899px) {
    .hero-plane, .hero-star--2 { display: none; }
    .hero-pencil { width: 110px; bottom: -22px; right: -6px; }
    .hero-star--1 { left: -6px; }
    .hero-star--3 { right: -4px; }
}
.sticker { background: var(--red); color: #fff; }
.sticker span { font-family: var(--hand); font-size: 1.1rem; font-weight: 700; line-height: 1; }
@media (min-width: 900px) { .sticker span { font-size: 1.2rem; } }

/* Annonce « Information » : une page de cahier scotchée */
.announce--info { background: var(--mint); }
.announce--info::before { display: none; }
.announce--info .announce__inner {
    position: relative; --margin: 58px;
    padding: 2.4rem clamp(1.25rem, 3vw, 2.25rem) 2rem calc(58px + 1.5rem);
    background-color: #fff; background-image: var(--seyes);
    border-radius: 4px; box-shadow: 0 16px 30px -20px rgba(0, 0, 0, .45);
}
.announce--info .announce__inner::before {
    content: ""; position: absolute; top: -13px; left: 50%; width: 120px; height: 28px; margin-left: -60px;
    background: rgba(248, 179, 40, .6); rotate: -3deg;
}
.announce--info .announce__label { font-family: var(--hand); font-size: 1.6rem; font-weight: 700; color: var(--red); }
.announce--info .announce__label .icon { width: 1.1em; height: 1.1em; }
@media (max-width: 599px) {
    .announce--info .announce__inner { --margin: 20px; padding-left: calc(20px + 1rem); }
}
.announce--compact { margin-bottom: clamp(2rem, 5vw, 3rem); }

/* Images d'articles sans photo : une page de cahier */
.media--empty { background-color: #fff; background-image: var(--seyes); --margin: 30px; }

/* Surligneur aux couleurs de la catégorie */
.post__title a {
    background-image: linear-gradient(color-mix(in srgb, var(--cat, var(--orange)) 38%, transparent), color-mix(in srgb, var(--cat, var(--orange)) 38%, transparent));
}

/* « À quoi sert l'APE ? » */
.mission { position: relative; overflow: hidden; background: var(--mint); }
.mission-dashes { width: 280px; top: -8px; right: -40px; color: var(--mint-strong); z-index: 0; }
.mission-ruler { width: 150px; bottom: 26px; left: -34px; rotate: 14deg; z-index: 0; }
.mission__inner { position: relative; z-index: 1; }
.mission__photo img { box-shadow: 10px 10px 0 var(--purple); }
.tags li:nth-child(5n+1) { border-color: var(--red); }
.tags li:nth-child(5n+2) { border-color: var(--orange); }
.tags li:nth-child(5n+3) { border-color: var(--blue); }
.tags li:nth-child(5n+4) { border-color: var(--purple); }
.uses .icon { background: var(--tone, var(--orange)); color: #fff; }
@media (max-width: 699px) { .mission-ruler { display: none; } }

/* « Deux écoles » : des photos affichées au tableau de la classe */
.school {
    position: relative; padding: 12px 12px 16px; background: #fff; border-radius: 3px;
    box-shadow: 0 14px 28px -16px rgba(0, 0, 0, .4); rotate: -1.2deg;
}
.school:nth-child(2) { rotate: 1.4deg; }
.school::before {
    content: ""; position: absolute; top: -12px; left: 50%; width: 100px; height: 26px; margin-left: -50px;
    background: rgba(45, 181, 231, .45); rotate: 3deg; z-index: 1;
}
.school:nth-child(2)::before { background: rgba(155, 43, 143, .35); rotate: -4deg; }
.school img { border-radius: 2px; }
.school strong { font-family: var(--hand); font-size: 1.8rem; font-weight: 700; letter-spacing: 0; }

/* Téléchargements d'un article */
.downloads { background: var(--mint); }

/* Appel à rejoindre l'APE */
.cta { box-shadow: 10px 10px 0 var(--blue); }

/* Page « S'engager » */
.page-intro--doodle { position: relative; }
.intro-plane { width: 130px; top: 18px; right: 3%; }
@media (max-width: 699px) { .intro-plane { display: none; } }
.choice:hover { box-shadow: 6px 6px 0 var(--red); }
.choice:nth-child(2):hover { box-shadow: 6px 6px 0 var(--blue); }
.choice__icon { background: var(--red); color: #fff; }
.choice:nth-child(2) .choice__icon { background: var(--blue); }
.engage__facts li:nth-child(3n+1)::before { background: var(--red); box-shadow: none; border-radius: 50%; }
.engage__facts li:nth-child(3n+2)::before { background: var(--blue); box-shadow: none; border-radius: 50%; }
.engage__facts li:nth-child(3n)::before   { background: var(--purple); box-shadow: none; border-radius: 50%; }
.engage__form { background: var(--mint); }
.engage__extra { background: var(--mint); border-left-color: var(--purple); }
.bulletin {
    --margin: 26px; padding-left: calc(26px + clamp(1rem, 3vw, 1.6rem));
    background-color: #fff; background-image: var(--seyes); box-shadow: 10px 10px 0 var(--purple);
}
.steps li:nth-child(1) .steps__n { background: var(--red); color: #fff; }
.steps li:nth-child(2) .steps__n { background: var(--blue); color: #fff; }
.steps li:nth-child(3) .steps__n { background: var(--purple); color: #fff; }
.thanks { background: var(--mint); }

/* Pagination */
.pagination__page[aria-current] { background: var(--mint); box-shadow: inset 0 -3px 0 var(--blue); }

/* Pied de page : le tableau noir de la classe, avec son cadre en bois */
.site-footer {
    position: relative; overflow: hidden;
    background-color: var(--chalk);
    background-image:
        radial-gradient(ellipse 60% 80% at 12% 0%, rgba(255, 255, 255, .08), transparent 70%),
        radial-gradient(ellipse 50% 70% at 90% 100%, rgba(255, 255, 255, .06), transparent 70%);
    border-top: 14px solid #8A6E55; box-shadow: inset 0 4px 0 #6D5643;
    color: var(--chalk-text);
}
.site-footer a:hover { color: var(--chalk-yellow); }
.site-footer :focus-visible { outline-color: var(--chalk-yellow); }
.site-footer__motto { font-family: var(--hand); font-size: 2.2rem; font-weight: 700; letter-spacing: 0; color: var(--chalk-yellow); }
.site-footer__legal { border-top: 1px dashed rgba(255, 255, 255, .25); color: #B7C7BC; }
.site-footer__legal .site-footer__sep { color: #6E8579; }
.site-footer__legal a { color: #D5E0D8; }
.chalk-star { color: rgba(255, 255, 255, .5); }
.chalk-star--1 { width: 24px; top: 36px; right: 11%; }
.chalk-star--2 { width: 14px; top: 84px; right: 16%; }

/* Bouton « revenir en haut » */
.to-top { color: var(--orange); }
.to-top__ring circle { stroke: var(--orange); }
.error-page__code { box-shadow: inset 0 -.28em 0 var(--mint-strong); }

/* =====================================================================
   Étape 10 : Le bureau, galerie photos, agenda, plan du site, partage
   ===================================================================== */

/* Doodles de fiche pages */
.intro-star  { width: 30px; top: 6px; right: 8%; color: var(--blue); }
.intro-dashes{ width: 220px; top: -4px; right: -20px; color: var(--mint-strong); }
@media (max-width: 699px) { .intro-star, .intro-dashes { display: none; } }

/* ------------------------------------------------------------ Le bureau */
.board { display: grid; gap: 2rem 1.5rem; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.member { text-align: center; }
.member__photo {
    width: 132px; height: 132px; margin: 0 auto .9rem; border-radius: 50%; overflow: hidden;
    background: var(--mint); border: 3px solid var(--ink);
    display: grid; place-items: center;
}
.member__photo img { width: 100%; height: 100%; object-fit: cover; }
.member__initial { font-family: var(--display); font-size: 2.6rem; font-weight: 800; color: var(--purple); }
.member__name { margin: 0; font-family: var(--display); font-size: 1.2rem; font-weight: 700; letter-spacing: -.01em; }
.member__role { margin: .15rem 0 .5rem; font-weight: 700; color: var(--red); font-size: .95rem; }
.member__bio { margin: 0; color: var(--muted); font-size: .92rem; }
.member:nth-child(3n+2) .member__photo { border-color: var(--blue); }
.member:nth-child(3n+2) .member__role { color: var(--blue); }
.member:nth-child(3n) .member__photo { border-color: var(--purple); }
.member:nth-child(3n) .member__role { color: var(--purple); }
.member:nth-child(3n+2) .member__initial { color: var(--blue); }
.member:nth-child(3n) .member__initial { color: var(--red); }

/* ------------------------------------------------------------ Galerie */
.grid--albums { grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.album { display: block; color: var(--ink); text-decoration: none; }
.album__cover { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--r); background: var(--mint); }
.album__cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
.album:hover .album__cover img { transform: scale(1.06); }
.album__title { display: block; margin-top: .7rem; font-family: var(--display); font-weight: 700; font-size: 1.15rem; letter-spacing: -.015em; }
.album__count { display: block; color: var(--muted); font-size: .88rem; }

.lightbox-grid { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.lightbox-grid__item { display: block; padding: 0; border: 0; background: none; cursor: zoom-in; aspect-ratio: 1; overflow: hidden; border-radius: var(--r); }
.lightbox-grid__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.lightbox-grid__item:hover img { transform: scale(1.07); }

.lightbox {
    position: fixed; inset: 0; z-index: 90;
    display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1rem;
    padding: 1rem clamp(1rem, 4vw, 3rem);
    background: rgba(15, 20, 18, .94);
}
.lightbox__figure { grid-column: 2; margin: 0; display: grid; justify-items: center; gap: .75rem; max-height: 90vh; }
.lightbox__figure img { max-width: 100%; max-height: 78vh; object-fit: contain; border-radius: 4px; }
.lightbox__figure figcaption { color: #fff; font-size: .95rem; text-align: center; max-width: 60ch; }
.lightbox__close { position: absolute; top: 1rem; right: 1rem; }
.lightbox__close, .lightbox__nav {
    width: 46px; height: 46px; display: grid; place-items: center;
    color: #fff; background: rgba(255, 255, 255, .12); border: 0; border-radius: 50%; cursor: pointer;
}
.lightbox__close:hover, .lightbox__nav:hover { background: rgba(255, 255, 255, .24); }
.lightbox__nav--prev { grid-column: 1; }
.lightbox__nav--next { grid-column: 3; }
@media (max-width: 599px) {
    .lightbox { grid-template-columns: 1fr; padding: 3.5rem 1rem 1rem; }
    .lightbox__figure { grid-column: 1; }
    .lightbox__nav { position: absolute; top: 50%; transform: translateY(-50%); }
    .lightbox__nav--prev { left: .5rem; } .lightbox__nav--next { right: .5rem; }
}

/* ------------------------------------------------------------ Agenda */
.events { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1rem; }
.event { display: flex; gap: 1.1rem; padding: 1.1rem; min-width: 0; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; }
.event__date {
    flex: none; display: grid; place-items: center; width: 62px; height: 62px; border-radius: 10px;
    background: var(--mint); text-align: center; line-height: 1.1;
}
.event__date strong { display: block; font-family: var(--display); font-size: 1.5rem; font-weight: 800; }
.event__date span { display: block; font-size: .75rem; font-weight: 700; text-transform: uppercase; color: var(--muted); }
.event:nth-child(3n+2) .event__date { background: color-mix(in srgb, var(--red) 14%, white); }
.event:nth-child(3n) .event__date { background: color-mix(in srgb, var(--purple) 14%, white); }
.event__body { min-width: 0; }
.event__when { margin: 0 0 .2rem; font-size: .88rem; font-weight: 700; color: var(--muted); }
.event__title { margin: 0 0 .35rem; font-family: var(--display); font-size: 1.2rem; font-weight: 700; letter-spacing: -.015em; }
.event__desc { margin: 0 0 .6rem; color: var(--text); }
.event__actions { display: flex; flex-wrap: wrap; gap: 1.1rem; margin: 0; }
.link-action { display: inline-flex; align-items: center; gap: .4rem; font-weight: 700; font-size: .92rem; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.link-action .icon { width: 1.05em; height: 1.05em; }
.past-events { margin-top: 2.5rem; }
.past-events summary { cursor: pointer; font-weight: 800; font-size: 1.05rem; margin-bottom: 1rem; }
.events--past .event { opacity: .7; padding: .7rem 1rem; }
.events--past .event__date { width: 48px; height: 48px; }
.events--past .event__date strong { font-size: 1.15rem; }

/* ------------------------------------------------------------ Plan du site */
.sitemap { display: grid; gap: 2rem; }
@media (min-width: 700px) { .sitemap { grid-template-columns: 1fr 1fr; } }
.sitemap h2 { font-family: var(--display); font-size: 1.25rem; letter-spacing: -.01em; }
.sitemap ul { margin: 0 0 1.5rem; padding-left: 1.1rem; }
.sitemap li { margin: .3rem 0; }
.sitemap ul ul { margin: .3rem 0 .5rem; font-size: .92rem; }

/* ------------------------------------------------------------ Partage */
.share-bar { display: flex; align-items: center; gap: .6rem; margin-top: 2rem; padding-top: 1.5rem; border-top: 1px dashed var(--line); }
.share-bar__label { font-weight: 700; color: var(--muted); font-size: .92rem; }
.share-btn {
    display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
    color: #fff; border: 0; cursor: pointer; text-decoration: none; transition: transform .15s ease;
}
.share-btn:hover { transform: translateY(-2px); }
.share-btn--facebook { background: #1877F2; }
.share-btn--whatsapp { background: #25D366; }
.share-btn--copy { background: var(--ink); position: relative; }
.share-btn--copy.is-copied::after {
    content: "Lien copié !"; position: absolute; bottom: 120%; left: 50%; transform: translateX(-50%);
    background: var(--ink); color: #fff; font-size: .78rem; font-weight: 700; padding: .3rem .6rem; border-radius: 6px; white-space: nowrap;
}

/* Accueil : bandeau agenda + galerie, entre les actualités et « À quoi sert l'APE » */
.teasers { display: grid; gap: 1rem; margin-top: clamp(2rem, 5vw, 3rem); }
@media (min-width: 700px) { .teasers { grid-template-columns: 1fr 1fr; } }
.teaser {
    display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.3rem; min-width: 0;
    background: var(--paper); border: 2px solid var(--ink); border-radius: 12px;
    color: var(--ink); text-decoration: none; transition: transform .15s ease, box-shadow .15s ease;
}
.teaser:hover { transform: translate(-2px, -2px); }
.teaser__date {
    flex: none; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 10px;
    background: var(--mint); text-align: center; line-height: 1.05;
}
.teaser__date strong { font-family: var(--display); font-size: 1.4rem; font-weight: 800; }
.teaser__date span { font-size: .72rem; font-weight: 700; color: var(--muted); text-transform: uppercase; }
.teaser__stack { display: flex; flex: none; }
.teaser__stack img { width: 44px; height: 56px; object-fit: cover; border-radius: 6px; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .2); margin-left: -18px; }
.teaser__stack img:first-child { margin-left: 0; }
.teaser__body { flex: 1; min-width: 0; }
.teaser__label { display: flex; align-items: center; gap: .4rem; font-size: .8rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .02em; }
.teaser__label .icon { width: 1em; height: 1em; }
.teaser__title { display: block; margin-top: .15rem; font-family: var(--display); font-weight: 700; font-size: 1.1rem; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.teaser__arrow { flex: none; color: var(--muted); }

/* =====================================================================
   Étape 11 : des zones plus visibles au défilement (fonds teintés)
   Chaque grand thème du site a sa propre couleur douce, réutilisée
   partout où il apparaît : actualités (crème), agenda (lavande),
   galerie (rose), bureau/écoles (bleu), appel à l'action (jaune).
   ===================================================================== */
.section--panel {
    --panel-pad: clamp(2rem, 5vw, 3.25rem);
    border-radius: 22px;
    padding: var(--panel-pad) clamp(1.25rem, 4vw, 2.5rem) !important;
    margin-block: clamp(1.75rem, 4vw, 3rem);
}
/* .section--tight annule le padding du haut : on le restaure pour un panneau plein */
.section--tight.section--panel { padding-top: var(--panel-pad) !important; }
.page-intro + .section--panel { margin-top: 0; }
.section--panel .chip:not([aria-current]) { background: var(--paper); }
.section--panel .empty { border-color: rgba(0, 0, 0, .12); }

.tint-cream    { background: #FBF3E2; }
.tint-lavender { background: #F5EEF8; }
.tint-rose     { background: #FBEDF1; }
.tint-blue     { background: #E9F5FA; }
.tint-yellow   { background: #FFF6DD; }

/* La bande d'appel à l'action garde son espacement, avec un fond désormais teinté */
.cta-wrap.section--panel { margin-top: clamp(3rem, 7vw, 5rem); margin-bottom: 0; }
.cta-wrap.section--panel .cta { box-shadow: 8px 8px 0 var(--paper); }
.cta-wrap.section--panel + .site-footer { margin-top: 0; }

/* Bandeau accueil : chaque teaser porte la couleur de sa page de destination */
.teaser--event { background: #F5EEF8; border-color: var(--purple); }
.teaser--event .teaser__date { background: #fff; }
.teaser--gallery { background: #FBEDF1; border-color: var(--red); }
.teaser--gallery .teaser__stack img { border-color: #fff; }
.teaser:hover { box-shadow: 5px 5px 0 var(--ink); }

@media (prefers-contrast: more) {
    .tint-cream, .tint-lavender, .tint-rose, .tint-blue, .tint-yellow { background: var(--paper); border: 1px solid var(--line); }
}
