/* Alma da Coisa — design zen : sauge, terre, crème */
:root {
  --sauge: #7a8b6f;
  --sauge-fonce: #4a5a43;
  --creme: #f7f4ee;
  --sable: #efe9dd;
  --terre: #b08968;
  --texte: #3e4a3d;
  --blanc: #fffefb;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Jost', sans-serif;
  color: var(--texte);
  background: var(--creme);
  line-height: 1.65;
}
h1, h2, h3, .logo, blockquote { font-family: 'Cormorant Garamond', serif; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247,244,238,.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--sable);
}
.nav-inner {
  max-width: 1080px; margin: auto; padding: 14px 20px;
  display: flex; justify-content: space-between; align-items: center;
}
.logo { font-size: 1.5rem; font-weight: 600; color: var(--sauge-fonce); display: flex; align-items: center; gap: 10px; }
.logo-img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; box-shadow: 0 2px 8px rgba(74,90,67,.25); }
.nav-links { display: flex; gap: 22px; align-items: center; }
.nav-links a { color: var(--texte); text-decoration: none; font-size: .95rem; }
.nav-links a:hover { color: var(--sauge-fonce); }
.btn-nav {
  background: var(--sauge); color: #fff !important; padding: 8px 20px;
  border-radius: 999px; transition: background .2s;
}
.btn-nav:hover { background: var(--sauge-fonce); }
@media (max-width: 700px) {
  .nav-links a:not(.btn-nav):not(.btn-entrar) { display: none; }
  .nav-links { gap: 8px; }
  .nav-links .btn-entrar, .nav-links .btn-nav { padding: 6px 12px !important; font-size: .82rem !important; }
}

/* Hero */
.hero {
  min-height: 82vh; display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 60px 20px;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(176,137,104,.18), transparent 55%),
    radial-gradient(ellipse at 80% 80%, rgba(122,139,111,.25), transparent 55%),
    linear-gradient(180deg, var(--creme), var(--sable));
}
.hero-kicker {
  text-transform: uppercase; letter-spacing: .25em; font-size: .8rem;
  color: var(--terre); margin-bottom: 18px;
}
.hero h1 { font-size: clamp(2.6rem, 6vw, 4.5rem); font-weight: 400; line-height: 1.1; }
.hero h1 em { color: var(--sauge-fonce); }
.hero-sub { max-width: 560px; margin: 22px auto 34px; font-size: 1.15rem; font-weight: 300; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.btn-primary {
  background: var(--sauge); color: #fff; padding: 14px 32px; border-radius: 999px;
  text-decoration: none; font-size: 1rem; border: none; cursor: pointer;
  transition: background .2s; display: inline-block;
}
.btn-primary:hover { background: var(--sauge-fonce); }
.btn-ghost {
  border: 1px solid var(--sauge); color: var(--sauge-fonce); padding: 13px 28px;
  border-radius: 999px; text-decoration: none; display: inline-block;
}
.btn-ghost:hover { background: var(--sauge); color: #fff; }

/* Intro */
.intro { max-width: 720px; margin: auto; padding: 90px 20px; text-align: center; }
.intro blockquote { font-size: 1.7rem; font-style: italic; color: var(--sauge-fonce); margin-bottom: 22px; }

/* Sections */
.section { max-width: 1080px; margin: auto; padding: 80px 20px; text-align: center; }
.section.alt { background: var(--sable); max-width: none; }
.section.alt > * { max-width: 1080px; margin-left: auto; margin-right: auto; }
.section h2 { font-size: 2.4rem; font-weight: 400; margin-bottom: 8px; }
.section-sub { color: var(--terre); margin-bottom: 40px; }

.cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px; text-align: left;
}
.card {
  background: var(--blanc); border: 1px solid var(--sable); border-radius: 18px;
  padding: 30px; transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(74,90,67,.10); }
.card-img {
  aspect-ratio: 4 / 3; height: auto; margin: -12px -12px 16px;
  border-radius: 12px; overflow: hidden;
  background: var(--sable); position: relative;
}
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.card-img img.fb-bg {
  position: absolute; inset: 0;
  object-fit: cover; filter: blur(16px) brightness(.62); transform: scale(1.25);
}
.card-img img.fb-fg { position: relative; object-fit: cover; }
.card:hover .card-img img:not(.fb-bg):not(.fb-fg) { transform: scale(1.04); }
.card h3 { font-size: 1.5rem; color: var(--sauge-fonce); margin-bottom: 10px; }
.card p { font-weight: 300; font-size: .98rem; margin-bottom: 16px; }
.card-link { color: var(--terre); text-decoration: none; font-weight: 500; }
.card-link:hover { color: var(--sauge-fonce); }

/* Prova social */
.stats { display: flex; gap: 40px; justify-content: center; flex-wrap: wrap; margin-bottom: 40px; }
.stats div { display: flex; flex-direction: column; }
.stats strong { font-family: 'Cormorant Garamond', serif; font-size: 2.6rem; color: var(--sauge-fonce); }
.stats span { font-size: .9rem; font-weight: 300; max-width: 180px; }
.testemunho {
  max-width: 640px; margin: 20px auto; font-size: 1.3rem; font-style: italic;
  background: var(--blanc); padding: 30px; border-radius: 18px; border-left: 4px solid var(--sauge);
}
.testemunho cite { display: block; font-size: .85rem; font-style: normal; color: var(--terre); margin-top: 12px; }

/* Contacto */
.contacto-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; text-align: left; align-items: start; }
@media (max-width: 800px) { .contacto-grid { grid-template-columns: 1fr; } }
.contacto a { color: var(--sauge-fonce); }
.mapa { width: 100%; height: 320px; border: 0; border-radius: 18px; }
.contacto .btn-ghost { margin: 4px 6px 0 0; padding: 8px 18px; font-size: .9rem; }

footer { text-align: center; padding: 40px 20px; background: var(--sauge-fonce); color: var(--creme); }
.footer-small { font-size: .8rem; opacity: .7; }
footer a { color: var(--creme); }

/* --- Réservation & admin --- */
.wizard { max-width: 560px; margin: 60px auto; background: var(--blanc); border-radius: 22px; padding: 40px; box-shadow: 0 12px 40px rgba(74,90,67,.10); }
.wizard h2 { margin-bottom: 6px; }
.step { display: none; }
.step.active { display: block; }
.field { margin: 16px 0; text-align: left; }
.field label { display: block; font-size: .9rem; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--sable); border-radius: 12px;
  font-family: inherit; font-size: 1rem; background: var(--creme);
}
.slots { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; }
.slot {
  padding: 10px 18px; border: 1px solid var(--sauge); border-radius: 999px;
  cursor: pointer; background: #fff; font-size: .95rem;
}
.slot small { color: var(--terre); margin-left: 6px; }
.slot.selected { background: var(--sauge); color: #fff; }
.slot.selected small { color: var(--sable); }
.slot.full { opacity: .4; cursor: not-allowed; text-decoration: line-through; }
.wizard-nav { display: flex; justify-content: space-between; margin-top: 26px; }
.msg { padding: 14px; border-radius: 12px; margin: 14px 0; font-size: .95rem; }
.msg.erro { background: #f8e3e0; color: #8a3226; }
.msg.ok { background: #e4efe0; color: var(--sauge-fonce); }

table.admin { width: 100%; border-collapse: collapse; font-size: .92rem; background: #fff; }
table.admin th, table.admin td { padding: 10px 12px; border-bottom: 1px solid var(--sable); text-align: left; }
table.admin th { background: var(--sable); }
.badge { padding: 3px 10px; border-radius: 999px; font-size: .78rem; }
.badge.pendente { background: #fdf0d5; color: #8a6d1f; }
.badge.confirmada { background: #e4efe0; color: var(--sauge-fonce); }
.badge.cancelada { background: #f8e3e0; color: #8a3226; }
.admin-wrap { max-width: 1080px; margin: 40px auto; padding: 0 20px; }
.admin-tabs { display: flex; gap: 10px; margin: 20px 0; flex-wrap: wrap; }
.admin-tabs button {
  padding: 9px 20px; border-radius: 999px; border: 1px solid var(--sauge);
  background: #fff; cursor: pointer; font-family: inherit;
}
.admin-tabs button.active { background: var(--sauge); color: #fff; }
.btn-small { padding: 5px 12px; border-radius: 8px; border: 1px solid var(--sauge); background: #fff; cursor: pointer; margin-right: 4px; }

/* Agenda semanal partilhado */
.ag-wrap { background: #fff; border: 1px solid var(--sable); border-radius: 14px; overflow-x: auto; }
.ag-head { display: grid; grid-template-columns: 52px repeat(7, minmax(96px, 1fr)); }
.ag-head div { padding: 8px 4px; font-size: .78rem; text-align: center; background: var(--sable); border-left: 1px solid var(--creme); }
.ag-head .ag-today { background: var(--sauge); color: #fff; border-radius: 8px 8px 0 0; }
.ag-canvas { position: relative; height: 676px; min-width: 730px; }
.ag-hour { position: absolute; left: 0; width: 52px; font-size: .7rem; color: var(--terre); text-align: right; padding-right: 6px; }
.ag-line { position: absolute; left: 52px; right: 0; border-top: 1px solid var(--sable); }
.ag-col { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--sable); }
.ag-block {
  position: absolute; border-radius: 8px; padding: 4px 6px; font-size: .72rem;
  color: #fff; overflow: hidden; line-height: 1.25; cursor: default;
  box-shadow: 0 1px 4px rgba(62,74,61,.18);
}
.ag-block small { display: block; opacity: .85; }
.ag-block { cursor: pointer; }
.ag-block:hover { filter: brightness(1.1); }
.ag-sess { background: var(--sauge); }
.ag-fixed {
  background: rgba(122,139,111,.16);
  border: 1.5px dashed var(--sauge);
  color: var(--sauge-fonce);
  box-shadow: none;
  font-weight: 500;
}
/* Vue mois */
.ag-month { display: grid; grid-template-columns: repeat(7, minmax(90px, 1fr)); gap: 4px; min-width: 700px; }
.ag-day {
  background: #fff; border: 1px solid var(--sable); border-radius: 10px;
  min-height: 86px; padding: 5px 6px; font-size: .72rem; cursor: pointer;
  transition: box-shadow .15s;
}
.ag-day:hover { box-shadow: 0 4px 14px rgba(74,90,67,.12); }
.ag-day.dim { opacity: .38; }
.ag-day.today { border: 2px solid var(--sauge); }
.ag-dnum { font-weight: 600; font-size: .8rem; color: var(--sauge-fonce); display: block; margin-bottom: 3px; }
.ag-e {
  border-radius: 5px; padding: 2px 5px; margin-bottom: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ag-e.fx { background: rgba(122,139,111,.16); border: 1px dashed var(--sauge); color: var(--sauge-fonce); }
.ag-e.fx.full { background: var(--sauge); border: none; color: #fff; }
.ag-e.rm { color: #fff; }
.ag-e.more { color: var(--terre); font-size: .68rem; }
.ag-view-toggle { display: inline-flex; gap: 0; border: 1px solid var(--sauge); border-radius: 999px; overflow: hidden; }
.ag-view-toggle button { padding: 7px 18px; border: none; background: #fff; cursor: pointer; font-family: inherit; }
.ag-view-toggle button.active { background: var(--sauge); color: #fff; }
.ag-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 4px; vertical-align: middle; }
.ag-overlay {
  position: fixed; inset: 0; background: rgba(62,74,61,.4); z-index: 90;
  display: none; align-items: center; justify-content: center;
}
.ag-overlay.open { display: flex; }
.ag-modal {
  background: var(--blanc); border-radius: 18px; padding: 28px; max-width: 380px;
  width: 90vw; box-shadow: 0 16px 50px rgba(62,74,61,.3);
}
.ag-modal h3 { color: var(--sauge-fonce); margin-bottom: 12px; }
.ag-modal p { margin: 6px 0; font-size: .95rem; }
.ag-modal .btn-primary, .ag-modal .btn-ghost { margin-top: 14px; }

/* Affichage photo élégant et UNIFORME : chaque photo remplit son cadre
   (object-fit: cover) — cadrage centré automatique, format identique partout.
   Le fond flou (fb-bg) reste derrière, invisible dès que la photo couvre tout. */
.fb-photo { position: relative; overflow: hidden; background: #2e342c; }
.fb-photo > img.fb-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; filter: blur(16px) brightness(.62);
  transform: scale(1.25); pointer-events: none;
}
.fb-photo > img.fb-fg {
  position: relative; display: block; width: 100%; height: 100%;
  object-fit: cover; pointer-events: none;
}

/* Grand rectangle portrait pour les personnes (équipe) */
.fb-portrait {
  position: relative; overflow: hidden; background: #2e342c;
  border-radius: 14px; aspect-ratio: 4 / 5; width: 100%;
}
.fb-portrait > img.fb-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; filter: blur(18px) brightness(.62); transform: scale(1.25);
}
.fb-portrait > img.fb-fg {
  position: relative; width: 100%; height: 100%; object-fit: cover;
}
