:root {
  --bleu: #2a6f7f;
  --bleu-fonce: #1c4a56;
  --sable: #f4ead9;
  --sable-fonce: #e5d5b8;
  --blanc: #ffffff;
  --texte: #2b2b28;
  --vert: #4c8c5c;
  --rouge: #c25b4a;
  --radius: 10px;
  --ombre: 0 4px 16px rgba(28, 74, 86, 0.12);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--texte);
  background: var(--sable);
  line-height: 1.55;
}

a { color: var(--bleu-fonce); }

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- En-tête --- */
header.hero {
  background: linear-gradient(135deg, var(--bleu) 0%, var(--bleu-fonce) 100%);
  color: var(--blanc);
  padding: 64px 0 56px;
  text-align: center;
}

header.hero h1 {
  margin: 0 0 8px;
  font-size: 2.4rem;
  letter-spacing: 0.5px;
}

header.hero p.tagline {
  margin: 0;
  font-size: 1.1rem;
  opacity: 0.92;
}

nav.admin-bar {
  background: var(--bleu-fonce);
  color: var(--blanc);
  font-size: 0.85rem;
  padding: 8px 0;
}
nav.admin-bar .container { display: flex; justify-content: space-between; align-items: center; }
nav.admin-bar a { color: var(--sable); text-decoration: none; }
nav.admin-bar a:hover { text-decoration: underline; }

/* --- Sections --- */
section { padding: 48px 0; }
section h2 {
  font-size: 1.6rem;
  margin-bottom: 20px;
  color: var(--bleu-fonce);
  border-bottom: 3px solid var(--sable-fonce);
  padding-bottom: 8px;
  display: inline-block;
}

.card {
  background: var(--blanc);
  border-radius: var(--radius);
  box-shadow: var(--ombre);
  padding: 24px;
}

/* --- Galerie photos --- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 8px;
}
.gallery img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--ombre);
  background: var(--sable-fonce);
}
.gallery .placeholder {
  width: 100%;
  height: 200px;
  border-radius: var(--radius);
  background: repeating-linear-gradient(45deg, var(--sable-fonce), var(--sable-fonce) 10px, var(--sable) 10px, var(--sable) 20px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bleu-fonce);
  font-size: 0.85rem;
  text-align: center;
  padding: 8px;
}

.infos-pratiques {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.infos-pratiques .card { text-align: center; }
.infos-pratiques .card strong { display: block; color: var(--bleu-fonce); margin-bottom: 4px; }

/* --- Tarifs --- */
.tarifs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}
.tarif-card {
  background: var(--blanc);
  border-radius: var(--radius);
  box-shadow: var(--ombre);
  padding: 24px;
  text-align: center;
  border-top: 4px solid var(--bleu);
}
.tarif-card h3 { margin: 0 0 8px; color: var(--bleu-fonce); }
.tarif-card .prix { font-size: 2rem; font-weight: bold; color: var(--bleu); }
.tarif-card .prix span { font-size: 1rem; font-weight: normal; color: var(--texte); }
.tarif-card p.desc { font-size: 0.9rem; color: #555; margin-top: 8px; }

/* --- Calendrier --- */
.calendar-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.calendar-nav button {
  background: var(--bleu);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 0.95rem;
}
.calendar-nav button:hover { background: var(--bleu-fonce); }
.calendar-nav h3 { margin: 0; color: var(--bleu-fonce); text-transform: capitalize; }

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.calendar-grid .dow {
  text-align: center;
  font-weight: bold;
  font-size: 0.8rem;
  color: var(--bleu-fonce);
  padding-bottom: 4px;
}
.calendar-grid .day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 0.9rem;
}
.day.empty { background: transparent; }
.day.free { background: #dcefe0; color: var(--vert); }
.day.occupied { background: #f4d9d3; color: var(--rouge); text-decoration: line-through; }
.day.past { background: #eee; color: #aaa; }

.legend { display: flex; gap: 20px; margin-top: 12px; font-size: 0.85rem; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend .dot { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.legend .dot.free { background: #dcefe0; border: 1px solid var(--vert); }
.legend .dot.occupied { background: #f4d9d3; border: 1px solid var(--rouge); }

/* --- Formulaire --- */
form .field { margin-bottom: 16px; }
form label { display: block; font-weight: 600; margin-bottom: 4px; font-size: 0.9rem; }
form input, form select, form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--sable-fonce);
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
}
form textarea { min-height: 100px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }

button.btn, a.btn {
  background: var(--bleu);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 12px 22px;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
button.btn:hover, a.btn:hover { background: var(--bleu-fonce); }
button.btn.danger { background: var(--rouge); }
button.btn.danger:hover { background: #a3392a; }

.alert { padding: 12px 16px; border-radius: 6px; margin-bottom: 16px; }
.alert.success { background: #dcefe0; color: #2c5c36; }
.alert.error { background: #f4d9d3; color: #8c2f1f; }

footer {
  text-align: center;
  padding: 32px 0;
  color: #777;
  font-size: 0.85rem;
}

/* --- Admin --- */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 220px;
  background: var(--bleu-fonce);
  color: var(--blanc);
  padding: 24px 0;
  flex-shrink: 0;
}
.admin-sidebar h2 { padding: 0 20px; font-size: 1.1rem; margin: 0 0 20px; }
.admin-sidebar a {
  display: block;
  padding: 12px 20px;
  color: var(--sable);
  text-decoration: none;
  font-size: 0.95rem;
}
.admin-sidebar a:hover, .admin-sidebar a.active { background: rgba(255,255,255,0.1); color: white; }
.admin-content { flex: 1; padding: 32px; background: var(--sable); }
.admin-content h1 { color: var(--bleu-fonce); margin-top: 0; }

table.admin-table { width: 100%; border-collapse: collapse; background: white; border-radius: var(--radius); overflow: hidden; box-shadow: var(--ombre); }
table.admin-table th, table.admin-table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--sable-fonce); font-size: 0.9rem; }
table.admin-table th { background: var(--sable-fonce); color: var(--bleu-fonce); }
table.admin-table tr:last-child td { border-bottom: none; }

.badge { padding: 3px 10px; border-radius: 12px; font-size: 0.75rem; font-weight: 600; }
.badge.nouvelle { background: #f4d9d3; color: #8c2f1f; }
.badge.traitee { background: #dcefe0; color: #2c5c36; }
.badge.recette { background: #dcefe0; color: #2c5c36; }
.badge.depense { background: #f4d9d3; color: #8c2f1f; }
.badge.impot { background: #f0e0c0; color: #8a6414; }
.badge.travaux { background: #d9e6ec; color: #1c4a56; }
.badge.confirmee { background: #d9e6ec; color: #1c4a56; }

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

.photo-thumb { position: relative; }
.photo-thumb form { position: absolute; top: 6px; right: 6px; }
.photo-thumb button { background: var(--rouge); color: white; border: none; border-radius: 4px; padding: 4px 8px; font-size: 0.75rem; cursor: pointer; }
