/* DESIGN « FANIONS » (actuel).
   Pour revenir à l'ancien design : "design": "classique" dans src/_data/site.json.
   Les mêmes pages servent aux deux designs ; seule cette feuille de style change. */

:root {
    /* Couleurs de l'association */
    --rose: #EF476F;
    --cyan: #1B9AAA;
    --vert: #06BD8C;
    --jaune: #FFC43D;
    --orange: #f77f00;

    /* Variantes foncées : seules utilisées pour du texte ou sous du texte blanc */
    --rose-fonce: #C81E4A;
    --cyan-fonce: #0F6772;
    --vert-fonce: #04795A;
    --orange-texte: #B35600;

    --encre: #2b2d42;
    --gris: #4d5466;
    --clair: #F0F8F9;
    --trait: #E3E8EC;
    --blanc: #ffffff;

    /* Anciens noms, encore utilisés dans les pages événement */
    --primary-color: var(--rose);
    --secondary-color: var(--cyan);
    --accent-color: var(--vert);
    --highlight-color: var(--jaune);
    --light-bg: var(--clair);
    --white: var(--blanc);
    --text-main: var(--encre);
    --text-muted: var(--gris);

    --rayon: 18px;
    --ombre: 0 6px 24px rgba(43, 45, 66, 0.08);
    --ombre-forte: 0 12px 32px rgba(43, 45, 66, 0.16);
    --hauteur-menu: 72px;

    /* Titres de section en capitales : mettre « none » pour revenir aux minuscules */
    --casse-titres: uppercase;

    /* Guirlande de fanions (5 couleurs) et petit trio de fanions des titres */
    --fanions: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 500 40' preserveAspectRatio='none'%3E%3Cpolygon points='0,0 100,0 50,40' fill='%23EF476F'/%3E%3Cpolygon points='100,0 200,0 150,40' fill='%23FFC43D'/%3E%3Cpolygon points='200,0 300,0 250,40' fill='%231B9AAA'/%3E%3Cpolygon points='300,0 400,0 350,40' fill='%2306BD8C'/%3E%3Cpolygon points='400,0 500,0 450,40' fill='%23f77f00'/%3E%3C/svg%3E");
    --trio: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 34 24'%3E%3Cpolygon points='0,0 14,0 7,16' fill='%23EF476F'/%3E%3Cpolygon points='10,4 24,4 17,20' fill='%23FFC43D'/%3E%3Cpolygon points='20,8 34,8 27,24' fill='%231B9AAA'/%3E%3C/svg%3E");
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--hauteur-menu) + 16px);
}

body {
    font-family: 'Poppins', 'Segoe UI', Arial, sans-serif;
    font-size: 1.0625rem;
    color: var(--encre);
    background-color: var(--blanc);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.01em;
}

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

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

:focus-visible {
    outline: 3px solid var(--cyan-fonce);
    outline-offset: 3px;
    border-radius: 4px;
}

footer :focus-visible,
.hero :focus-visible,
#l-association :focus-visible {
    outline-color: var(--jaune);
}

.container {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 32px;
}

.text-white { color: var(--blanc) !important; }
.bg-light { background-color: var(--clair); }
.mt-4 { margin-top: 0; }
.lead { font-size: 1.2rem; margin-bottom: 24px; }
.texte-discret { color: var(--gris); }

/* ---------- Boutons ---------- */
.btn-primary, .btn-secondary, .btn-accent, .btn-orange,
.btn-hero-primary, .btn-hero-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 6px 26px;
    border-radius: 999px;
    border: 0;
    font-family: inherit;
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.3;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.btn-primary { background-color: var(--rose-fonce); color: var(--blanc); }
.btn-secondary { background-color: var(--cyan-fonce); color: var(--blanc); }
.btn-accent { background-color: var(--vert-fonce); color: var(--blanc); }
.btn-orange { background-color: var(--orange); color: var(--encre); }
.btn-hero-primary { background-color: var(--jaune); color: var(--encre); }
.btn-hero-secondary { border: 2px solid var(--blanc); color: var(--blanc); }

a.btn-primary:hover, a.btn-secondary:hover, a.btn-accent:hover, a.btn-orange:hover,
button.btn-primary:hover, .btn-hero-primary:hover,
a:hover > .featured-event .btn-orange,
a:hover > .event-card .btn-primary {
    transform: translateY(-2px);
    box-shadow: var(--ombre-forte);
}

.btn-hero-secondary:hover {
    background-color: var(--blanc);
    color: var(--cyan-fonce);
}

.btn-petit { min-height: 44px; padding: 4px 20px; font-size: 0.95rem; }
.btn-icone { gap: 10px; }

.btn-inactif,
.btn-primary.btn-inactif,
.btn-orange.btn-inactif {
    background-color: var(--clair);
    color: var(--gris);
    box-shadow: inset 0 0 0 1px var(--trait);
    cursor: default;
}

/* ---------- Menu ---------- */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    height: var(--hauteur-menu);
    padding: 0 max(32px, calc((100vw - 1160px) / 2 + 32px));
    background: var(--blanc);
    color: var(--encre);
    transition: box-shadow 0.3s ease;
}

.navbar.scrolled {
    box-shadow: 0 2px 16px rgba(43, 45, 66, 0.12);
}

.logo a {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--cyan-fonce);
    white-space: nowrap;
}

.logo a::before {
    content: '';
    width: 34px;
    height: 24px;
    background: var(--trio) center / contain no-repeat;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 4px 26px;
}

.nav-links a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-weight: 500;
    font-size: 1rem;
    box-shadow: inset 0 -3px 0 transparent;
    transition: color 0.2s ease, box-shadow 0.2s ease;
}

.nav-links a:hover {
    color: var(--rose-fonce);
}

.nav-links a.active {
    color: var(--rose-fonce);
    font-weight: 700;
    box-shadow: inset 0 -3px 0 var(--jaune);
}

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.hamburger span {
    width: 28px;
    height: 3px;
    background-color: var(--encre);
    border-radius: 10px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.hamburger.toggle span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.hamburger.toggle span:nth-child(2) { opacity: 0; }
.hamburger.toggle span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* ---------- Bandeau ---------- */
.hero {
    position: relative;
    margin-top: var(--hauteur-menu);
    min-height: 420px;
    display: flex;
    align-items: flex-end;
    color: var(--blanc);
    background: var(--encre) url('/images/evenements-passes/fete-de-la-musique-2026.webp') center 35% / cover no-repeat;
}

.hero-home {
    min-height: 580px;
}

/* La guirlande de fanions */
.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 40px;
    z-index: 2;
    background: var(--fanions) left top / 500px 40px repeat-x;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(0deg, rgba(27, 29, 48, 0.9) 0%, rgba(27, 29, 48, 0.5) 55%, rgba(27, 29, 48, 0.12) 100%);
}

.hero-home .hero-overlay {
    background: linear-gradient(90deg, rgba(27, 29, 48, 0.88) 0%, rgba(27, 29, 48, 0.62) 45%, rgba(27, 29, 48, 0.08) 80%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1160px;
    margin: 0 auto;
    padding: 100px 32px 56px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
}

.hero-home .hero-content {
    padding-bottom: 72px;
    gap: 20px;
}

.hero h1 {
    max-width: 14em;
    font-size: clamp(2.4rem, 6vw, 4.5rem);
    line-height: 1.05;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

.hero-home h1 {
    font-size: clamp(2.75rem, 7vw, 5.25rem);
    line-height: 1;
}

.hero p {
    max-width: 640px;
    font-size: 1.25rem;
    line-height: 1.55;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 8px;
}

.hero-event-date {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    padding: 6px 22px 6px 18px;
    border-radius: 999px;
    background: var(--blanc);
    color: var(--encre);
    font-weight: 700;
    font-size: 1.05rem;
}

.hero-event-date::before {
    content: '';
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex: none;
    background: var(--event, var(--vert));
}

/* ---------- Sections et titres ---------- */
.section {
    padding: 52px 0 80px;
}

.section-title,
.section-title.text-primary,
.section-title.text-secondary,
.section-title.text-accent,
.section-title.text-highlight,
.section-title.text-orange,
.section-title.text-event {
    margin-bottom: 32px;
    font-size: clamp(1.7rem, 3.6vw, 2.25rem);
    color: var(--encre);
    text-transform: var(--casse-titres);
    letter-spacing: 0.01em;
}

.section-title.text-white {
    color: var(--blanc);
}

.section-title::before {
    content: '';
    display: block;
    width: 44px;
    height: 31px;
    margin-bottom: 12px;
    background: var(--trio) left center / contain no-repeat;
}

.event-title {
    margin-bottom: 20px;
}

/* ---------- Prochain événement ---------- */
.featured-event-link {
    display: block;
    border-radius: var(--rayon);
}

.featured-event {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    background: var(--blanc);
    border-radius: var(--rayon);
    overflow: hidden;
    box-shadow: var(--ombre);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

a.featured-event-link:hover .featured-event {
    transform: translateY(-4px);
    box-shadow: var(--ombre-forte);
}

.featured-image-placeholder {
    position: relative;
    min-height: 380px;
    background: var(--clair);
}

.event-poster-large {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-content {
    padding: 44px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-content: center;
    align-items: center;
    justify-items: start;
    gap: 16px 20px;
}

.featured-content > * {
    grid-column: 1 / -1;
}

.featured-content > .date-pastille {
    grid-column: 1;
}

.featured-content > h3 {
    grid-column: 2;
}

.featured-content h3 {
    font-size: clamp(1.6rem, 3vw, 2.1rem);
    color: var(--encre) !important;
}

.event-date {
    color: var(--rose-fonce);
    font-weight: 700;
}

.event-description {
    color: var(--gris);
}

.featured-content .btn-orange {
    margin-top: 8px;
}

/* ---------- Pastilles de date ----------
   La date complète reste dans la page pour les lecteurs d'écran. */
.date-pastille {
    flex: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 88px;
    height: 96px;
    border-radius: 14px;
    background: var(--cyan-fonce);
    color: var(--blanc);
    line-height: 1;
    text-transform: uppercase;
}

.date-pastille span {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.date-pastille strong {
    margin: 4px 0;
    font-size: 2.5rem;
    font-weight: 800;
}

.featured-content > .date-pastille {
    background: var(--rose-fonce);
}

.date-texte {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.event-date:not(:has(.date-heures)):has(.date-texte) {
    margin: 0;
    height: 0;
}

/* Les événements passés gardent leur date en toutes lettres */
#evenements-passes .date-texte {
    position: static;
    width: auto;
    height: auto;
    clip-path: none;
}

/* ---------- L'affiche posée sur la photo ---------- */
.poster-overlay-a4 {
    position: absolute;
    z-index: 2;
    top: 50%;
    right: 18px;
    height: 80%;
    aspect-ratio: 1 / 1.414;
    border: 3px solid var(--blanc);
    border-radius: 6px;
    overflow: hidden;
    background-color: var(--trait);
    box-shadow: 0 6px 18px rgba(27, 29, 48, 0.45);
    transform: translateY(-50%) rotate(4deg);
    transition: transform 0.3s ease;
}

.poster-overlay-a4 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-image-placeholder .poster-overlay-a4 {
    right: 28px;
    height: 72%;
    max-height: 300px;
}

a:hover .poster-overlay-a4 {
    transform: translateY(-50%) rotate(0deg) scale(1.05);
}

/* ---------- Cartes d'événement ---------- */
.event-card-link {
    display: block;
    border-radius: var(--rayon);
}

.event-card {
    background: var(--blanc);
    border-radius: var(--rayon);
    overflow: hidden;
    box-shadow: var(--ombre);
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

a.event-card-link:hover .event-card {
    transform: translateY(-4px);
    box-shadow: var(--ombre-forte);
}

.card-image {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    background: var(--clair);
}

.card-image > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

a.event-card-link:hover .card-image > img {
    transform: scale(1.04);
}

.card-content {
    padding: 18px 20px 22px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    gap: 4px;
}

.card-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
}

.card-content .event-date {
    font-size: 0.92rem;
}

.card-resume {
    color: var(--gris);
    font-size: 1rem;
}

/* Agenda : une carte par événement, l'affiche (ou la photo) en grand à gauche */
#prochains-evenements .event-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(440px, 100%), 1fr));
    gap: 24px;
}

#prochains-evenements .event-card {
    display: grid;
    grid-template-columns: minmax(0, 45%) minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    column-gap: 28px;
    align-items: start;
}

#prochains-evenements .card-image {
    grid-column: 1;
    grid-row: 1 / span 2;
    aspect-ratio: 1 / 1.414;
}

#prochains-evenements .event-card > .date-pastille {
    grid-column: 2;
    grid-row: 1;
    margin-top: 28px;
}

#prochains-evenements .card-content {
    grid-column: 2;
    grid-row: 2;
    padding: 18px 28px 28px 0;
    align-items: flex-start;
    gap: 8px;
}

/* Événement sans illustration : la carte reste, sans la colonne d'image */
#prochains-evenements .event-card--sans-image {
    grid-template-columns: minmax(0, 1fr);
    padding-left: 28px;
}

#prochains-evenements .event-card--sans-image > .date-pastille,
#prochains-evenements .event-card--sans-image > .card-content {
    grid-column: 1;
}

#prochains-evenements .card-content h3 {
    font-size: 1.4rem;
}

#prochains-evenements .card-content .btn-primary {
    margin-top: 10px;
}

.compact-events-section {
    margin-top: 40px;
}

.compact-events-section h3 {
    margin-bottom: 16px;
    font-size: 1.4rem;
}

.compact-events-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.compact-event-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px 24px;
    padding: 16px 28px 16px 16px;
    background: var(--blanc);
    border-radius: var(--rayon);
    box-shadow: var(--ombre);
}

.compact-event-date {
    position: absolute;
}

.compact-event-item .date-pastille {
    width: 72px;
    height: 78px;
}

.compact-event-item .date-pastille strong {
    font-size: 2rem;
}

.compact-event-title {
    flex: 1 1 280px;
    font-weight: 600;
}

.compact-event-action {
    font-size: 0.95rem;
    font-weight: 600;
}

.compact-event-action a {
    color: var(--cyan-fonce);
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* Événements passés */
#evenements-passes .event-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
    gap: 24px;
}

#evenements-passes .card-content {
    flex-direction: column-reverse;
    justify-content: flex-end;
}

#evenements-passes .event-date {
    color: var(--orange-texte);
}

/* ---------- L'association ---------- */
#l-association {
    background-color: var(--cyan-fonce);
    padding: 64px 0 88px;
}

.asso {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto 1fr;
    column-gap: 56px;
    align-items: start;
}

.asso .section-title {
    grid-column: 2;
    margin-bottom: 24px;
}

.asso-photo {
    grid-column: 1;
    grid-row: 1 / span 2;
    align-self: center;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border: 6px solid var(--blanc);
    border-radius: var(--rayon);
    transform: rotate(-2deg);
}

.asso-grid {
    grid-column: 2;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.asso-grid h3 {
    margin-bottom: 6px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--jaune);
}

.bureau {
    line-height: 1.8;
}

.btn-rejoindre {
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    margin-top: 16px;
    padding: 6px 26px;
    border-radius: 999px;
    background: var(--jaune);
    color: var(--encre);
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-rejoindre:hover {
    transform: translateY(-2px);
    box-shadow: var(--ombre-forte);
}

/* ---------- Galerie ---------- */
.galerie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr));
    gap: 16px;
}

.galerie-item {
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 14px;
    background: var(--clair);
}

.galerie-item--43 {
    aspect-ratio: 4 / 3;
}

.galerie-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.galerie-item:hover img {
    transform: scale(1.06);
}

/* ---------- Pied de page ---------- */
footer {
    background-color: var(--encre);
    color: var(--blanc);
    padding: 72px 0 32px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
    gap: 48px;
    margin-bottom: 48px;
}

.footer-col h3 {
    margin-bottom: 12px;
    font-size: 1.25rem;
    font-weight: 700;
}

.footer-col p {
    color: #d5d8e3;
    font-size: 1rem;
}

.newsletter-intro {
    margin-bottom: 4px;
}

.contact-email {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--jaune);
    overflow-wrap: anywhere;
}

.contact-email:hover,
.social-link:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.newsletter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.newsletter-form input[type="email"] {
    flex: 1 1 180px;
    min-height: 48px;
    padding: 0 18px;
    border: 0;
    border-radius: 999px;
    font-family: inherit;
    font-size: 1rem;
    color: var(--encre);
    background: var(--blanc);
}

.footer-col .newsletter-mention {
    margin-top: 12px;
    font-size: 0.85rem;
    line-height: 1.5;
}

.newsletter-mention a {
    color: var(--blanc);
    text-decoration: underline;
    text-underline-offset: 3px;
}

footer .btn-primary {
    background-color: var(--jaune);
    color: var(--encre);
}

.social-links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    font-weight: 600;
}

.footer-liens {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 24px;
    margin-top: 4px;
}

.footer-liens a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* ---------- Pages de texte (mentions légales, confidentialité) ---------- */
.page-texte {
    max-width: 760px;
}

.page-texte h2 {
    margin: 44px 0 12px;
    font-size: 1.45rem;
}

.page-texte h2:first-child {
    margin-top: 0;
}

.page-texte p,
.page-texte ul {
    margin-bottom: 14px;
}

.page-texte ul {
    padding-left: 22px;
}

.page-texte a {
    color: var(--cyan-fonce);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    overflow-wrap: anywhere;
}

.page-maj {
    color: var(--gris);
    font-size: 0.95rem;
}

.footer-bottom {
    max-width: 1160px;
    margin: 0 auto;
    padding: 24px 32px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    font-size: 0.9rem;
    color: #d5d8e3;
}

/* ---------- Visionneuse de photos ---------- */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    inset: 0;
    background-color: rgba(20, 22, 42, 0.94);
    justify-content: center;
    align-items: center;
}

.lightbox.active { display: flex; }

.lightbox-img {
    max-width: 96%;
    max-height: 96%;
    object-fit: contain;
    border-radius: 8px;
    animation: apparition 0.3s ease;
}

.lightbox-close, .lightbox-prev, .lightbox-next {
    position: absolute;
    z-index: 2001;
    color: var(--blanc);
    font-weight: bold;
    cursor: pointer;
    user-select: none;
    transition: color 0.2s ease;
}

.lightbox-close { top: 12px; right: 24px; font-size: 50px; line-height: 1; }
.lightbox-prev, .lightbox-next { top: 50%; transform: translateY(-50%); font-size: 40px; padding: 16px; }
.lightbox-prev { left: 12px; }
.lightbox-next { right: 12px; }
.lightbox-prev:hover, .lightbox-next:hover, .lightbox-close:hover { color: var(--jaune); }

@keyframes apparition {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

/* ============================================================
   Pages événement
   ============================================================ */
.event-details {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 56px;
    align-items: start;
}

.details-sidebar {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

/* Les infos pratiques (date, horaires, lieu, tarif) passent avant l'affiche */
.practical-info:has(.info-list) {
    order: -1;
}

.event-poster {
    cursor: zoom-in;
    width: 100%;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(43, 45, 66, 0.18);
    transform: rotate(1.5deg);
}

.practical-info {
    padding: 26px;
    border-radius: var(--rayon);
    background: var(--clair);
}

.practical-info h3,
.practical-info h3.text-event {
    margin-bottom: 8px;
    font-size: 1.25rem;
    color: var(--encre);
}

.info-list {
    list-style: none;
}

.info-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #d6e3e6;
}

.info-list li:last-child {
    border-bottom: 0;
}

.info-icone {
    flex: none;
    font-size: 1.2rem;
    line-height: 1.4;
}

.sep {
    border: 0;
    border-top: 1px solid #d6e3e6;
    margin: 4px 0 16px;
}

.organisateur {
    font-size: 0.9rem;
    color: var(--gris);
}

.info-note {
    margin-top: 12px;
    font-size: 0.98rem;
    color: var(--gris);
}

.event-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    margin: 0 0 28px;
    padding: 6px 22px;
    border-radius: 999px;
    background: #E3F7F0;
    color: var(--vert-fonce);
    font-weight: 700;
}

.event-badge--centre {
    margin-top: 12px;
}

/* Liste des animations */
.anim-list {
    margin-bottom: 36px;
    border-top: 1px solid var(--trait);
}

.anim-item {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 16px;
    padding: 14px 0;
    border-bottom: 1px solid var(--trait);
}

.anim-main {
    display: flex;
    align-items: center;
    gap: 14px;
}

.anim-icon,
.programme-icone,
.food-icone {
    flex: none;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    font-size: 1.35rem;
    line-height: 1;
    background: color-mix(in srgb, var(--c, var(--cyan)) 18%, white);
}

.anim-name {
    font-size: 1.15rem;
    font-weight: 700;
}

.anim-tag {
    margin-left: auto;
    padding: 5px 14px;
    border-radius: 999px;
    background: var(--clair);
    color: var(--cyan-fonce);
    font-size: 0.9rem;
    font-weight: 600;
}

/* Programme en liste (journée en forêt) */
.programme {
    list-style: none;
    margin-bottom: 20px;
    border-top: 1px solid var(--trait);
}

.programme li {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--trait);
}

.programme-sous {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

/* Encadrés */
.callout {
    margin-bottom: 24px;
    padding: 26px;
    border-radius: var(--rayon);
    background: var(--clair);
}

.callout--pointille {
    background: #FFF3DC;
}

.callout--inscription {
    margin-bottom: 36px;
}

.callout-corps {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 12px 20px;
}

.callout-icone {
    font-size: 2rem;
    line-height: 1.2;
}

.callout-texte {
    flex: 1 1 260px;
}

.callout h3 {
    margin-bottom: 8px;
    font-size: 1.25rem;
    font-weight: 700;
}

.callout p {
    margin-bottom: 12px;
}

.callout p:last-child {
    margin-bottom: 0;
}

.callout-lien,
.lien-fort,
.artiste-liens a {
    color: var(--cyan-fonce);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.callout-lien {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
}

.liste-icones {
    list-style: none;
    margin-bottom: 20px;
}

.liste-icones li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 8px;
}

/* Souvenirs et accès */
.souvenirs {
    margin: 44px 0;
}

.titre-icone,
.bloc-acces h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 1.4rem;
    color: var(--encre) !important;
}

.souvenirs p {
    margin-bottom: 18px;
    color: var(--gris);
}

.souvenirs-grille {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
    gap: 16px;
}

.bloc-acces {
    padding: 26px;
    border-radius: var(--rayon);
    background: var(--clair);
}

.bloc-acces p {
    margin-bottom: 14px;
}

.carte {
    display: block;
    border: 0;
    border-radius: 12px;
    margin-bottom: 22px;
}

.carte:last-child {
    margin-bottom: 0;
}

/* Carte affichée seulement après un clic */
.carte-clic {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 220px;
    margin-bottom: 22px;
    padding: 24px;
    border: 2px dashed var(--cyan);
    border-radius: 12px;
    background: var(--blanc);
    text-align: center;
}

.carte-clic:last-child {
    margin-bottom: 0;
}

.bloc-acces .carte-note {
    margin: 4px 0 0;
    font-size: 0.9rem;
    color: var(--gris);
}

.carte-lien {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--cyan-fonce);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* Fête de la musique : artistes */
.artistes {
    margin-top: 36px;
}

.titre-centre,
.restauration-tete h3 {
    margin-bottom: 20px;
    font-size: 1.6rem;
}

.artiste {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 20px;
    padding: 26px;
    border: 1px solid var(--trait);
    border-radius: var(--rayon);
    background: var(--blanc);
    box-shadow: var(--ombre);
}

.artiste--vedette {
    border: 2px solid var(--rose);
    background: #FFF4F6;
}

.artiste-tete {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 16px;
}

.artiste-tete h4 {
    font-size: 1.6rem;
}

.artiste--vedette .artiste-tete h4 {
    font-size: 1.9rem;
}

.artiste-heure {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    border-radius: 999px;
    background: var(--encre);
    color: var(--blanc);
    font-weight: 700;
    font-size: 0.95rem;
}

.artiste-corps {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 22px;
}

.artiste-photo {
    position: relative;
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 220px;
    height: 220px;
    border-radius: 14px;
    overflow: hidden;
    background: var(--clair);
}

.artiste-photo svg {
    position: absolute;
    width: 80px;
    height: 80px;
    color: rgba(43, 45, 66, 0.15);
}

.artiste-photo img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.artiste-texte {
    flex: 1 1 260px;
}

.artiste-liens {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 24px;
}

.artiste-liens a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-size: 0.95rem;
    font-weight: 600;
}

/* Fête de la musique : restauration */
.restauration {
    margin: 44px 0;
    padding: 32px;
    border-radius: var(--rayon);
    background: var(--clair);
}

.restauration-tete {
    margin-bottom: 24px;
}

.restauration-tete h3 {
    margin-bottom: 8px;
}

.restauration-tete p {
    color: var(--gris);
}

.food-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
    gap: 16px;
}

.food-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 18px;
    border-radius: 14px;
    background: var(--blanc);
    box-shadow: var(--ombre);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

a.food-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--ombre-forte);
}

.food-main {
    display: flex;
    align-items: center;
    gap: 14px;
}

.food-icone {
    --c: var(--g2);
}

.food-card h4 {
    font-size: 1.1rem;
    font-weight: 700;
}

.food-genre {
    display: block;
    margin-top: 2px;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--gris);
}

.food-card-arrow {
    flex: none;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--clair);
    color: var(--cyan-fonce);
    font-weight: 700;
    transition: background-color 0.2s ease, color 0.2s ease;
}

a.food-card:hover .food-card-arrow {
    background: var(--cyan-fonce);
    color: var(--blanc);
}

.buvette-card {
    --g2: var(--rose);
    grid-column: 1 / -1;
    flex-direction: column;
    align-items: flex-start;
    padding: 22px;
    background: #FFF4F6;
    box-shadow: none;
}

/* ============================================================
   Tablette et téléphone
   ============================================================ */
@media (max-width: 1024px) {
    .hamburger { display: flex; }

    .navbar { padding: 0 20px; }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0;
        padding: 8px 20px 20px;
        background: var(--blanc);
        box-shadow: 0 12px 20px rgba(43, 45, 66, 0.12);
        max-height: calc(100vh - var(--hauteur-menu));
        overflow-y: auto;
    }

    .nav-links.active { display: flex; }

    .nav-links a {
        display: flex;
        min-height: 48px;
        border-bottom: 1px solid var(--trait);
        box-shadow: none;
    }

    .nav-links li:last-child a { border-bottom: 0; }

    .event-details {
        display: flex;
        flex-direction: column;
        gap: 32px;
    }

    /* Sur petit écran : infos pratiques d'abord, puis le programme, puis l'affiche */
    .details-sidebar { display: contents; }
    .event-poster-container { max-width: 420px; margin: 0 auto; }
    .practical-info:not(:has(.info-list)) { order: 0; }
}

@media (max-width: 860px) {
    .featured-event { grid-template-columns: minmax(0, 1fr); }
    .featured-image-placeholder { min-height: 0; aspect-ratio: 4 / 3; }
    .featured-content { padding: 28px 24px 32px; }

    .asso { display: block; }
    .asso-photo { margin: 8px 0 36px; transform: rotate(-1.5deg); }
}

@media (max-width: 640px) {
    :root { --hauteur-menu: 64px; }

    body { font-size: 1rem; }
    .container { padding: 0 20px; }
    .section, #l-association { padding: 40px 0 56px; }
    .section-title { margin-bottom: 28px; }
    .logo a { font-size: 1.2rem; gap: 10px; }

    .hero { min-height: 400px; }
    .hero-home { min-height: 520px; }
    .hero::before { height: 26px; background-size: 300px 26px; }
    .hero-content, .hero-home .hero-content { padding: 72px 20px 40px; }
    .hero p { font-size: 1.05rem; }
    .hero-home .hero-overlay {
        background: linear-gradient(0deg, rgba(27, 29, 48, 0.92) 0%, rgba(27, 29, 48, 0.7) 60%, rgba(27, 29, 48, 0.3) 100%);
    }
    .hero-actions { flex-direction: column; align-self: stretch; }
    .hero-event-date { font-size: 0.98rem; }

    /* Téléphone : l'affiche entière en haut de la carte, la date posée dessus, le texte dessous */
    #prochains-evenements .event-card { position: relative; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; }
    #prochains-evenements .card-image { grid-row: auto; }
    #prochains-evenements .event-card > .date-pastille { grid-column: 1; grid-row: 1; position: absolute; top: 14px; left: 14px; z-index: 1; margin: 0; box-shadow: 0 4px 14px rgba(27, 29, 48, 0.35); }
    #prochains-evenements .card-content { grid-column: 1; grid-row: auto; padding: 14px 20px 24px; }
    #prochains-evenements .event-card--sans-image { padding-left: 0; }
    #prochains-evenements .event-card--sans-image > .date-pastille { position: static; margin: 20px 20px 0; box-shadow: none; }
    .compact-event-item { flex-wrap: wrap; padding: 14px 16px; gap: 6px 16px; }
    .compact-event-title { flex: 1 1 0; }
    .compact-event-action { flex-basis: 100%; }
    .date-pastille { width: 72px; height: 80px; }
    .date-pastille strong { font-size: 2rem; }
    .featured-content { gap: 14px 16px; }

    .footer-content { gap: 36px; }
    .footer-bottom { padding: 24px 20px 0; }
    .newsletter-form .btn-primary { flex: 1 1 100%; }

    .callout, .bloc-acces, .practical-info, .artiste { padding: 20px; }
    .restauration { padding: 24px 16px; }
    .anim-tag { margin-left: 60px; }
    .artiste-photo { width: 100%; height: auto; aspect-ratio: 1; }
    .btn-icone { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; animation: none !important; }
}
