:root {
    color-scheme: light;
    font-family: "Instrument Sans", system-ui, sans-serif;
    color: #262039;
    background: #f8f5ef;
    --purple: #51346c;
    --line: #e3d9e7;
    --paper: #fffcf8;
}
* { box-sizing: border-box; }
body { margin: 0; line-height: 1.5; }
.wrap { width: min(1080px, calc(100% - 36px)); margin-inline: auto; }
.top { background: #2a2037; color: white; }
.barre { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 76px; padding-block: 8px; }
.top a { color: white; }
.logo { font-family: Georgia, serif; font-weight: 700; font-size: clamp(1.35rem, 4vw, 2rem); text-decoration: none; }
.logo span { color: #ffc48e; }
.lien { font-size: .92rem; text-align: right; }
main { padding-block: 34px 52px; min-height: 70vh; }
h1, h2, legend { font-family: Georgia, serif; line-height: 1.15; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); letter-spacing: -.04em; margin: .5em 0 .4em; }
h2, legend { font-size: 1.45rem; margin: 0 0 .6em; }
a { color: #4c266e; text-underline-offset: .18em; overflow-wrap: anywhere; }
a:hover { text-decoration-thickness: .14em; }
.accueil { padding-block: 18px 24px; }
.accueil p { font-size: 1.12rem; }
.grille { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.carte { margin: 0 0 16px; min-width: 0; padding: clamp(16px, 4vw, 26px); border: 1px solid var(--line); border-radius: 16px; background: var(--paper); }
.candidature, .connexion { max-width: 720px; }
form label { display: block; font-weight: 600; margin: 0 0 15px; }
input:not([type=checkbox]), textarea, select { font: inherit; width: 100%; color: inherit; background: white; border: 1px solid #a99db4; border-radius: 8px; padding: 9px 12px; }
label input:not([type=checkbox]), label textarea, label select { display: block; margin-top: 5px; }
textarea { resize: vertical; }
button, .bouton { font: inherit; font-weight: 650; padding: 10px 15px; border: 1px solid transparent; border-radius: 9px; color: white; background: var(--purple); text-decoration: none; cursor: pointer; display: inline-block; }
button:disabled { opacity: .55; cursor: default; }
.secondaire { color: #4c266e; background: #f4ecf8; border-color: #ddcde7; }
:focus-visible { outline: 3px solid #a65021; outline-offset: 3px; }
.actions { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; margin-block: 8px 14px; }
.actions select { width: auto; }
.check { display: flex; align-items: flex-start; gap: 9px; font-weight: 500; padding: 5px 0; }
.check input { width: 1.15rem; height: 1.15rem; accent-color: var(--purple); flex: none; }
.liste-dates { margin-top: 12px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 14px; }
.liste-dates .check { margin: 0; }
.message { padding: 12px 15px; border-radius: 9px; background: #f0e7f7; }
.erreur, .signature-erreur { background: #fce8df; color: #7a311a; }
.signature { border: 1px solid var(--line); border-radius: 12px; margin: 0 0 16px; min-width: 0; }
.signature legend { font: inherit; font-weight: 650; }
.signature canvas { display: block; width: 100%; aspect-ratio: 680 / 220; touch-action: none; border: 1px dashed #a99db4; border-radius: 8px; background: white; margin-bottom: 9px; }
.signature-erreur { padding: 8px; }
.liste { list-style: none; padding: 0; margin-bottom: 0; }
.liste li { border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 10px 0; }
small, .aide { display: block; color: #594b61; font-size: .88rem; font-weight: 400; }
details, .separation { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
summary { cursor: pointer; margin-bottom: 10px; }
.reglement-apercu iframe { display: block; width: 100%; height: clamp(320px, 65vh, 680px); border: 1px solid var(--line); border-radius: 8px; background: white; }
.tableau { overflow-x: auto; margin-top: 15px; }
table { width: 100%; text-align: left; border-collapse: collapse; }
th, td { padding: 8px; border-bottom: 1px solid var(--line); }
dt { font-weight: 650; }
dd { margin: 0 0 12px; overflow-wrap: anywhere; }
.pied { color: #594b61; border-top: 1px solid var(--line); padding-block: 20px; }
@media (max-width: 680px) {
    .grille, .liste-dates { grid-template-columns: 1fr; gap: 0; }
    .candidature .grille { gap: 0; }
}

.lecteur-pdf { max-width: 920px; padding-block: 16px 24px; }
.lecteur-pdf h1 { font-size: 1.6rem; }
.page-pdf canvas { display: block; width: 100%; height: auto; background: white; }

.accueil-marches {
    display: grid;
    grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
    gap: clamp(24px, 5vw, 62px);
    align-items: center;
    margin-bottom: 32px;
    padding: clamp(20px, 4vw, 46px);
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 22px;
}
.accueil-marches img { display: block; width: 100%; max-width: 380px; height: auto; margin-inline: auto; }
.accueil-marches h1 { margin-top: 0; }
.accueil-marches h1 span { display: block; color: var(--purple); }
.accueil-marches p { max-width: 45ch; margin-bottom: 20px; }
#dossier-exposant { scroll-margin-top: 20px; }
@media (max-width: 680px) {
    .accueil-marches { grid-template-columns: minmax(0, 1fr); text-align: center; }
    .accueil-marches img { max-width: 260px; }
    .accueil-marches p { margin-inline: auto; }
}
