/*
 * Site public des Pantacruels.
 * Charte reprise de l'affiche du festival 2025 « Le Meilleur des Mondes » (couleurs relevées sur l'affiche) :
 *   fond en dégradé #333695 → #1a2a56 → #0f1a2d, « FESTIVAL » magenta #df0d86, textes jaunes #f8df19,
 *   contour cyan #00a2d3 du logo, crème #fef9dd du verso. Titres : Montserrat ExtraBold (licence OFL,
 *   fichier local), proche de la Gilroy de l'affiche. Texte courant : police du système, 19 px.
 * Contrastes (WCAG) : jaune sur violet 7,4 ; blanc sur violet 10 ; blanc sur magenta 4,6 ; encre sur crème 14,9 ;
 *   magenta foncé #b8086a sur crème 6,0 et sur blanc 6,4 ; gris #4a4f6e sur crème 7,5.
 */

@font-face {
    font-family: "Montserrat Pantacruels";
    src: url("fonts/montserrat-extrabold.ttf") format("truetype");
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

:root {
    --violet: #333695;
    --bleu: #222f6b;
    --nuit: #0f1a2d;
    --magenta: #df0d86;
    --magenta-fonce: #b8086a;
    --jaune: #f8df19;
    --cyan: #00a2d3;
    --creme: #fef9dd;
    --encre: #14223f;
    --gris: #4a4f6e;
    --ligne: #c9c6b4;
    --rouge: #a4131d;
    --vert: #1d6b2f;
    --titre: "Montserrat Pantacruels", "Arial Black", "Segoe UI", system-ui, sans-serif;
    --texte: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --largeur: 72rem;
    --marge: 1rem;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
    margin: 0;
    background: #fff;
    color: var(--encre);
    font-family: var(--texte);
    font-size: 1.1875rem; /* 19 px */
    line-height: 1.6;
    overflow-wrap: break-word;
}

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

h1, h2, h3 {
    font-family: var(--titre);
    font-weight: 800;
    line-height: 1.1;
    margin: 0 0 .6em;
    overflow-wrap: break-word;
    hyphens: auto;
}
h1 { font-size: clamp(2rem, 1.2rem + 3.6vw, 3.5rem); text-transform: uppercase; letter-spacing: -.01em; }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.25rem); text-transform: uppercase; letter-spacing: -.005em; }
h3 { font-size: 1.3rem; line-height: 1.25; }
p { margin: 0 0 1em; }

a { color: var(--magenta-fonce); text-decoration-thickness: .08em; text-underline-offset: .15em; }
a:hover { color: var(--encre); }

:focus-visible {
    outline: 3px solid var(--jaune);
    outline-offset: 2px;
    box-shadow: 0 0 0 2px var(--nuit);
}

.conteneur { width: 100%; max-width: var(--largeur); margin-inline: auto; padding-inline: var(--marge); }
@media (min-width: 40rem) { :root { --marge: 1.5rem; } }

.evitement {
    position: absolute; left: .5rem; top: -10rem; z-index: 100;
    background: var(--jaune); color: var(--nuit); padding: .75rem 1rem; font-weight: 700;
}
.evitement:focus { top: .5rem; }

main:focus { outline: none; }

.discret { color: var(--gris); font-size: 1.125rem; }

/* ---------- Boutons ---------- */
.btn, .bouton {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 3rem; padding: .7rem 1.4rem;
    font-family: var(--titre); font-weight: 800; font-size: 1.125rem; line-height: 1.2;
    text-decoration: none; text-align: center;
    border: 3px solid transparent; border-radius: 4px;
    cursor: pointer;
}
.btn-magenta, .bouton-principal { background: var(--magenta); color: #fff; }
.btn-magenta:hover, .bouton-principal:hover { background: var(--magenta-fonce); color: #fff; }
.btn-jaune { background: var(--jaune); color: var(--nuit); }
.btn-jaune:hover { background: #fff; color: var(--nuit); }
.btn-nuit { background: var(--nuit); color: #fff; }
.btn-nuit:hover { background: var(--violet); color: #fff; }
.btn-contour { border-color: #fff; color: #fff; background: transparent; }
.btn-contour:hover { background: #fff; color: var(--nuit); }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.5rem 0 0; }

.lien-fort {
    display: inline-flex; align-items: center; min-height: 2.75rem;
    font-family: var(--titre); font-weight: 800; font-size: 1.125rem; color: var(--magenta-fonce);
}

/* ---------- En-tête ---------- */
.tete { background: var(--violet); color: #fff; position: relative; z-index: 10; }
.tete-interieur {
    max-width: 82rem; margin-inline: auto; padding: .5rem var(--marge);
    display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.marque {
    display: inline-flex; align-items: center; gap: .75rem; min-height: 3rem;
    color: #fff; text-decoration: none;
}
.marque img { width: auto; height: 3.75rem; }
.marque-nom { font-family: var(--titre); font-weight: 800; font-size: 1.35rem; letter-spacing: .01em; text-transform: uppercase; }
.marque:hover { color: var(--jaune); }
@media (max-width: 30rem) {
    .tete-interieur { gap: .5rem; }
    .marque { gap: .5rem; flex: 1 1 0; min-width: 0; }
    .marque-nom { line-height: 1.1; }
    .marque img { height: 3rem; }
    .marque-nom { font-size: 1.125rem; }
    .menu-bouton { padding: .5rem .75rem; }
}
/* 320–400 px : « PANTACRUELS » (un seul mot, ne se coupe pas) passait sous le bouton Menu. */
@media (max-width: 25rem) {
    .marque { gap: .4rem; }
    .marque img { height: 2.75rem; }
    .marque-nom { font-size: .95rem; }
    .menu-bouton { gap: .45rem; padding: .5rem .6rem; }
}
/* Moins de 360 px : le logo seul ; le nom reste lu par les lecteurs d'écran (texte du lien). */
@media (max-width: 22.4375rem) {
    .marque img { height: 3rem; }
    .marque-nom {
        position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
        overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
    }
}

.menu-case { position: absolute; opacity: 0; width: 1px; height: 1px; }
.menu-bouton {
    display: inline-flex; align-items: center; gap: .6rem; min-height: 3rem; padding: .5rem 1rem;
    border: 2px solid #fff; border-radius: 4px; cursor: pointer;
    font-family: var(--titre); font-weight: 800; font-size: 1.125rem;
}
.menu-barres { display: inline-flex; flex-direction: column; gap: 4px; }
.menu-barres span { display: block; width: 22px; height: 3px; background: #fff; }
.menu-case:focus-visible + .menu-bouton { outline: 3px solid var(--jaune); outline-offset: 2px; }
.menu-case:checked + .menu-bouton { background: #fff; color: var(--violet); }
.menu-case:checked + .menu-bouton .menu-barres span { background: var(--violet); }

.menu { display: none; width: 100%; padding: .25rem 0 .75rem; }
.menu-case:checked ~ .menu { display: block; }
.menu a {
    display: flex; align-items: center; min-height: 3rem; padding: .5rem .25rem;
    color: #fff; text-decoration: none; font-family: var(--titre); font-weight: 800; font-size: 1.125rem;
    border-top: 1px solid rgba(255, 255, 255, .25);
}
.menu a:hover, .menu a.actif { color: var(--jaune); }
.menu a.actif { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: .35em; }
.menu a.menu-don { margin-top: .5rem; justify-content: center; background: var(--magenta); border: 0; border-radius: 4px; }
.menu a.menu-don:hover, .menu a.menu-don.actif { color: #fff; background: var(--magenta-fonce); }

@media (min-width: 75rem) {
    .menu-bouton { display: none; }
    .tete-interieur { flex-wrap: nowrap; }
    .menu { display: flex; width: auto; align-items: center; gap: .1rem; padding: 0; }
    .menu a { border: 0; padding: .5rem .6rem; white-space: nowrap; }
    .menu a.menu-don { margin: 0 0 0 .5rem; padding: .5rem 1.1rem; }
}

/* ---------- Accueil ---------- */
.heros {
    background: linear-gradient(180deg, var(--violet) 0%, var(--bleu) 55%, var(--nuit) 100%);
    color: #fff; padding: 2.5rem 0 3rem;
}
.heros-grille { display: grid; gap: 2rem; align-items: center; }
.sur-titre { font-size: 1.125rem; font-weight: 600; margin-bottom: .5rem; }
.sur-titre a { color: inherit; }
.heros .sur-titre, .bandeau .sur-titre { color: #fff; }
.sur-titre-clair { color: var(--magenta-fonce); font-family: var(--titre); font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.heros-titre { color: var(--jaune); font-size: clamp(1.9rem, .6rem + 5.4vw, 4.2rem); margin-bottom: .4em; hyphens: manual; overflow-wrap: normal; word-break: keep-all; }
@media (min-width: 900px) { .heros-titre { font-size: clamp(2.6rem, 1rem + 3.2vw, 4.2rem); } }
.heros-grille > * { min-width: 0; }
.heros-accroche { font-size: 1.3rem; max-width: 34rem; }
.heros-festival { text-align: center; }
.heros-logo-lien { display: inline-block; }
.heros-logo { width: 100%; max-width: 34rem; margin-inline: auto; }
.heros-genres {
    margin: 1rem 0 0; color: var(--jaune);
    font-family: var(--titre); font-weight: 800; text-transform: uppercase; font-size: 1.125rem; letter-spacing: .02em;
}
@media (min-width: 56rem) {
    .heros { padding: 3.5rem 0 4rem; }
    .heros-grille { grid-template-columns: 1fr 1fr; gap: 3rem; }
}

.photo-bandeau { background: var(--nuit); }
.photo-bandeau img { width: 100%; height: clamp(12rem, 32vw, 26rem); object-fit: cover; object-position: center 40%; }

.annonce { background: var(--jaune); color: var(--nuit); padding: 1rem 0; font-size: 1.1875rem; }

.encart-loto { background: var(--creme); border-block: 6px solid var(--jaune); padding: 1.75rem 0; }
.encart-loto-contenu { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; }
.encart-loto h2 { margin-bottom: .3em; }
.encart-loto p { margin: 0; }

/* ---------- Sections ---------- */
.bloc { padding: 3rem 0; }
.bloc-creme { background: var(--creme); }
.bloc-violet { background: var(--violet); color: #fff; }
.bloc-violet h2 { color: var(--jaune); }
.bloc-violet a:not(.btn) { color: #fff; }
.bloc-tete { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .25rem 1.5rem; margin-bottom: 1rem; }
.bloc-tete h2 { margin: 0; }
.bloc-simple { margin: 2.5rem 0; }
.texte-etroit { max-width: 46rem; }
.texte-fort { font-size: 1.3rem; font-weight: 600; }
.texte-large { font-size: 1.25rem; max-width: 46rem; }

h2::after {
    content: ""; display: block; width: 3.5rem; height: 5px; margin-top: .35em; background: var(--magenta);
}
.bandeau h1::after, .bloc-violet h2::after, .encart-loto h2::after, .encadre h2::after, .formulaire-demande h2::after { display: none; }

.deux-colonnes { display: grid; gap: 2rem; align-items: start; }
@media (min-width: 56rem) {
    .deux-colonnes { grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
    .deux-colonnes-texte { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; }
}
.image-cote { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

/* Listes d'événements : des lignes, pas des cartes */
.liste-ev { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--encre); }
.liste-ev li { border-bottom: 1px solid var(--ligne); }
.liste-ev a {
    display: grid; grid-template-columns: 1fr; gap: .2rem 1.5rem; padding: 1rem 0;
    color: var(--encre); text-decoration: none; min-height: 3rem;
}
.liste-ev a:hover .liste-ev-titre { color: var(--magenta-fonce); text-decoration: underline; }
.liste-ev-date { font-family: var(--titre); font-weight: 800; color: var(--magenta-fonce); font-size: 1.125rem; }
.liste-ev-texte { display: flex; flex-direction: column; }
.liste-ev-titre { font-size: 1.3rem; line-height: 1.3; }
.liste-ev-image { display: none; }
.liste-ev-fort .liste-ev-titre::before { content: ""; display: inline-block; width: .6rem; height: .6rem; margin-right: .5rem; background: var(--magenta); vertical-align: middle; }
@media (min-width: 40rem) {
    .liste-ev a { grid-template-columns: 13rem 1fr auto; align-items: center; }
    .liste-ev-image { display: block; width: 8rem; height: 5.5rem; object-fit: cover; }
}

/* Matériel (accueil, fiche) */
.liste-materiel { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; gap: 0 2rem; border-top: 2px solid var(--encre); }
.liste-materiel li { border-bottom: 1px solid var(--ligne); }
.liste-materiel a { display: flex; align-items: center; gap: 1rem; padding: .85rem 0; color: var(--encre); text-decoration: none; min-height: 3rem; }
.liste-materiel a:hover strong { color: var(--magenta-fonce); text-decoration: underline; }
.liste-materiel img { width: 5.5rem; height: 4.5rem; object-fit: cover; flex: none; }
.liste-materiel a > span { display: flex; flex-direction: column; }
@media (min-width: 48rem) { .liste-materiel { grid-template-columns: 1fr 1fr; } }
img.sans-photo { object-fit: contain !important; background: var(--creme); padding: .4rem; }
.prix { font-weight: 700; color: var(--encre); }

/* Partenaires */
.partenaires h2 { margin-bottom: 1.5rem; }
.partenaires-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem 2.5rem; }
.partenaire { display: flex; align-items: center; min-height: 3rem; color: var(--encre); font-weight: 700; }
.partenaire img { max-height: 4.5rem; max-width: 10rem; width: auto; }

/* ---------- Pages intérieures ---------- */
.bandeau { background: var(--violet); color: #fff; padding: 2.25rem 0 2.5rem; }
.bandeau h1 { color: var(--jaune); margin-bottom: .35em; }
.bandeau-accroche { font-size: 1.3rem; max-width: 46rem; margin: 0; }
.bandeau .actions { margin-top: 1.25rem; }
.image-page { width: 100%; max-height: 26rem; object-fit: cover; margin-top: 1.5rem; }
.page-corps { padding-top: 2rem; padding-bottom: 3.5rem; }

.article-texte { max-width: 46rem; }
.article-texte h2 { margin-top: 1.6em; }
.article-texte h3 { margin-top: 1.4em; }
.article-texte ul, .article-texte ol { padding-left: 1.4em; }
.article-texte li { margin-bottom: .4em; }
.article-texte blockquote { margin: 1.5em 0; padding: .5em 0 .5em 1.25em; border-left: 5px solid var(--magenta); font-size: 1.25rem; }
.article-texte .bouton { margin: .25rem 0; }

.encart { background: var(--creme); border-left: 6px solid var(--jaune); padding: 1rem 1.25rem; max-width: 46rem; }
.encadre { background: var(--creme); padding: 1.5rem; border-top: 6px solid var(--magenta); }
.encadre h2 { font-size: 1.5rem; }

.filtres { margin-bottom: 1rem; }
.filtres-titre { font-weight: 700; margin: 1rem 0 .4rem; }
.filtres-groupe { display: flex; flex-wrap: wrap; gap: .5rem; }
.filtres-groupe a {
    display: inline-flex; align-items: center; min-height: 2.75rem; padding: .35rem .9rem;
    border: 2px solid var(--encre); border-radius: 4px; color: var(--encre); text-decoration: none; font-weight: 600;
}
.filtres-groupe a:hover { background: var(--creme); }
.filtres-groupe a.actif { background: var(--encre); color: #fff; }
.annee-titre .discret { font-family: var(--texte); text-transform: none; font-weight: 400; font-size: 1.125rem; }

.galerie { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr)); }
.galerie a { display: block; }
.galerie img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.galerie span { display: block; font-size: 1.125rem; color: var(--gris); margin-top: .3rem; }
.retour a, .fil a { display: inline-flex; align-items: center; min-height: 2.75rem; font-weight: 700; }
.retour a::before, .fil a::before { content: "\2190\00a0"; }

.don-cadre { width: 100%; min-height: 46rem; border: 0; background: #fff; }
.don-exemples { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.don-exemples caption { text-align: left; font-weight: 700; margin-bottom: .4rem; }
.don-exemples th, .don-exemples td { text-align: left; padding: .45rem .25rem; border-bottom: 1px solid var(--ligne); }

/* ---------- Location ---------- */
.catalogue { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--encre); }
.catalogue > li { display: grid; grid-template-columns: 5.5rem 1fr; gap: 1rem; padding: 1.1rem 0; border-bottom: 1px solid var(--ligne); }
.catalogue img { width: 5.5rem; height: 5.5rem; object-fit: cover; }
.catalogue h3 { margin: 0 0 .3rem; }
.catalogue h3 a { color: var(--encre); }
.catalogue h3 a:hover { color: var(--magenta-fonce); }
.catalogue p { margin: 0 0 .3rem; }
.catalogue-infos { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; }
@media (min-width: 40rem) {
    .catalogue > li { grid-template-columns: 9rem 1fr; gap: 1.5rem; }
    .catalogue img { width: 9rem; height: 7rem; }
}
.etat { font-weight: 700; }
.etat-ok { color: var(--vert); }
.etat-pris { color: var(--rouge); }

.etapes { padding-left: 1.4em; max-width: 46rem; }
.etapes li { margin-bottom: .5em; }

.fiche-materiel-haut { display: grid; gap: 2rem; margin-bottom: 2rem; }
.fiche-materiel-photo img { width: 100%; max-height: 28rem; object-fit: cover; }
.fiche-materiel-photo img.sans-photo { max-height: 16rem; }
.fiche-materiel h1 { font-size: clamp(1.9rem, 1.3rem + 2.4vw, 2.9rem); }
.prix-grand { font-family: var(--titre); font-weight: 800; font-size: 1.75rem; color: var(--magenta-fonce); }
.prix-grand span { font-family: var(--texte); font-weight: 400; font-size: 1.1875rem; color: var(--encre); }
@media (min-width: 56rem) { .fiche-materiel-haut { grid-template-columns: 1fr 1fr; align-items: start; } }

.formulaire-demande { margin-top: 3rem; padding: 2rem var(--marge); margin-inline: calc(-1 * var(--marge)); background: var(--creme); border-top: 6px solid var(--magenta); }
.formulaire-demande:focus { outline: none; }
@media (min-width: 48rem) { .formulaire-demande { padding: 2.5rem; margin-inline: 0; } }
.formulaire { max-width: 46rem; }
.formulaire fieldset { border: 0; margin: 0 0 2rem; padding: 0; min-width: 0; }
.formulaire legend { font-family: var(--titre); font-weight: 800; font-size: 1.35rem; margin-bottom: .75rem; padding: 0; }
.formulaire fieldset.choix { margin: 0 0 1.25rem; }
.formulaire fieldset.choix legend { font-family: var(--texte); font-size: 1.1875rem; font-weight: 700; margin-bottom: .4rem; }
.champ { margin-bottom: 1.25rem; }
.champ > label, .choix-materiel label { display: block; font-weight: 700; margin-bottom: .35rem; }
.facultatif { font-weight: 400; color: var(--gris); }
.aide { color: var(--gris); }
.formulaire input[type="text"], .formulaire input[type="email"], .formulaire input[type="tel"],
.formulaire input[type="date"], .formulaire input[type="number"], .formulaire textarea {
    display: block; width: 100%; min-height: 3rem; padding: .6rem .75rem;
    font: inherit; color: var(--encre); background: #fff;
    border: 2px solid var(--gris); border-radius: 4px;
}
.formulaire textarea { min-height: 8rem; resize: vertical; }
.formulaire input:focus-visible, .formulaire textarea:focus-visible { border-color: var(--encre); }
.formulaire [aria-invalid="true"] { border-color: var(--rouge); border-width: 3px; }
.champs-cote { display: grid; gap: 0 1.25rem; }
@media (min-width: 40rem) { .champs-cote { grid-template-columns: 1fr 1fr; } }

.choix-materiel { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ligne); }
.choix-materiel li { display: grid; grid-template-columns: 1fr 6.5rem; gap: .25rem 1rem; align-items: center; padding: .8rem 0; border-bottom: 1px solid var(--ligne); }
.choix-materiel label { margin: 0; }
.choix-materiel label span { display: block; font-weight: 400; color: var(--gris); font-size: 1.125rem; }
.choix-materiel .erreur-champ { grid-column: 1 / -1; }

.choix-ligne { display: flex; align-items: flex-start; gap: .75rem; min-height: 2.75rem; padding: .35rem 0; font-weight: 400; cursor: pointer; }
.choix-ligne input, .champ-case input { width: 1.6rem; height: 1.6rem; flex: none; margin: .1rem 0 0; accent-color: var(--magenta-fonce); }
.champ-case { display: grid; grid-template-columns: 1.6rem 1fr; gap: .4rem .9rem; align-items: start; }
.champ-case label { font-weight: 400; }
.champ-case .erreur-champ { grid-column: 1 / -1; }

.erreur-champ { color: var(--rouge); font-weight: 700; margin: .4rem 0 0; }
.message { padding: 1.1rem 1.25rem; margin-bottom: 1.5rem; background: #fff; border-left: 8px solid; }
.message p:last-child, .message ul:last-child { margin-bottom: 0; }
.message-ok { border-color: var(--vert); }
.message-erreur { border-color: var(--rouge); }
.message-erreur a { color: var(--rouge); }

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

/* ---------- Pied de page ---------- */
.pied { background: var(--nuit); color: #fff; padding: 2rem 0; }
.pied-interieur {
    max-width: var(--largeur); margin-inline: auto; padding-inline: var(--marge);
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.25rem 2rem;
}
.pied-coordonnees { display: flex; align-items: center; gap: 1.25rem; }
.pied-coordonnees p { margin: 0; min-width: 0; }
.pied-coordonnees a { overflow-wrap: anywhere; }
.pied-logo { width: 4.5rem; height: auto; flex: none; }
.pied-nom { font-family: var(--titre); font-weight: 800; }
.pied a { color: var(--jaune); }
.pied a:hover { color: #fff; }
.pied-liens { display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; }
.pied-liens a { display: inline-flex; align-items: center; min-height: 2.75rem; font-weight: 700; }
@media (max-width: 30rem) { .pied-coordonnees { align-items: flex-start; } .pied-logo { width: 3.5rem; } }

@media print {
    .tete, .pied, .actions, .formulaire-demande, .evitement { display: none; }
    body { font-size: 12pt; }
}
