/* ============ Cousinade Mas de la Barque — styles communs ============ */

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  margin: 0;
  background: #f5f1e8;
  color: #2c2c2c;
  line-height: 1.5;
}
a { color: #6b4423; }
a:hover { color: #8b5a2e; }

/* ============ Header + nav ============ */
.site-header {
  background: #fff;
  border-bottom: 3px solid #c89668;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.site-header__top {
  max-width: 1400px;
  margin: 0 auto;
  padding: 14px 20px 8px;
}
.site-header__title {
  color: #6b4423;
  font-size: 1.15em;
}
.site-header__dates {
  color: #888;
  margin-left: 12px;
  font-size: 0.85em;
}
.tabs {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}
.tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  text-decoration: none;
  color: #6b4423;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  font-size: 0.95em;
  transition: background 0.15s, border-color 0.15s;
}
.tab:hover { background: #faf6ed; }
.tab.active {
  border-bottom-color: #6b4423;
  font-weight: 600;
  background: #faf6ed;
}
.tab__emoji { font-size: 1.1em; }
@media (max-width: 600px) {
  .tab__label { display: none; }
  .tab__emoji { font-size: 1.4em; }
  .tab { padding: 10px 12px; }
}

/* ============ Layout ============ */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px;
}
.container--wide { max-width: 1400px; }

h1 {
  color: #6b4423;
  border-bottom: 3px solid #c89668;
  padding-bottom: 10px;
  margin-bottom: 5px;
}
h2 { color: #6b4423; margin-top: 30px; font-size: 1.3em; }
h3 { color: #6b4423; margin: 18px 0 8px; font-size: 1.05em; }

.lead {
  font-size: 1.05em;
  background: #fff;
  padding: 15px 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  border-left: 4px solid #c89668;
}

/* ============ Cards / KPIs ============ */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 15px;
  margin-bottom: 25px;
}
.card {
  background: #fff;
  border-radius: 8px;
  padding: 18px 20px;
  border: 1px solid #d4c4a8;
}
.card h3 {
  margin: 0 0 8px;
  font-size: 0.9em;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid #e8dcc0;
  padding-bottom: 6px;
}
.kpi {
  font-size: 2.5em;
  font-weight: 700;
  color: #6b4423;
  line-height: 1;
}
.kpi__sub {
  font-size: 0.85em;
  color: #888;
  margin-top: 4px;
}

/* ============ Tables ============ */
.table-wrap { overflow-x: auto; background: #fff; border-radius: 8px; border: 1px solid #d4c4a8; }
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9em;
}
table.data th, table.data td {
  border: 1px solid #d4c4a8;
  padding: 8px 10px;
  text-align: left;
  vertical-align: middle;
}
table.data th {
  background: #e8dcc0;
  color: #6b4423;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
}
table.data td.center, table.data th.center { text-align: center; }
table.data tr.weekend td { background: #faf6ed; }
table.data .num { font-weight: 600; color: #6b4423; text-align: center; }
table.data .muted { color: #aaa; text-align: center; }

/* ============ Buttons ============ */
.btn, button.btn {
  display: inline-block;
  background: #6b4423;
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.95em;
  font-family: inherit;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.15s;
}
.btn:hover, button.btn:hover { background: #8b5a2e; color: white; }
.btn--big { padding: 14px 28px; font-size: 1.05em; }
.btn--ok { background: #4a7a3a; }
.btn--ok:hover { background: #5a9047; }
.btn--danger { background: #a04040; }
.btn--danger:hover { background: #c05050; }

/* ============ Form ============ */
form fieldset {
  background: #fff;
  border: 1px solid #d4c4a8;
  border-radius: 8px;
  margin-bottom: 20px;
  padding: 15px 20px;
}
form legend {
  font-weight: 600;
  color: #6b4423;
  padding: 0 10px;
  font-size: 1.05em;
}
form label { display: block; margin: 8px 0 4px; font-size: 0.95em; }
input[type="text"], input[type="tel"], input[type="number"], input[type="email"], textarea, select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #c4b59a;
  border-radius: 5px;
  font-size: 1em;
  font-family: inherit;
  background: #fcfaf5;
}
textarea { resize: vertical; min-height: 60px; }
.row { display: flex; gap: 15px; flex-wrap: wrap; }
.row > div { flex: 1; min-width: 180px; }
.checkbox-group { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 5px; }
.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: normal;
  background: #faf6ed;
  padding: 5px 10px;
  border-radius: 5px;
  border: 1px solid #d4c4a8;
  cursor: pointer;
}
.checkbox-group input { margin: 0; }
.helper { font-size: 0.85em; color: #666; font-style: italic; margin-top: 3px; }
.note {
  background: #fff8e7;
  padding: 10px 15px;
  border-radius: 6px;
  border-left: 3px solid #c89668;
  font-size: 0.9em;
  margin: 15px 0;
}
.note--info { background: #e8f0fa; border-left-color: #6b8eb0; }
.note--ok { background: #e0f0d8; border-left-color: #4a7a3a; color: #2c5e1e; }
.note--warn { background: #fae0e0; border-left-color: #a04040; color: #7a1f1f; }

/* ============ Footer ============ */
.site-footer {
  text-align: center;
  padding: 20px;
  color: #888;
  font-size: 0.85em;
}
.footer-admin {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 9px;
  border: 1px solid #d4c4a8;
  border-radius: 12px;
  color: #6b4423;
  text-decoration: none;
  font-size: 0.92em;
  background: #faf6ed;
  transition: background 0.15s;
}
.footer-admin:hover { background: #efe6d2; }

/* ============ Empty state ============ */
.empty {
  background: #fff;
  padding: 40px 20px;
  text-align: center;
  border-radius: 8px;
  color: #888;
  font-style: italic;
  border: 1px dashed #c89668;
}
