/* Le Petit Lourdes — compléments (formulaires dynamiques, messages, administration) */
.test-banner { background: #8a3b3b; color: #fff; text-align: center; font-size: .85rem; padding: .3rem .8rem; letter-spacing: .03em; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.notice { padding: .8rem 1rem; border-radius: var(--radius); margin: 0 0 1rem; border-left: 4px solid var(--blue-soft); background: var(--blue-pale); }
.notice.ok { border-color: #4f7a5a; background: #e9f3ea; }
.notice.err { border-color: var(--danger); background: #f7e8e8; }
.notice.info { border-color: var(--gold); background: var(--gold-pale); }
.notice.big { padding: 1.5rem 1.8rem; }
.notice ul { margin: 0; padding-left: 1.2rem; }
.acompte { background: var(--gold-pale); border-left: 3px solid var(--gold); padding: .8rem 1rem; margin: 0 0 1.2rem; border-radius: 3px; }
.acompte p { margin: .3rem 0 0; }
.dispo { min-height: 1.4em; font-weight: 600; margin: .2rem 0 1rem; }
.dispo.oui { color: #3d6b48; } .dispo.non { color: var(--danger); }
.btn.danger { color: var(--danger); border-color: var(--danger); }
.chk { display: inline-flex; gap: .4rem; align-items: center; margin-right: 1.2rem; font-weight: 400; }
.event-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .6rem; margin-top: 1rem; }
.event-photos img { width: 100%; height: 120px; object-fit: cover; border-radius: 3px; }
.sbadge { display: inline-block; padding: .1rem .55rem; border-radius: 99px; font-size: .8rem; font-weight: 600; background: #eee; }
.s-a_valider { background: #f3ead3; color: #7a5c1c; } .s-validee { background: #e1efe3; color: #2f5e3a; }
.s-refusee { background: #f5dddd; color: #7b2e2e; } .s-annulee { background: #e5e5e5; color: #555; }
.pbadge { display: inline-block; padding: .05rem .5rem; border-radius: 3px; font-size: .78rem; color: #fff; background: var(--c, #1e3558); }

/* Administration */
body.admin { background: #f4f2ec; }
.admin-top { display: flex; justify-content: space-between; align-items: center; padding: .6rem 1.2rem; background: var(--blue-deep); color: #f3ead3; flex-wrap: wrap; gap: .5rem; }
.admin-top a, .admin-top .linklike { color: #f3ead3; }
.admin-brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; font-family: var(--header-serif); font-size: 1.3rem; }
.admin-brand svg { width: 34px; height: 34px; }
.admin-brand small { font-family: var(--body-sans); font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-light); margin-left: .3rem; }
.admin-user { font-size: .9rem; }
form.inline { display: inline; }
.linklike { background: none; border: 0; padding: 0; font: inherit; text-decoration: underline; cursor: pointer; color: var(--blue-mid); }
.admin-wrap { display: grid; grid-template-columns: 220px 1fr; min-height: calc(100vh - 56px); }
.admin-nav { background: #fff; border-right: 1px solid var(--line); padding: 1rem 0; }
.admin-nav ul { list-style: none; margin: 0; padding: 0; }
.admin-nav a { display: block; padding: .45rem 1.2rem; text-decoration: none; color: var(--ink); font-size: .95rem; }
.admin-nav a:hover { background: var(--ivory); }
.admin-nav a.active { background: var(--blue-pale); border-left: 3px solid var(--gold); font-weight: 600; }
.admin-main { padding: 1.4rem 2rem 3rem; min-width: 0; }
.admin-main h1 { font-family: var(--header-serif); color: var(--blue-marian); margin: 0 0 1rem; font-size: 2rem; }
.admin-main h2 { font-family: var(--header-serif); color: var(--blue-marian); font-size: 1.45rem; margin: 1.6rem 0 .6rem; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.3rem; margin-bottom: 1.2rem; }
table.grid { width: 100%; border-collapse: collapse; background: #fff; font-size: .93rem; }
table.grid th, table.grid td { border-bottom: 1px solid var(--line); padding: .5rem .6rem; text-align: left; vertical-align: top; }
table.grid th { background: var(--ivory); font-weight: 600; }
table.grid tr.deleted td { color: #999; text-decoration: line-through; }
table.grid tr.deleted td.actions { text-decoration: none; }
.actions { white-space: nowrap; }
.actions form { display: inline; }
.btn-sm { padding: .3rem .7rem; font-size: .8rem; }
.btn-blue { background: var(--blue-marian); color: #fff; } .btn-blue:hover { background: var(--blue-mid); color: #fff; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 1rem; margin-bottom: 1.4rem; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; }
.stat b { display: block; font-size: 1.9rem; font-family: var(--header-serif); color: var(--blue-marian); }
.admin form.edit { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.4rem; max-width: 52rem; }
.admin input[type="number"], .admin input[type="password"], .admin input[type="datetime-local"], .admin input[type="url"] { width: 100%; font: inherit; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 3px; background: #fff; }
.admin textarea.code { font-family: ui-monospace, Consolas, monospace; font-size: .85rem; min-height: 24rem; }
.thumbs { display: flex; flex-wrap: wrap; gap: .8rem; }
.thumbs figure { margin: 0; width: 150px; font-size: .8rem; }
.thumbs img { width: 150px; height: 110px; object-fit: cover; border-radius: 3px; display: block; }
.cal { width: 100%; border-collapse: collapse; table-layout: fixed; background: #fff; }
.cal th { background: var(--ivory); padding: .4rem; font-size: .85rem; }
.cal td { border: 1px solid var(--line); height: 6.5rem; vertical-align: top; padding: .25rem; font-size: .78rem; }
.cal td.other { background: #faf8f3; color: #aaa; }
.cal td.today { outline: 2px solid var(--gold); outline-offset: -2px; }
.cal .dnum { font-weight: 700; text-decoration: none; display: block; }
.cal .item { display: block; border-left: 3px solid var(--c, #1e3558); padding-left: .3rem; margin: .15rem 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; text-decoration: none; color: var(--ink); }
.cal .po { color: var(--gold); font-weight: 600; }
.perm td, .perm th { text-align: center; } .perm td:first-child, .perm th:first-child { text-align: left; }
.muted { color: var(--muted); font-size: .9rem; }
pre.mail { white-space: pre-wrap; background: #fff; border: 1px solid var(--line); padding: 1rem; font-size: .85rem; }
/* Pages d'authentification (sans menu) : carte centrée */
.admin-wrap.auth-wrap { display: block; padding: 2.5rem 1rem 3rem; min-height: 0; }
.admin-main.auth-card { box-sizing: border-box; width: 100%; max-width: 560px; margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 2px 14px rgba(30, 53, 88, .08); padding: 1.8rem 2rem 2rem; overflow-wrap: break-word; }
.admin-main.auth-card h1 { font-size: 1.75rem; line-height: 1.2; }
.auth-card form.edit, .auth-card .panel { max-width: none !important; border: 0; padding: 0; margin: 0; background: transparent; }
.auth-card .form-row input { width: 100%; box-sizing: border-box; }
.auth-card ol { padding-left: 1.3rem; }
#qr { display: block !important; width: max-content; max-width: 100%; margin: .4rem auto 1rem; border: 1px solid var(--line); border-radius: var(--radius); line-height: 0; }
#qr svg { width: 220px; height: 220px; max-width: 100%; display: block; }
#secret { word-break: break-all; }
@media (max-width: 800px) { .admin-wrap { grid-template-columns: 1fr; } .admin-main table.grid { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; } .admin-wrap.auth-wrap { padding: 1rem .6rem 2rem; } .admin-main.auth-card { padding: 1.2rem 1.1rem 1.5rem; } .admin-main.auth-card h1 { font-size: 1.45rem; } .admin-nav ul { display: flex; flex-wrap: wrap; } .admin-main { padding: 1rem; } }
.sbadge.s-supprime { background: #e7e1e1; color: #8a3b3b; }
.sbadge.s-integre { background: #1f3a5f; color: #fff; white-space: nowrap; }
.deleted-toggle { margin: .4rem 0 1rem; font-size: .9rem; }
table.grid tr.deleted td { background: #faf7f7; }
.price-matrix input { max-width: 7.5rem; text-align: right; }
.price-matrix th small { display: block; font-weight: 400; color: #777; }
#form-specifique label { display: block; }
/* Filtre de catégories de photos (public et admin) */
.photo-filter { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: 0 0 1.4rem; }
.photo-filter .label { font-weight: 600; margin-right: .2rem; }
.photo-filter a { display: inline-block; padding: .35rem .9rem; border: 1px solid var(--line); border-radius: 99px; text-decoration: none; color: inherit; background: #fff; font-size: .92rem; }
.photo-filter a.active { background: var(--blue-marian, #1e3558); border-color: var(--blue-marian, #1e3558); color: #fff; }
.photo-filter .n { opacity: .7; font-size: .85em; }
.photo-cat-title { margin: 0 0 1rem; }
.sub-option { margin: .3rem 0 0 1.6rem; }
.vis-badge { display: inline-block; padding: .1rem .55rem; border-radius: 99px; font-size: .8rem; font-weight: 600; }
.vis-badge.on { background: #e9f3ea; color: #2f5a3a; } .vis-badge.off { background: #f3eded; color: #7a3b3b; }
.photo-admin-card { display: grid; grid-template-columns: 170px 1fr auto; gap: 1rem; align-items: start; }
@media (max-width: 800px) { .photo-admin-card { grid-template-columns: 1fr; } .photo-admin-card img { width: 100% !important; height: 200px !important; } }

/* ---- Éditeur visuel (pages, nouvelles, évènements) ---- */
[hidden] { display: none !important; }
.editeur { border: 1px solid var(--line, #d8d2c4); border-radius: 8px; background: #fff; overflow: hidden; }
.editeur textarea[data-editeur] { display: none; }
.editeur.mode-html textarea[data-editeur] { display: block; width: 100%; min-height: 24rem; border: 0; border-top: 1px solid var(--line, #d8d2c4); border-radius: 0; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .85rem; }
.editeur.mode-html .ed-area, .editeur.mode-html .ed-group, .editeur.mode-html .ed-images { display: none; }
.ed-toolbar { display: flex; flex-wrap: wrap; gap: .35rem .6rem; align-items: center; padding: .45rem .5rem; background: #f6f3ec; border-bottom: 1px solid var(--line, #d8d2c4); position: sticky; top: 0; z-index: 2; }
.ed-group { display: inline-flex; flex-wrap: wrap; gap: .2rem; }
.ed-btn { font: inherit; font-size: .85rem; line-height: 1; padding: .45rem .6rem; min-width: 2.2rem; min-height: 2.2rem; border: 1px solid #d3cbb8; border-radius: 6px; background: #fff; color: #233; cursor: pointer; }
.ed-btn:hover, .ed-btn:focus-visible { background: #efe7d3; border-color: #b9a66f; outline: none; }
.ed-btn.ed-b { font-weight: 700; } .ed-btn.ed-i { font-style: italic; }
.ed-btn.ed-toggle { margin-left: auto; font-family: ui-monospace, Menlo, Consolas, monospace; background: #1f3a5f; color: #fff; border-color: #1f3a5f; }
.ed-area { min-height: 18rem; max-height: 70vh; overflow-y: auto; padding: 1rem 1.1rem; outline: none; line-height: 1.6; }
.ed-area:focus { box-shadow: inset 0 0 0 2px #b9a66f; }
.ed-area img { max-width: 100%; height: auto; }
.ed-area blockquote { border-left: 4px solid #b9a66f; margin: 1rem 0; padding: .3rem 1rem; color: #4a4a4a; font-style: italic; }
.ed-area h2 { font-size: 1.45rem; margin: 1.2rem 0 .5rem; } .ed-area h3 { font-size: 1.2rem; margin: 1rem 0 .4rem; }
.ed-images { display: flex; flex-wrap: wrap; gap: .5rem; padding: .6rem; background: #fbf9f4; border-bottom: 1px solid var(--line, #d8d2c4); max-height: 30rem; overflow-y: auto; }
.ed-images .hint { flex-basis: 100%; margin: 0; }
.ed-thumb { padding: 0; border: 2px solid transparent; border-radius: 6px; background: none; cursor: pointer; width: 6.5rem; height: 5rem; overflow: hidden; }
.ed-thumb:hover, .ed-thumb:focus-visible { border-color: #b9a66f; }
.ed-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 600px) {
  .ed-toolbar { gap: .3rem; }
  .ed-btn { padding: .4rem .5rem; min-width: 2.4rem; min-height: 2.4rem; }
  .ed-btn.ed-toggle { margin-left: 0; }
  .ed-area { min-height: 14rem; padding: .8rem; }
  .ed-thumb { width: 5rem; height: 4rem; }
}
.ed-area.prose { max-width: none; margin: 0; }
#table-categories td.c-ordre { width: 5.5rem; }
@media (max-width: 800px) {
  .admin-main table#table-categories, #table-categories tbody, #table-categories tr, #table-categories td { display: block; width: auto; overflow: visible; }
  #table-categories tr:first-child { display: none; }
  #table-categories tr { border: 1px solid var(--line, #d8d2c4); border-radius: 8px; padding: .6rem .7rem; margin-bottom: .8rem; background: #fff; }
  #table-categories tr.deleted { background: #f7f2f2; }
  #table-categories td { border: 0; padding: .3rem 0; display: grid; grid-template-columns: 7.5rem 1fr; gap: .5rem; align-items: center; }
  #table-categories td.c-ordre { width: auto; }
  #table-categories td::before { content: attr(data-label); font-weight: 600; font-size: .85rem; }
  #table-categories td.actions::before { content: ''; }
  #table-categories td.actions { display: flex; flex-wrap: wrap; gap: .5rem; }
}
.ed-upload { flex-basis: 100%; display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: .5rem .9rem; align-items: end; padding: .7rem; margin-bottom: .3rem; background: #fff; border: 1px dashed #c9b98a; border-radius: 8px; }
.ed-upload > strong, .ed-upload > .hint, .ed-upload > .ed-msg { grid-column: 1 / -1; margin: 0; }
.ed-field { display: flex; flex-direction: column; gap: .25rem; font-size: .85rem; font-weight: 600; }
.ed-field input, .ed-field select { font-weight: 400; }
.ed-upload .ed-send { justify-self: start; background: #b8954a; color: #fff; border-color: #b8954a; font-weight: 600; }
.ed-msg { color: #8a3b3b; font-size: .9rem; min-height: 1em; }
.photo-group + .photo-group { margin-top: 2.6rem; }
.photo-cat-title { display: flex; align-items: baseline; gap: .5rem; padding-bottom: .4rem; border-bottom: 1px solid var(--line, #d8d2c4); }
.photo-cat-title .n { font-size: .6em; font-weight: 400; opacity: .65; }
/* Droits D'Accès : 4 rôles réglables -> listes compactes, libellé complet lisible */
.perm select { width: auto; min-width: 8.6rem; font-size: .84rem; padding: .32rem 1.6rem .32rem .45rem; }
.perm td, .perm th { padding-left: .35rem; padding-right: .35rem; }
.perm td:first-child { min-width: 11rem; }

/* Tentatives De Connexion */
.att-filters { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: end; margin: .8rem 0 1rem; }
.att-filters .form-row { margin: 0; } .att-filters input, .att-filters select { min-width: 9rem; }
.att-badge { display: inline-block; padding: .1rem .5rem; border-radius: 99px; font-size: .8rem; font-weight: 600; white-space: nowrap; }
.att-badge.ok { background: #e9f3ea; color: #2f5a3a; } .att-badge.ko { background: #f3eded; color: #7a3b3b; } .att-badge.lim { background: #fbefd9; color: #7a5413; } .att-badge.neutre { background: #eef1f5; color: #3b4a5e; }
.att-ua { max-width: 22rem; overflow-wrap: anywhere; color: #5a6575; font-size: .82rem; }
.att-stats { display: flex; flex-wrap: wrap; gap: .6rem; margin: .4rem 0 .2rem; } .att-stats span { background: var(--ivory); border-radius: 6px; padding: .35rem .7rem; font-size: .9rem; }
.att-pager { display: flex; gap: 1rem; margin: 1rem 0; }
