/* Head & Grace — mobile-first stylesheet
   Designed phone-first; the `min-width` blocks scale it up to tablet/desktop. */

:root {
  --bg: #faf7f3;          /* warm cream */
  --bg-card: #ffffff;
  --ink: #2b2724;         /* soft charcoal */
  --ink-soft: #6b635c;
  --accent: #b8895f;      /* warm caramel/gold */
  --accent-dark: #9a6f48;
  --line: #ece4da;
  --shadow: 0 8px 30px rgba(43, 39, 36, 0.08);
  --radius: 16px;
  --max: 1100px;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0 0 .4em; }
h1 { font-size: 2.4rem; }
h2 { font-size: 1.9rem; }
p { margin: 0 0 1em; color: var(--ink-soft); }

a { color: var(--accent-dark); text-decoration: none; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* ---------- Header / nav (mobile-first) ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 247, 243, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.brand { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; color: var(--ink); letter-spacing: .5px; }
.brand span { color: var(--accent); }
.nav-right { display: flex; align-items: center; gap: 16px; }
.nav-links { display: none; gap: 28px; }
.nav-links a { color: var(--ink); font-size: .95rem; }
.nav-links a:hover { color: var(--accent-dark); }
.nav-cta { display: none; padding: 8px 18px; min-height: auto; }
.nav-home { color: var(--ink); font-size: .95rem; }

/* Language switcher (FR / ES) */
.lang-switch { display: flex; gap: 4px; align-items: center; }
.lang-switch button {
  border: 1px solid var(--line); background: transparent; color: var(--ink-soft);
  font: inherit; font-size: .76rem; font-weight: 700; letter-spacing: .5px;
  padding: 6px 10px; border-radius: 999px; cursor: pointer; text-transform: uppercase;
  transition: all .15s ease;
}
.lang-switch button:hover { border-color: var(--accent); color: var(--accent-dark); }
.lang-switch button.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Mobile nav (hamburger) — shown < 760px; toggles the nav links as a dropdown */
.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 8px;
  background: none; color: var(--ink); font-size: 1.25rem; line-height: 1; cursor: pointer;
}
.nav-links.open {
  display: flex; flex-direction: column; gap: 16px;
  position: absolute; top: 64px; left: 0; right: 0;
  background: var(--bg-card); border-bottom: 1px solid var(--line);
  padding: 18px 20px; box-shadow: var(--shadow); z-index: 60;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 26px; border-radius: 999px; font-weight: 600; font-size: 1rem;
  cursor: pointer; border: 1px solid transparent; transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
  min-height: 50px; /* comfortable touch target */
}
.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent-dark); }
.btn-block { width: 100%; }

/* ---------- Auth pages (login / signup) ---------- */
.auth-body { min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(120% 80% at 50% 0%, #fff 0%, var(--bg) 60%); padding: 24px; }
.auth-wrap { width: 100%; max-width: 400px; }
.auth-card { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 32px 26px; text-align: center; }
.auth-brand { display: block; font-size: 1.5rem; margin-bottom: 6px; }
.auth-card h1 { font-size: 1.6rem; margin-bottom: 22px; }
.auth-form { display: flex; flex-direction: column; gap: 6px; text-align: left; }
.auth-form label { font-size: .85rem; font-weight: 600; margin-top: 10px; }
.auth-form input, .auth-form select {
  font: inherit; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--bg); color: var(--ink); min-height: 48px;
}
.auth-form input:focus, .auth-form select:focus { outline: none; border-color: var(--accent); }
.auth-form .btn { margin-top: 18px; }
.auth-error { color: #b23b3b; font-size: .9rem; margin: 12px 0 0; text-align: center; }
.auth-switch { font-size: .9rem; margin: 18px 0 0; color: var(--ink-soft); }
.auth-lang { justify-content: center; margin-top: 16px; }

/* ---------- Admin console ---------- */
.admin-card { margin-bottom: 24px; }
.admin-card h3 { font-size: 1.1rem; margin: 20px 0 10px; }
.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.admin-table th, .admin-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.admin-table th { color: var(--ink-soft); font-weight: 600; white-space: nowrap; }
.admin-table tbody tr:hover { background: var(--bg); }
.admin-form { display: grid; grid-template-columns: 1fr; gap: 8px; max-width: 520px; }
.admin-form input, .admin-form select {
  font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg); color: var(--ink); min-height: 44px;
}
.admin-form input:focus, .admin-form select:focus { outline: none; border-color: var(--accent); }
.admin-form .btn { margin-top: 6px; }
.admin-msg { margin-top: 10px; font-size: .9rem; color: #b23b3b; }
.admin-msg.ok { color: #2e7d4f; }
.btn-sm { min-height: 34px; padding: 6px 12px; font-size: .82rem; margin: 0 4px 0 0; }
.admin-card h3 { margin-top: 22px; }

/* ---------- Saved looks ("Mes coiffures") ---------- */
.looks-empty { text-align: center; color: var(--ink-soft); padding: 32px 0; }
.looks-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.look-card { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.look-card img { width: 100%; aspect-ratio: 3/4; object-fit: cover; display: block; }
.look-label { font-size: .82rem; color: var(--ink-soft); padding: 8px 12px 0; margin: 0; }
.look-card .btn-sm { margin: 10px 12px 12px; }
@media (min-width: 640px) { .looks-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 620px) { .admin-form { grid-template-columns: 1fr 1fr; } .admin-form .btn { grid-column: 1 / -1; } }

/* ---------- Hero ---------- */
.hero {
  padding: 56px 0 48px;
  text-align: center;
  background:
    radial-gradient(120% 80% at 50% 0%, #fff 0%, var(--bg) 60%);
}
.hero .eyebrow {
  display: inline-block; letter-spacing: 3px; text-transform: uppercase;
  font-size: .72rem; color: var(--accent-dark); margin-bottom: 16px; font-weight: 600;
}
.hero h1 { font-size: 2.6rem; margin-bottom: .3em; }
.hero p.lead { font-size: 1.1rem; max-width: 540px; margin: 0 auto 28px; }
.hero-cta { display: flex; flex-direction: column; gap: 12px; max-width: 320px; margin: 0 auto; }

/* ---------- Sections ---------- */
section { padding: 48px 0; }
.section-title { text-align: center; margin-bottom: 8px; }
.section-sub { text-align: center; color: var(--ink-soft); max-width: 560px; margin: 0 auto 32px; }

/* ---------- Feature highlight (AI try-on promo) ---------- */
.promo {
  background: linear-gradient(135deg, #2b2724, #4a3f36);
  color: #fff; border-radius: var(--radius); padding: 36px 24px; text-align: center;
  margin: 8px 0;
}
.promo h2 { color: #fff; }
.promo p { color: rgba(255,255,255,.8); }
.promo .badge {
  display:inline-block; background: var(--accent); color:#fff; font-size:.7rem;
  letter-spacing:2px; text-transform:uppercase; padding:6px 12px; border-radius:999px; margin-bottom:16px; font-weight:700;
}

/* ---------- Cards / services ---------- */
.grid { display: grid; gap: 18px; grid-template-columns: 1fr; }
.card {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow);
}
.card h3 { font-size: 1.3rem; }
.card .price { color: var(--accent-dark); font-weight: 600; }

/* ---------- Gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.gallery img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover;
  border-radius: var(--radius); box-shadow: var(--shadow); display: block;
}

/* ---------- Prestations / services ---------- */
.svc-filter { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 0 0 26px; font-size: .92rem; color: var(--ink-soft); }
.svc-filter input { width: 18px; height: 18px; }
.svc-cat { margin-bottom: 30px; }
.svc-cat h2 { font-size: 1.5rem; margin-bottom: 14px; }
.svc-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.svc-card { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.svc-img { position: relative; }
.svc-img img { width: 100%; height: 120px; object-fit: cover; display: block; }
.ai-badge { position: absolute; top: 10px; left: 10px; background: var(--accent); color: #fff; font-size: .7rem; font-weight: 700; letter-spacing: .5px; padding: 4px 9px; border-radius: 999px; }
.svc-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.svc-body h3 { font-size: 1.2rem; margin: 0; }
.svc-desc { color: var(--ink-soft); font-size: .9rem; margin: 0; flex: 1; }
.svc-price { color: var(--accent-dark); font-weight: 600; font-size: .88rem; }
.svc-actions { display: flex; gap: 8px; margin-top: 8px; }
.svc-actions .btn { flex: 1; padding: 10px 12px; min-height: auto; font-size: .92rem; }
@media (min-width: 620px) { .svc-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .svc-grid { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Info (hours / address) ---------- */
.info-grid { display: grid; gap: 18px; grid-template-columns: 1fr; }
.info-grid dl { margin: 0; }
.info-grid dt { font-weight: 600; color: var(--ink); }
.info-grid dd { margin: 0 0 10px; color: var(--ink-soft); }

/* ---------- Footer ---------- */
.site-footer {
  background: #2b2724; color: rgba(255,255,255,.75); padding: 36px 0; text-align: center; margin-top: 24px;
}
.site-footer a { color: var(--accent); }
.site-footer .brand { color:#fff; display:block; margin-bottom: 8px; }

/* ---------- Tablet / desktop scale-up ---------- */
@media (min-width: 760px) {
  h1 { font-size: 3rem; }
  .hero { padding: 90px 0 70px; }
  .hero h1 { font-size: 3.6rem; }
  .hero-cta { flex-direction: row; justify-content: center; max-width: none; }
  .nav-links { display: flex; }
  .nav-cta { display: inline-flex; }
  .nav-toggle { display: none; }
  .nav-links.open { position: static; flex-direction: row; padding: 0; background: none; box-shadow: none; border: 0; }
  .grid { grid-template-columns: repeat(3, 1fr); }
  .gallery { grid-template-columns: repeat(3, 1fr); gap: 18px; }
  .info-grid { grid-template-columns: 1fr 1fr; }
  .promo { padding: 56px 40px; }
}
