:root {
  --rouge: #b3202a;
  --rouge-fonce: #8c1820;
  --vert: #1f6f43;
  --or: #c9a227;
  --fond: #faf7f2;
  --carte: #fff;
  --texte: #222;
  --gris: #6b6b6b;
  --bord: #e3ddd3;
  --rayon: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--texte);
  background: var(--fond);
}

.page { max-width: 960px; margin: 0 auto; padding: 1.25rem 1rem 3rem; }

h1 { font-size: 1.6rem; margin: .5rem 0 1rem; }
h2 { font-size: 1.25rem; margin: 0 0 .75rem; }
a { color: var(--rouge); }
.lead { font-size: 1.15rem; color: var(--gris); }

.card {
  background: var(--carte);
  border: 1px solid var(--bord);
  border-radius: var(--rayon);
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.card.narrow { max-width: 380px; margin: 3rem auto; }

/* Formulaires */
label { display: block; margin-bottom: .9rem; font-weight: 600; }
input, select, textarea {
  display: block;
  width: 100%;
  margin-top: .3rem;
  padding: .6rem .7rem;
  font: inherit;
  font-weight: 400;
  border: 1px solid var(--bord);
  border-radius: 8px;
  background: #fff;
}
textarea { resize: vertical; }
label.check { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; }
label.check input { width: auto; margin-top: .3rem; }
fieldset { border: 0; border-top: 1px solid var(--bord); margin: 0 0 1rem; padding: 1rem 0 0; }
legend { font-weight: 700; color: var(--rouge); padding-right: .5rem; }
.row { display: grid; gap: 0 1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

button, .button {
  display: inline-block;
  padding: .65rem 1.2rem;
  font: inherit;
  font-weight: 600;
  color: #fff;
  background: var(--rouge);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
}
button:hover, .button:hover { background: var(--rouge-fonce); }
button.small { padding: .35rem .8rem; font-size: .9rem; }
button.link { background: none; color: inherit; padding: 0; font-weight: 400; text-decoration: underline; }

.error { color: #fff; background: var(--rouge); padding: .6rem .8rem; border-radius: 8px; }
.flash { background: #e6f2ea; color: var(--vert); padding: .6rem .8rem; border-radius: 8px; }

/* Tableaux */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: var(--carte); }
th, td { text-align: left; padding: .55rem .6rem; border-bottom: 1px solid var(--bord); vertical-align: top; }
table.kv th { width: 10rem; color: var(--gris); font-weight: 600; }
td form { margin: 0; }

.badge { display: inline-block; padding: .1rem .55rem; border-radius: 99px; font-size: .85rem; font-weight: 600; background: #eee; }
.badge.ouvert { background: #e6f2ea; color: var(--vert); }
.badge.ferme { background: #f6e3e4; color: var(--rouge); }

.stats { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.stat { background: var(--carte); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 1rem; text-align: center; }
.stat strong { display: block; font-size: 1.8rem; }
.stat span { color: var(--gris); }

/* Admin */
.admin-nav {
  display: flex; flex-wrap: wrap; gap: 1rem; align-items: center;
  padding: .75rem 1rem; background: var(--rouge); color: #fff;
}
.admin-nav a, .admin-nav button.link { color: #fff; text-decoration: none; }
.admin-nav .brand { font-weight: 700; margin-right: auto; }
.admin-nav form { margin: 0; }

code { background: #f1ece4; padding: .1rem .35rem; border-radius: 4px; word-break: break-all; }

button.secondary { background: #fff; color: var(--texte); border: 1px solid var(--bord); }
button.secondary:hover { background: #f1ece4; }
button.danger { background: #fff; color: var(--rouge); border: 1px solid var(--rouge); }
button.danger:hover { background: #f6e3e4; }
form.inline { display: flex; gap: .5rem; align-items: center; }
form.inline input { margin: 0; min-width: 0; }
tr.inactif td { color: var(--gris); }
tr.inactif input { color: var(--gris); text-decoration: line-through; }
small { font-weight: 400; color: var(--gris); }

/* Public */
.site-nav {
  display: flex; flex-wrap: wrap; gap: 1rem; align-items: center;
  padding: .75rem 1rem; background: var(--rouge);
}
.site-nav a { color: #fff; text-decoration: none; }
.site-nav .brand { font-weight: 700; margin-right: auto; }
.button.big { font-size: 1.15rem; padding: .85rem 1.6rem; }
button:disabled { opacity: .6; cursor: wait; }

.statut { border-radius: var(--rayon); padding: 1rem 1.1rem; margin-bottom: 1rem; border: 1px solid; }
.statut p { margin: .4rem 0 0; }
.statut.attente { background: #fff8e6; border-color: #ecd9a0; }
.statut.validee { background: #e6f2ea; border-color: #b9dcc6; }
.statut.refusee { background: #f6e3e4; border-color: #e5b9bc; }

.apercu { display: block; max-width: 100%; max-height: 320px; margin: -.4rem 0 1rem; border-radius: 8px; }
.piege { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.rgpd { margin: 1rem 0; }
details summary { cursor: pointer; font-weight: 600; }
details[open] summary { margin-bottom: 1rem; }

/* Modération */
.onglets { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.onglets a { padding: .4rem .9rem; border-radius: 99px; background: #fff; border: 1px solid var(--bord); text-decoration: none; color: var(--texte); }
.onglets a.actif { background: var(--rouge); border-color: var(--rouge); color: #fff; }
.moderation { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.mod-photo { display: flex; flex-direction: column; padding: .75rem; margin: 0; }
.mod-photo img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: #222; border-radius: 6px; }
.mod-infos p { margin: .35rem 0; }
.mod-commercant { font-weight: 700; }
.mod-titre { font-style: italic; }
.mod-motif { color: var(--rouge); }
.mod-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: flex-start; margin-top: auto; padding-top: .5rem; }
.mod-actions form { margin: 0; }
.mod-actions details { flex: 1; }
.mod-actions details[open] { flex-basis: 100%; }
.mod-actions summary { list-style: none; }
.mod-actions summary::-webkit-details-marker { display: none; }
button.valider { background: var(--vert); }
button.valider:hover { background: #17573a; }
.button.danger { background: #fff; color: var(--rouge); border: 1px solid var(--rouge); }
