/* ==========================================================================
   Feuille de style — Les Amis du Condroz
   Charte rurale : pierre calcaire (crème), prairies (verts),
   touche de rouge (coquelicot / porte de chapelle).
   ========================================================================== */

/* ---------- Variables ---------- */
:root {
    --creme:        #f7f2e4;
    --creme-fonce:  #efe8d3;
    --pierre:       #e7dfc6;
    --vert-fonce:   #3d4a2c;
    --vert:         #66763f;
    --vert-clair:   #e9ecd7;
    --rouge:        #a83b2c;
    --terre-cuite-claire: #ead0c4;
    --rouge-fonce:  #8a2d21;
    --blé:          #c9a353;
    --encre:        #2e2a21;
    --encre-clair:  #5c5747;
    --ombre:        0 6px 18px rgba(61, 74, 44, 0.14);
    --ombre-forte:  0 10px 30px rgba(46, 42, 33, 0.18);
    --police-titre: "Cormorant Garamond", Georgia, "Times New Roman", serif;
    --police-texte: "Nunito Sans", "Segoe UI", system-ui, sans-serif;
    --rayon:        10px;
}

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

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background:
        radial-gradient(circle at 12% 8%, rgba(201, 163, 83, 0.10), transparent 34rem),
        var(--creme);
    color: var(--encre);
    font-family: var(--police-texte);
    font-size: 1.02rem;
    line-height: 1.65;
}

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

a { color: var(--rouge); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--rouge-fonce); }

h1, h2, h3 {
    font-family: var(--police-titre);
    color: var(--vert-fonce);
    line-height: 1.15;
    margin: 0 0 0.4em;
}

h1 { font-size: clamp(2.1rem, 4.5vw, 3.2rem); font-weight: 600; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 600; }
h3 { font-size: 1.3rem; font-weight: 700; }

.conteneur {
    width: min(1120px, 92%);
    margin-inline: auto;
}

.centre { text-align: center; }

/* Lien d'évitement (accessibilité) */
.lien-evitement {
    position: absolute;
    left: -999px;
    top: 0;
    background: var(--rouge);
    color: #fff;
    padding: 0.6em 1em;
    z-index: 200;
}
.lien-evitement:focus { left: 0; color: #fff; }

/* ---------- En-tête ---------- */
.entete-site {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--vert-fonce);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--pierre);
    box-shadow: 0 1px 0 rgba(46, 42, 33, 0.04);
}
.entete-site::before { /* pointe de rouge */
    content: "";
    display: block;
    height: 4px;
    background: linear-gradient(90deg, var(--rouge) 0 18%, var(--blé) 18% 30%, var(--vert) 30% 100%);
}

.barre-entete {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-block: 0.55rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
}
.logo img { flex-shrink: 0; }
.logo-texte { display: flex; flex-direction: column; line-height: 1.15; }
.logo-texte strong {
    font-family: var(--police-titre);
    font-size: 1.25rem;
    color: var(--blé);
}
.logo-texte small {
    color: var(--encre-clair);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.menu-principal ul {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    list-style: none;
    margin: 0;
    padding: 0;
}
.menu-principal a:not(.bouton) {
    display: block;
    padding: 0.5rem 0.9rem;
    color: var(--creme);
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: background 0.2s ease, color 0.2s ease;
}
.menu-principal a:not(.bouton):hover { 
    background: var(--vert-clair); 
    color: var(--vert-fonce); 
}
.menu-principal a.actif {
    color: var(--blé);
    box-shadow: inset 0 -3px 0 var(--blé);
}
.menu-cta { margin-left: 0.4rem; }

/* Bouton hamburger */
.bouton-menu {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 0.55rem 0.65rem;
    background: var(--vert-fonce);
    border: none;
    border-radius: 8px;
    cursor: pointer;
}
.barre-menu {
    width: 22px;
    height: 2px;
    background: var(--creme);
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}
.bouton-menu[aria-expanded="true"] .barre-menu:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.bouton-menu[aria-expanded="true"] .barre-menu:nth-child(2) { opacity: 0; }
.bouton-menu[aria-expanded="true"] .barre-menu:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Boutons ---------- */
.bouton {
    display: inline-block;
    padding: 0.62em 1.35em;
    border-radius: 999px;
    font-family: var(--police-texte);
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    border: 2px solid transparent;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease, border-color 0.2s ease;
}
.bouton:hover { transform: translateY(-1px); }
.bouton-rouge { background: var(--rouge); color: var(--creme); }
.bouton-rouge:hover { background: var(--rouge-fonce); color: #fff; }
.bouton-contour { border-color: var(--vert-fonce); color: var(--vert-fonce); background: transparent; }
.bouton-contour:hover { background: var(--vert-fonce); color: var(--creme); }
.bouton-creme { background: var(--creme); color: var(--rouge-fonce); }
.bouton-creme:hover { background: #fff; }
.bouton-petit { padding: 0.45em 1em; font-size: 0.85rem; }
.bouton-large { width: 100%; }

/* ---------- Bannière d'accueil ---------- */
.hero {
    padding-block: clamp(2.2rem, 6vw, 4.5rem) clamp(1.5rem, 4vw, 3rem);
    background:
        linear-gradient(180deg, transparent, rgba(231, 223, 198, 0.55)),
        radial-gradient(60% 90% at 85% 15%, rgba(201, 163, 83, 0.16), transparent);
}
.hero-grille {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
    gap: clamp(1.5rem, 4vw, 3.5rem);
}
.sur-titre {
    margin: 0 0 0.4em;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--encre-clair);
}
.sur-titre-rouge { color: var(--rouge); }
.accroche { font-size: 1.08rem; color: var(--encre-clair); max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.4rem; }
.hero-paysage img {
    width: 100%;
    height: auto;
    border-radius: var(--rayon);
    box-shadow: var(--ombre-forte);
    border: 6px solid #fff;
}

/* ---------- Sections ---------- */
.section { padding-block: clamp(2.4rem, 6vw, 4.2rem); }
.section-serree { padding-block: clamp(1.2rem, 3vw, 2rem); }
.section-vert-clair { background: var(--vert-clair); }

.entete-section { max-width: 44em; margin-bottom: 2rem; }
.entete-section .entete-intro { color: var(--encre-clair); }
.entete-section h2::after {
    content: "";
    display: block;
    width: 64px;
    height: 4px;
    margin-top: 0.45em;
    background: linear-gradient(90deg, var(--rouge) 0 40%, var(--blé) 40% 100%);
    border-radius: 2px;
}

/* ---------- Cartes événements ---------- */
.grille-evenements {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.3rem;
}
.grille-evenements.colonne { grid-template-columns: 1fr; }

.invitation-prochaine {
    display: flex;
    justify-content: center;
    padding: 0.5rem 0 1rem;
}
.invitation-prochaine-lien {
    display: block;
    width: min(100%, 720px);
    color: var(--vert-fonce);
    text-align: center;
    text-decoration: none;
    font-weight: 700;
}
.invitation-prochaine-lien img {
    display: block;
    width: 100%;
    max-height: 42rem;
    object-fit: contain;
    border: 1px solid var(--pierre);
    border-radius: var(--rayon);
    background: #fff;
    box-shadow: var(--ombre-forte);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.invitation-prochaine-lien:hover { color: var(--rouge-fonce); }
.invitation-prochaine-lien:hover img { transform: scale(1.01); box-shadow: 0 14px 34px rgba(46, 42, 33, 0.22); }
.invitation-prochaine-lien:focus-visible { outline: 3px solid var(--blé); outline-offset: 4px; }
.invitation-prochaine-lien span { display: block; margin-top: 0.55rem; }

.carte-evenement {
    display: flex;
    gap: 1rem;
    background: #fff;
    border: 1px solid var(--pierre);
    border-radius: var(--rayon);
    box-shadow: var(--ombre);
    padding: 1.15rem 1.25rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.carte-evenement:hover { transform: translateY(-3px); box-shadow: var(--ombre-forte); }

.carte-date {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 4.4rem;
    min-height: 4.4rem;
    border-radius: var(--rayon);
    background: var(--vert-fonce);
    color: var(--creme);
    line-height: 1.05;
}
.carte-jour { font-family: var(--police-titre); font-size: 1.55rem; font-weight: 700; }
.carte-mois { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--blé); }

.carte-corps { flex: 1 1 auto; min-width: 0; }
.carte-corps h3 { margin-bottom: 0.15em; }
.carte-meta {
    margin: 0 0 0.45em;
    color: var(--rouge);
    font-weight: 700;
    font-size: 0.92rem;
}
.carte-lieu { margin-top: 0.45em; font-size: 0.95rem; color: var(--encre-clair); }

.invitation-bloc {
    flex: 0 0 9rem;
    margin-left: auto;
}
.invitation-lien {
    display: block;
    align-self: flex-start;
    color: var(--vert-fonce);
    text-align: center;
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 700;
}
.invitation-lien img {
    width: 9rem;
    height: 7rem;
    object-fit: cover;
    border: 1px solid var(--pierre);
    border-radius: 6px;
    box-shadow: 0 3px 10px rgba(46, 42, 33, 0.12);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.invitation-lien:hover { color: var(--rouge-fonce); }
.invitation-lien:hover img { transform: scale(1.03); box-shadow: var(--ombre); }
.invitation-lien:focus-visible { outline: 3px solid var(--blé); outline-offset: 3px; }
.invitation-lien span { display: block; margin-top: 0.35rem; }

.message-vide {
    background: #fff;
    border: 1px dashed var(--vert);
    border-radius: var(--rayon);
    padding: 1.2rem;
    text-align: center;
    color: var(--encre-clair);
}

/* ---------- Galerie ---------- */
.grille-galerie {
    position: relative;
    max-width: 780px;
    margin-inline: auto;
    padding-bottom: 3.2rem;
}
.carrousel-piste {
    position: relative;
    min-height: 360px;
}
.carrousel-diapositive {
    display: none;
    margin: 0;
}
.carrousel-diapositive.active {
    display: block;
}
.tuile-galerie {
    background: #fff;
    border-radius: var(--rayon);
    overflow: hidden;
    border: 1px solid var(--pierre);
    box-shadow: var(--ombre);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.tuile-galerie:hover { transform: translateY(-3px); box-shadow: var(--ombre-forte); }
.tuile-galerie img { aspect-ratio: 8 / 5; object-fit: cover; width: 100%; }
.tuile-galerie figcaption {
    display: flex;
    flex-direction: column;
    padding: 0.7rem 1rem 0.9rem;
}
.tuile-galerie strong { font-family: var(--police-titre); font-size: 1.12rem; color: var(--vert-fonce); }
.tuile-galerie span { font-size: 0.85rem; color: var(--encre-clair); }
.carrousel-controle {
    position: absolute;
    top: calc(50% - 1.5rem);
    z-index: 2;
    width: 3rem;
    height: 3rem;
    border: 2px solid var(--vert-fonce);
    border-radius: 50%;
    background: var(--creme);
    color: var(--vert-fonce);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: var(--ombre);
}
.carrousel-controle:hover { background: var(--vert-fonce); color: var(--creme); }
.carrousel-precedent { left: -1.5rem; }
.carrousel-suivant { right: -1.5rem; }
.carrousel-indicateurs {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 0.55rem;
}
.carrousel-indicateur {
    width: 0.8rem;
    height: 0.8rem;
    padding: 0;
    border: 1px solid var(--vert-fonce);
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
}
.carrousel-indicateur.active { background: var(--rouge); border-color: var(--rouge); }
.carrousel-controle:focus-visible, .carrousel-indicateur:focus-visible { outline: 3px solid var(--blé); outline-offset: 3px; }

/* ---------- Bandeau rouge ---------- */
.bandeau-rouge {
    background:
        radial-gradient(90% 160% at 8% 0%, rgba(255, 255, 255, 0.12), transparent 55%),
        var(--rouge);
    color: #fff;
    padding-block: clamp(2rem, 5vw, 3.2rem);
}
.bandeau-rouge h2 { color: #fff; }
.bandeau-grille {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
}
.bandeau-grille > div { max-width: 34em; }
.bandeau-action { margin: 0; }

/* ---------- Bandeau du prochain événement ---------- */
.bandeau-prochain-evenement {
    background:
        radial-gradient(90% 160% at 8% 0%,  rgba(255, 255, 255, 0.12), transparent 55%),
        var(--terre-cuite-claire);
    color: var(--encre);
    padding-block: clamp(2rem, 5vw, 3.2rem);
}
.bandeau-prochain-evenement h2 { color: var(--vert-fonce); }
.bandeau-prochain-evenement p { color: var(--rouge); }

/* ---------- En-tête de page intérieure ---------- */
.entete-page {
    padding-block: clamp(2rem, 5vw, 3.4rem) clamp(0.8rem, 2vw, 1.6rem);
    background: linear-gradient(180deg, rgba(231, 223, 198, 0.5), transparent);
    border-bottom: 1px solid var(--pierre);
}
.entete-page h1::after {
    content: "";
    display: block;
    width: 64px;
    height: 4px;
    margin-top: 0.4em;
    background: linear-gradient(90deg, var(--rouge) 0 40%, var(--blé) 40% 100%);
    border-radius: 2px;
}
.entete-page p { max-width: 40em; color: var(--encre-clair); }

/* ---------- Agenda ---------- */
.titre-mois {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.5rem;
}
.titre-mois::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--vert), transparent);
}

.archives {
    background: #fff;
    border: 1px solid var(--pierre);
    border-radius: var(--rayon);
    box-shadow: var(--ombre);
    padding: 1rem 1.4rem;
}
.archives summary {
    cursor: pointer;
    font-weight: 700;
    color: var(--vert-fonce);
}
.liste-archives { list-style: none; margin: 1rem 0 0; padding: 0; }
.liste-archives li { padding-block: 0.45rem; border-top: 1px dashed var(--pierre); }
.archive-date { color: var(--rouge); font-weight: 700; margin-right: 0.6em; }
.archive-lieu { color: var(--encre-clair); }

/* ---------- Contact ---------- */
.grille-contact {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: start;
}

.bloc-contact, .bloc-newsletter {
    background: #fff;
    border: 1px solid var(--pierre);
    border-radius: var(--rayon);
    box-shadow: var(--ombre);
    padding: clamp(1.4rem, 3vw, 2.2rem);
}

.liste-contact { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1rem; }
.liste-contact li { display: flex; gap: 0.9rem; align-items: flex-start; }
.contact-icone {
    flex-shrink: 0;
    display: grid;
    place-items: center;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 50%;
    background: var(--vert-clair);
    border: 1px solid var(--vert);
    font-size: 1.05rem;
}
.liste-contact strong { color: var(--vert-fonce); }

.bloc-newsletter { border-top: 5px solid var(--rouge); }
.newsletter-intro { color: var(--encre-clair); }

.champ { margin-bottom: 1.1rem; }
.champ label { display: block; font-weight: 700; margin-bottom: 0.3rem; }
.champ input[type="email"], .champ input[type="text"] {
    width: 100%;
    padding: 0.65em 0.9em;
    border: 1.5px solid var(--pierre);
    border-radius: 8px;
    background: var(--creme);
    font: inherit;
    color: var(--encre);
}
.champ input:focus {
    outline: 2px solid var(--vert);
    outline-offset: 1px;
    border-color: var(--vert);
    background: #fff;
}
.obligatoire { color: var(--rouge); }

.champ-case { display: flex; gap: 0.6rem; align-items: flex-start; }
.champ-case input { width: 1.15rem; height: 1.15rem; margin-top: 0.25rem; accent-color: var(--rouge); flex-shrink: 0; }
.champ-case label { font-weight: 400; font-size: 0.92rem; color: var(--encre-clair); }

.champ-piege {
    position: absolute !important;
    left: -9999px !important;
    width: 1px; height: 1px;
    overflow: hidden;
    margin: 0;
}

.mention-legale { font-size: 0.85rem; color: var(--encre-clair); }

/* Messages de formulaire */
.message {
    border-radius: 8px;
    padding: 0.85em 1.1em;
    font-weight: 600;
    margin: 0 0 1rem;
}
.message-succes {
    background: var(--vert-clair);
    border: 1.5px solid var(--vert);
    color: var(--vert-fonce);
}
.message-erreur {
    background: #f9e3de;
    border: 1.5px solid var(--rouge);
    color: var(--rouge-fonce);
}

/* ---------- Pied de page ---------- */
.pied-site {
    background: var(--vert-fonce);
    color: var(--creme);
    padding-block: 2.6rem 0;
    margin-top: clamp(2rem, 5vw, 4rem);
}
.pied-grille {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 1fr;
    gap: 2rem;
    padding-bottom: 2rem;
}
.pied-site h3 {
    font-family: var(--police-titre);
    color: var(--blé);
    font-size: 1.25rem;
    margin-bottom: 0.5em;
}
.pied-slogan { font-style: italic; color: #cfd6b8; }
.pied-site a:not(.bouton) { color: var(--blé); }
.pied-site a:hover { color: #fff; }
.pied-bloc ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.pied-bloc p { color: #cfd6b8; font-size: 0.95rem; }
.pied-bloc .bouton { margin-top: 0.6rem; }
.pied-mentions {
    border-top: 1px solid rgba(247, 242, 228, 0.25);
    padding-block: 1rem;
    font-size: 0.85rem;
    color: #aab492;
}
.pied-mentions p { margin: 0; }

/* ---------- Apparition douce ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.55s ease, transform 0.55s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
    .hero-grille { grid-template-columns: 1fr; }
    .hero-paysage { order: -1; }
    .grille-contact { grid-template-columns: 1fr; }
    .pied-grille { grid-template-columns: 1fr; gap: 1.4rem; }
}

@media (max-width: 760px) {
    .bouton-menu { display: flex; }
    .menu-principal {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--creme);
        border-bottom: 1px solid var(--pierre);
        box-shadow: var(--ombre-forte);
        display: none;
        padding: 0.8rem 4%;
    }
    .menu-principal.ouvert { display: block; }
    .menu-principal ul { flex-direction: column; align-items: stretch; gap: 0.2rem; }
    .menu-principal a:not(.bouton) { padding: 0.8rem 1rem; }
    .menu-principal a.actif { box-shadow: inset 3px 0 0 var(--rouge); }
    .menu-cta { margin: 0.6rem 0 0.3rem; }
    .carte-evenement { flex-direction: column; }
    .carte-date { flex-direction: row; gap: 0.4rem; width: auto; padding: 0.4rem 0.9rem; }
    .invitation-bloc { flex-basis: auto; width: 100%; margin-left: 0; }
    .invitation-lien { width: 100%; }
    .invitation-lien img { width: 100%; height: auto; max-height: 18rem; }
    .bandeau-grille .bouton { margin-top: 0.8rem; }
    .carrousel-piste { min-height: 300px; }
    .carrousel-precedent { left: 0.6rem; }
    .carrousel-suivant { right: 0.6rem; }
}
