* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
    font-size: 15px;
    color: #1d2733;
    background: #f2f4f7;
}
h1 { font-size: 1.5rem; margin: 1.2rem 0 1rem; }
h2 { font-size: 1.15rem; margin: 1.5rem 0 .6rem; }
a { color: #1a5f3f; }

.topnav { background: #163c2c; color: #fff; }
.nav-inner {
    max-width: 1200px; margin: 0 auto; padding: 0 16px;
    display: flex; align-items: center; justify-content: space-between; height: 52px;
}
.brand { color: #fff; text-decoration: none; font-weight: 600; font-size: 1.05rem; display: inline-flex; align-items: center; gap: 9px; }
.brand-logo { height: 32px; width: 32px; display: block; }
.nav-links a { color: #cfe3d8; text-decoration: none; margin-left: 18px; font-size: .92rem; }
.nav-links a:hover { color: #fff; }
.nav-version { color: #6f9484; font-size: .74rem; margin-left: 14px; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 16px 48px; }

.card {
    background: #fff; border: 1px solid #dde3ea; border-radius: 8px;
    padding: 16px 20px; margin-bottom: 16px;
}

table.liste { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid #dde3ea; border-radius: 8px; }
table.liste th, table.liste td { padding: 8px 10px; text-align: left; border-bottom: 1px solid #e8edf2; vertical-align: top; }
table.liste th { background: #eef2f6; font-size: .82rem; text-transform: uppercase; letter-spacing: .03em; color: #4a5a6a; }
table.liste tr:hover td { background: #f7faf8; }
table.liste td.num { text-align: right; font-variant-numeric: tabular-nums; }

.badge {
    display: inline-block; padding: 2px 9px; border-radius: 999px;
    font-size: .78rem; font-weight: 600; white-space: nowrap;
}
.badge-preparation { background: #fff3cd; color: #7a5d00; }
.badge-annonce    { background: #dbe7f5; color: #1d4e89; }
.badge-publie     { background: #d7efe1; color: #14532d; }
.badge-archive    { background: #e2e6ea; color: #4a5a6a; }
.badge-active     { background: #d7efe1; color: #14532d; }
.badge-annulee    { background: #fde0e0; color: #8a1f1f; }
.badge-disparue   { background: #e2e6ea; color: #4a5a6a; }
.badge-dur        { background: #dbe7f5; color: #1d4e89; }
.badge-demontable { background: #f3e5d8; color: #8a5a1f; }
.badge-paye       { background: #d7efe1; color: #14532d; }
.badge-impaye     { background: #fde0e0; color: #8a1f1f; }

.flash { padding: 10px 16px; border-radius: 8px; margin: 12px 0; }
.flash-ok    { background: #d7efe1; color: #14532d; }
.flash-err   { background: #fde0e0; color: #8a1f1f; }
.flash-warn  { background: #fff3cd; color: #7a5d00; }

form.std label { display: block; font-size: .85rem; font-weight: 600; color: #4a5a6a; margin: 12px 0 4px; }
form.std input[type=text], form.std input[type=email], form.std input[type=password],
form.std input[type=date], form.std input[type=number], form.std select, form.std textarea {
    width: 100%; max-width: 480px; padding: 7px 10px;
    border: 1px solid #c4cdd6; border-radius: 6px; font: inherit; background: #fff;
}
form.std textarea { max-width: 640px; min-height: 80px; }
form.std input:read-only { background: #f2f4f7; color: #6a7684; }
form.std .grille { display: flex; flex-wrap: wrap; gap: 0 24px; }
form.std .grille > div { min-width: 210px; }

.btn {
    display: inline-block; padding: 8px 16px; border-radius: 6px; border: 1px solid transparent;
    font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
    background: #1a5f3f; color: #fff;
}
.btn:hover { background: #14884f; }
.btn-sec { background: #fff; color: #1d2733; border-color: #c4cdd6; }
.btn-sec:hover { background: #eef2f6; }
.btn-danger { background: #a52626; }
.btn-danger:hover { background: #c53030; }
.actions { margin: 18px 0; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.filtres { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; margin-bottom: 14px; }
.filtres label { font-size: .8rem; font-weight: 600; color: #4a5a6a; display: block; margin-bottom: 3px; }
.filtres input, .filtres select { padding: 6px 9px; border: 1px solid #c4cdd6; border-radius: 6px; font: inherit; background: #fff; }

.stats { display: flex; gap: 12px; flex-wrap: wrap; margin: 14px 0; }
.stat { background: #fff; border: 1px solid #dde3ea; border-radius: 8px; padding: 12px 18px; min-width: 130px; }
.stat .val { font-size: 1.5rem; font-weight: 700; color: #163c2c; }
.stat .lib { font-size: .8rem; color: #4a5a6a; }

.commentaire { max-width: 420px; font-size: .86rem; color: #3c4a58; }
.muted { color: #6a7684; font-size: .86rem; }

.login-box { max-width: 380px; margin: 4vh auto; }

/* ---- écrans plan (éditeur + affectation) ---- */
.btn-mini { padding: 4px 10px; font-size: .82rem; }
.plan-toolbar { display: flex; flex-wrap: wrap; gap: 10px 28px; align-items: center; }
.pt-groupe { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pt-groupe > label { font-size: .8rem; font-weight: 700; color: #4a5a6a; text-transform: uppercase; margin-right: 4px; }
.pt-groupe input[type=number] { width: 64px; padding: 5px 6px; border: 1px solid #c4cdd6; border-radius: 6px; }
.pt-groupe input[type=text] { padding: 5px 6px; border: 1px solid #c4cdd6; border-radius: 6px; }
.pt-groupe select { padding: 5px 6px; border: 1px solid #c4cdd6; border-radius: 6px; background: #fff; }

.zone-tabs { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.zone-tab {
    padding: 5px 12px; border: 1px solid #c4cdd6; border-radius: 999px; background: #fff;
    font: inherit; font-size: .85rem; cursor: pointer;
}
.zone-tab.actif { background: #163c2c; color: #fff; border-color: #163c2c; }

.plan-legende { display: flex; gap: 16px; flex-wrap: wrap; margin: 8px 0; font-size: .82rem; color: #4a5a6a; }
.plan-legende .lg { display: inline-block; width: 14px; height: 14px; border: 1px solid #9aa7b3; border-radius: 3px; vertical-align: -2px; margin-right: 4px; }
.lg-vide { background: #fff; }
.lg-paille { background: #f6e7a8; }
.lg-copeaux { background: #e8d5bc; }
.lg-dem { background: #fff; border-style: dashed !important; }
.lg-occupe { background: #b9d9c6; }
.lg-partiel { background: repeating-linear-gradient(45deg, #b9d9c6, #b9d9c6 4px, #fff 4px, #fff 8px); }
.lg-cible { background: #fff; outline: 2px solid #1a5f3f; }

.grille-wrap {
    overflow: auto; border: 1px solid #dde3ea; border-radius: 8px; background: #fbfcfd;
    max-height: 72vh; user-select: none;
}
/* scopé sous .grille-wrap : les formulaires ont AUSSI une classe .grille (groupes de champs)
   qui ne doit hériter ni du min-height ni du quadrillage du plan */
.grille-wrap .grille {
    --cw: 70px; --ch: 44px; /* taille des cases, pilotée par le zoom sur l'affectation */
    position: relative; min-width: 100%; min-height: 300px;
    background-image: linear-gradient(to right, #eef1f4 1px, transparent 1px),
                      linear-gradient(to bottom, #eef1f4 1px, transparent 1px);
}
.box {
    position: absolute; width: var(--cw); height: var(--ch); box-sizing: border-box;
    border: 2px solid #6a7684; border-radius: 4px; background: #fff;
    font-size: 11px; line-height: 1.05; padding: 1px 3px; cursor: pointer; overflow: hidden;
}
.box.dem { border-style: dashed; }
.box.lit-paille { background: #f6e7a8; }
.box.lit-copeaux { background: #e8d5bc; }
.box .bnum { font-weight: 700; font-size: 12px; display: block; }
.box .bocc { display: block; font-size: 9px; color: #14532d; font-weight: 600; white-space: nowrap; }
.box.sel { outline: 3px solid #1d4e89; outline-offset: 1px; z-index: 2; }
.box.occupe { box-shadow: inset 0 0 0 100px rgba(26, 95, 63, .28); }
.box.partiel { background-image: repeating-linear-gradient(45deg, rgba(26,95,63,.22), rgba(26,95,63,.22) 5px, transparent 5px, transparent 10px); }
.box.cible { outline: 3px solid #1a5f3f; outline-offset: 1px; z-index: 2; }
.box:hover { border-color: #1a5f3f; }
.bandeau-selection {
    position: absolute; border: 1.5px dashed #1d4e89; background: rgba(29, 78, 137, .08); z-index: 5; pointer-events: none;
}

.periodes { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.periode {
    padding: 6px 14px; border: 1px solid #c4cdd6; border-radius: 999px; background: #fff;
    font: inherit; font-size: .86rem; cursor: pointer;
}
.periode.actif { background: #1a5f3f; color: #fff; border-color: #1a5f3f; }

.affect-layout { display: flex; gap: 14px; align-items: flex-start; }
.affect-sidebar { width: 320px; flex-shrink: 0; padding: 10px; max-height: 78vh; display: flex; flex-direction: column; }
.affect-sidebar input[type=text] { width: 100%; padding: 7px 10px; border: 1px solid #c4cdd6; border-radius: 6px; box-sizing: border-box; }
.affect-filtres { display: flex; gap: 12px; font-size: .82rem; margin: 8px 0; color: #4a5a6a; }
.affect-main { flex: 1; min-width: 0; }
.liste-resas { overflow-y: auto; flex: 1; }
.resa { padding: 7px 8px; border-bottom: 1px solid #e8edf2; cursor: pointer; border-left: 4px solid transparent; }
.resa:hover { background: #f2f6f3; }
.resa.actif { background: #e2efe7; border-left-color: #1a5f3f; }
.resa.resa-ok { opacity: .55; }
.resa.resa-liberer { border-left-color: #a52626; background: #fdf1f1; }
.resa-titre { display: flex; justify-content: space-between; gap: 6px; font-size: .9rem; }
.resa-compte { color: #1a5f3f; font-weight: 700; white-space: nowrap; }
.resa-infos { font-size: .78rem; color: #4a5a6a; }
.resa-comm { font-size: .76rem; color: #7a6a3a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.toast {
    position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
    background: #163c2c; color: #fff; padding: 10px 22px; border-radius: 8px;
    font-size: .9rem; z-index: 50; max-width: 70vw; box-shadow: 0 4px 14px rgba(0,0,0,.25);
}
.toast-alerte { background: #a52626; }

/* ---- regroupements ---- */
.groupe-propose { border-left: 4px solid #d9a900; }
.groupe-entete { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.groupe-nom { display: inline-flex; gap: 6px; }
.groupe-nom input[type=text] { font-weight: 700; font-size: 1rem; padding: 5px 9px; border: 1px solid transparent; border-radius: 6px; background: transparent; width: 300px; }
.groupe-nom input[type=text]:hover, .groupe-nom input[type=text]:focus { border-color: #c4cdd6; background: #fff; }
.groupe-actions { margin-left: auto; display: inline-flex; gap: 6px; }
.groupe-raisons { margin: 4px 0 10px; font-size: .84rem; color: #4a5a6a; }
.groupe-raisons pre { white-space: pre-wrap; background: #f6f8fa; border-radius: 6px; padding: 8px 12px; margin: 6px 0 0; }
.groupe-ajout { margin-top: 10px; display: flex; gap: 8px; }
.groupe-ajout select { max-width: 340px; padding: 5px 8px; border: 1px solid #c4cdd6; border-radius: 6px; background: #fff; }
.resa-club { font-size: .76rem; color: #6a7684; margin-top: -1px; }
.groupe-tete {
    position: sticky; top: 0; z-index: 3;
    display: flex; justify-content: space-between; align-items: center; gap: 8px;
    background: #e8e2f4; color: #4a3a7a; font-size: .8rem; font-weight: 700;
    padding: 4px 8px; border-radius: 6px; margin: 8px 0 2px;
}
.groupe-tete-sans { background: #eef2f6; color: #4a5a6a; }
.sx { font-weight: 800; font-size: 9px; padding: 0 3px; border-radius: 3px; }
.sx-e { background: #fde0e0; color: #8a1f1f; }
.sx-h { background: #e2e6ea; color: #3c4a58; }
.sx-j { background: #f3e5f1; color: #7a2a6a; }
.sx-tb { background: #dbe7f5; color: #1d4e89; }
.sx-q { background: #eef2f6; color: #6a7684; }

/* grille d'affectation : cases plus grandes (zoom − / +), nom sur 2 lignes max, occupant dessous */
.grille-wrap .grille-affect { --cw: 84px; --ch: 76px; }
.grille-affect .box .bnum { font-size: calc(var(--cw) * 0.16); }
.grille-affect .box .bocc {
    white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; font-size: calc(var(--cw) * 0.13); line-height: 1.1;
}
.grille-affect .box .sx { font-size: calc(var(--cw) * 0.115); }
.grille-affect .box .bsexe { display: block; margin-top: 1px; }
.grille-wrap-affect { max-height: 82vh; }

/* ---- écrans « plein cadre » (affectation, éditeur) : la page ne défile jamais,
       seul le plan porte l'ascenseur vertical ---- */
body.plein-cadre { height: 100vh; overflow: hidden; display: flex; flex-direction: column; }
body.plein-cadre .topnav { flex-shrink: 0; }
body.plein-cadre .container {
    flex: 1; min-height: 0; display: flex; flex-direction: column;
    /* margin:0 obligatoire : le « margin: 0 auto » de base désactiverait l'étirement flex
       et le conteneur déborderait de la fenêtre sans aucun ascenseur horizontal */
    max-width: none; margin: 0; padding: 0 14px 10px;
}
body.plein-cadre h1 { display: none; } /* remplacé par la barre d'écran compacte */
body.plein-cadre .flash { flex-shrink: 0; margin: 6px 0; }
.barre-ecran { display: flex; align-items: center; gap: 8px; padding: 8px 0 6px; flex-shrink: 0; }
.titre-ecran {
    font-weight: 700; font-size: 1.02rem; color: #163c2c;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 34vw;
}
.aide-bulle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
    background: #eef2f6; color: #4a5a6a; font-weight: 700; font-size: .82rem; cursor: help;
}
body.plein-cadre .periodes {
    flex-wrap: nowrap; overflow-x: auto; flex-shrink: 0;
    margin-bottom: 6px; padding-bottom: 4px; scrollbar-width: thin;
}
body.plein-cadre .periodes .periode { flex-shrink: 0; }
body.plein-cadre .affect-layout { flex: 1; min-height: 0; align-items: stretch; }
body.plein-cadre .affect-sidebar { max-height: none; height: 100%; box-sizing: border-box; }
body.plein-cadre .affect-main { display: flex; flex-direction: column; min-height: 0; }
.ligne-zones { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; flex-shrink: 0; }
.plan-legende-compacte { margin: 0 0 0 auto; flex-wrap: nowrap; overflow: hidden; white-space: nowrap; }
.plan-legende-compacte .sx { margin-left: 2px; }
body.plein-cadre .grille-wrap, body.plein-cadre .grille-wrap-affect { flex: 1; min-height: 0; max-height: none; }
.zoom-ctrl { display: inline-flex; gap: 4px; flex-shrink: 0; }
.zoom-ctrl button {
    width: 32px; height: 28px; border: 1px solid #c4cdd6; border-radius: 6px;
    background: #fff; font-weight: 700; font-size: 1rem; cursor: pointer; line-height: 1;
}
.zoom-ctrl button:hover { background: #eef2f6; }
.zoom-ctrl button:disabled { opacity: .35; cursor: default; }

/* petit écran : on revient à l'empilement classique, la page défile normalement */
@media (max-width: 900px) {
    body.plein-cadre { height: auto; overflow: auto; display: block; }
    body.plein-cadre .container { display: block; }
    body.plein-cadre .affect-layout { flex-direction: column; }
    body.plein-cadre .affect-sidebar { width: auto; height: auto; max-height: 40vh; }
    body.plein-cadre .grille-wrap, body.plein-cadre .grille-wrap-affect { max-height: 70vh; }
    body.plein-cadre .periodes { flex-wrap: wrap; }
    .titre-ecran { max-width: none; }
    .barre-ecran { flex-wrap: wrap; }
}
.box.avec-entier { border-color: #a52626; box-shadow: 0 0 0 1.5px #a52626 inset; }
.choix-sexe {
    position: fixed; z-index: 60; background: #fff; border: 1px solid #c4cdd6;
    border-radius: 10px; padding: 10px; box-shadow: 0 8px 22px rgba(0,0,0,.22);
    display: flex; flex-direction: column; gap: 6px; min-width: 180px;
}
.choix-titre { font-size: .8rem; font-weight: 700; color: #4a5a6a; }
.btn-sexe {
    font: inherit; text-align: left; padding: 7px 12px; border-radius: 8px;
    border: 1px solid #c4cdd6; background: #fff; cursor: pointer; font-weight: 600;
}
.btn-sexe span { font-weight: 400; color: #6a7684; font-size: .8rem; }
.btn-sexe:hover { background: #eef2f6; }
.sx-btn-entier { border-left: 5px solid #a52626; }
.sx-btn-hongre { border-left: 5px solid #6a7684; }
.sx-btn-jument { border-left: 5px solid #7a2a6a; }

/* modale de saisie des numéros de boxes */
.modale-fond {
    position: fixed; inset: 0; z-index: 70; background: rgba(20, 30, 40, .45);
    display: flex; align-items: center; justify-content: center; padding: 16px;
}
.modale {
    background: #fff; border-radius: 12px; padding: 16px 20px;
    width: 460px; max-width: 95vw; max-height: 86vh; overflow-y: auto;
    box-shadow: 0 12px 40px rgba(0,0,0,.3);
}
.modale-titre { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 1.05rem; }
.modale-fermer { border: none; background: none; font-size: 1.1rem; cursor: pointer; color: #6a7684; }
.modale-fermer:hover { color: #a52626; }
.modale-lignes { margin: 12px 0; display: flex; flex-direction: column; gap: 6px; }
.mod-ligne { display: flex; align-items: center; gap: 10px; }
.mod-affecte { background: #e9f3ed; border: 1px solid #bcd9c8; border-radius: 8px; padding: 6px 10px; }
.mod-numero { min-width: 70px; }
.mod-zone { color: #4a5a6a; font-size: .85rem; }
.mod-sexe { color: #4a5a6a; font-size: .85rem; flex: 1; text-align: right; }
.mod-sexe-sel { margin-left: auto; padding: 4px 6px; border: 1px solid #bcd9c8; border-radius: 6px; background: #fff; font-size: .85rem; }

/* commentaire FFE en entier, sans ascenseur */
.commentaire-ffe {
    max-width: 640px; background: #f6f8fa; border: 1px solid #dde3ea; border-radius: 6px;
    padding: 10px 14px; font-size: .95rem; line-height: 1.45; white-space: normal;
}
.mod-suppr {
    border: none; background: none; color: #a52626; font-weight: 700; cursor: pointer;
    font-size: 1rem; padding: 2px 6px; border-radius: 6px;
}
.mod-suppr:hover { background: #fde0e0; }
.mod-saisie .mod-num {
    width: 110px; padding: 7px 10px; border: 1px solid #c4cdd6; border-radius: 8px; font: inherit;
}
.mod-saisie .mod-sel { padding: 7px 8px; border: 1px solid #c4cdd6; border-radius: 8px; background: #fff; font: inherit; }
.mod-erreur { color: #a52626; font-size: .8rem; flex: 1; }
.modale-actions { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.boxe-occupant { border: 1px solid #dde3ea; border-radius: 10px; padding: 12px 14px; margin: 12px 0; }
.boxe-occupant .resa-infos { margin: 4px 0; }
.boxe-comm { margin: 8px 0; max-width: none; }
.boxe-occupant-actions { display: flex; gap: 10px; margin-top: 10px; }

.resa-sexes { margin: 2px 0; display: flex; gap: 4px; flex-wrap: wrap; }
.chip-sexe {
    display: inline-block; background: #eef2f6; color: #3c4a58; border-radius: 999px;
    padding: 0 7px; font-size: .72rem; font-weight: 600; white-space: nowrap;
}
.chip-entier { background: #fde0e0; color: #8a1f1f; }
.chip-jument { background: #f3e5f1; color: #7a2a6a; }
td.sexes { white-space: nowrap; font-size: .82rem; }

.chip-groupe {
    display: inline-block; background: #e8e2f4; color: #4a3a7a; border-radius: 999px;
    padding: 0 8px; font-size: .72rem; font-weight: 700; white-space: nowrap; max-width: 160px;
    overflow: hidden; text-overflow: ellipsis; vertical-align: middle;
}

/* ---- impression du plan ---- */
.print-zone { background: #fff; border: 1px solid #dde3ea; border-radius: 8px; padding: 14px 18px; margin-bottom: 18px; }
.print-zone h2 { margin-top: 0; }
.print-grille { position: relative; margin: 8px 0 14px; }
.print-box {
    position: absolute; box-sizing: border-box; border: 1.5px solid #444; border-radius: 3px;
    background: #fff; overflow: hidden; line-height: 1.05; padding: 1px 2px;
}
.print-box.dem { border-style: dashed; }
.print-box.lit-paille { background: #f6e7a8; }
.print-box.lit-copeaux { background: #e8d5bc; }
.print-box .bnum { font-weight: 700; display: block; }
.print-box .bocc { display: block; font-weight: 600; color: #14532d; white-space: nowrap; }
table.print-liste { width: auto; min-width: 60%; }
/* liste des affectations à imprimer : textes centrés verticalement,
   engageur aligné à gauche, numéros de boxes centrés horizontalement */
table.affect-liste { width: 100%; border-collapse: collapse; background: #fff; }
.affect-liste th, .affect-liste td {
    border: 1px solid #4a5a6a; padding: 7px 10px;
    vertical-align: middle; text-align: center; font-size: .95rem;
}
.affect-liste th { background: #eef2f6; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; }
.affect-liste th.eng, .affect-liste td.eng { text-align: left; }
.affect-liste td.eng { font-weight: 600; }
.affect-liste thead { display: table-header-group; } /* entête répétée sur chaque page imprimée */

@media print {
    .topnav, .actions, .no-print, .flash { display: none !important; }
    body { background: #fff; }
    .container { max-width: none; padding: 0; }
    .print-zone { border: none; padding: 0; page-break-after: always; }
    h1 { font-size: 1.1rem; margin: 0 0 6px; }
    .affect-liste th, .affect-liste td { border-color: #000; font-size: .85rem; }
    .affect-liste tr { page-break-inside: avoid; }
}

/* ---- pages publiques (cavaliers, mobile d'abord) ---- */
body.public { background: #f4f6f4; }
.pub-entete { background: #fff; border-bottom: 3px solid #163c2c; }
.pub-entete-inner {
    max-width: 860px; margin: 0 auto; padding: 0 16px; height: 68px;
    display: flex; align-items: center; justify-content: space-between;
}
.pub-marque { display: block; }
.pub-logo { height: 48px; display: block; }
.pub-orga { color: #1a5f3f; text-decoration: none; font-size: .84rem; font-weight: 600; }
.pub-orga:hover { text-decoration: underline; }
.login-logo { display: block; margin: 6vh auto 0; width: 280px; max-width: 75%; }
.pub-main { max-width: 860px; }
.pub-soustitre { color: #4a5a6a; margin-top: -6px; }
.pub-concours { display: flex; flex-direction: column; gap: 12px; }
.pub-card {
    display: block; background: #fff; border: 1px solid #dde3ea; border-radius: 10px;
    padding: 16px 18px; text-decoration: none; color: inherit;
}
.pub-card:hover { border-color: #1a5f3f; }
.pub-card-nom { display: block; font-weight: 700; font-size: 1.08rem; color: #163c2c; }
.pub-card-infos { display: block; color: #4a5a6a; font-size: .88rem; margin: 3px 0 8px; }
.pub-card-action { color: #1a5f3f; font-weight: 600; font-size: .9rem; }
.pub-recherche { display: flex; gap: 8px; margin: 14px 0 18px; }
.pub-champ { flex: 1; position: relative; }
.pub-recherche input[type=search] {
    width: 100%; box-sizing: border-box; padding: 12px 14px; font-size: 1.05rem;
    border: 2px solid #1a5f3f; border-radius: 10px; background: #fff;
}
.pub-suggestions {
    position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 20;
    background: #fff; border: 1.5px solid #1a5f3f; border-radius: 10px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .22); overflow: hidden auto;
    max-height: 320px; /* au-delà de ~8 propositions, la liste défile */
}
.pub-suggestions button {
    display: block; width: 100%; text-align: left; padding: 8px 14px;
    border: none; background: none; font: inherit; font-size: .95rem; cursor: pointer;
    border-bottom: 1px solid #eef2f6;
}
.pub-suggestions button:last-child { border-bottom: none; }
.pub-suggestions button:hover, .pub-suggestions button:focus { background: #e9f3ed; }
@media (min-width: 700px) {
    /* sur ordinateur : liste compacte accrochée au champ, pas de rangées géantes */
    .pub-suggestions { max-width: 420px; }
    .pub-suggestions button { padding: 7px 12px; font-size: .92rem; }
}
.pub-recherche .btn { font-size: 1rem; padding: 12px 20px; border-radius: 10px; }
.pub-resultat-titre { font-weight: 700; font-size: 1.1rem; color: #163c2c; }
.pub-resultat-dates { color: #4a5a6a; font-size: .9rem; margin: 2px 0 10px; }
.pub-boxes { display: flex; flex-direction: column; gap: 6px; }
.pub-box {
    background: #e9f3ed; border: 1px solid #bcd9c8; border-radius: 8px;
    padding: 8px 12px; font-size: .98rem;
}
.pub-box strong { font-size: 1.15rem; }
.pub-box-attente { background: #fff3cd; border-color: #e8d590; color: #7a5d00; }
.pub-annonce {
    background: #dbe7f5; border: 1.5px solid #9dbfe3; border-radius: 12px;
    padding: 22px 26px; font-size: 1.15rem; color: #1d4e89; margin: 20px 0;
    text-align: center;
}
.bloc-annonce { background: #f6f8fa; border: 1px solid #dde3ea; border-radius: 8px; padding: 12px 16px; margin-top: 10px; max-width: 640px; }
.bloc-annonce .choix-annonce { display: block; font-weight: 400; margin: 6px 0; }
.annonce-datetime { margin: 8px 0 2px 24px; display: flex; gap: 8px; align-items: center; }
.annonce-datetime input { padding: 6px 9px; border: 1px solid #c4cdd6; border-radius: 6px; font: inherit; }

.pub-pied {
    max-width: 860px; margin: 30px auto 0; padding: 14px 16px 30px;
    color: #6a7684; font-size: .82rem; border-top: 1px solid #dde3ea;
}
.pub-pied a { color: #4a5a6a; }
@media (max-width: 640px) {
    .container { padding: 0 10px 40px; }
    h1 { font-size: 1.25rem; }
    .pub-recherche { flex-direction: column; }
    table.liste { display: block; overflow-x: auto; }
}
