@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=IBM+Plex+Sans:wght@400;500;600&display=swap');

:root {
  --ink: #1C1710;
  --parchment: #E4DCC5;
  --parchment-2: #DAD0B4;
  --red: #7A2E27;
  --gold: #C99A3C;
  --green: #35513F;
  --cream-text: #F4EFE0;
  --line: rgba(28, 23, 16, 0.18);
  --line-light: rgba(244, 239, 224, 0.25);
  --max: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--parchment);
  color: var(--ink);
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .display {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  margin: 0;
  color: var(--ink);
}

a { color: inherit; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------- Zigzag divider (motif signature) ---------- */
.zigzag {
  height: 14px;
  width: 100%;
  background-image: linear-gradient(135deg, var(--gold) 25%, transparent 25%),
                     linear-gradient(225deg, var(--gold) 25%, transparent 25%);
  background-position: 0 0;
  background-size: 20px 14px;
  background-repeat: repeat-x;
}
.zigzag.on-dark {
  background-image: linear-gradient(135deg, var(--gold) 25%, transparent 25%),
                     linear-gradient(225deg, var(--gold) 25%, transparent 25%);
}

/* ---------- Header ---------- */
header.site {
  background: var(--ink);
  color: var(--cream-text);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px;
  max-width: var(--max);
  margin: 0 auto;
}
.wordmark {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.02em;
  color: var(--cream-text);
  text-decoration: none;
}
.wordmark span { color: var(--gold); }
.nav-links {
  display: flex;
  gap: 30px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  text-decoration: none;
  color: var(--cream-text);
  font-size: 15px;
  opacity: 0.88;
  border-bottom: 2px solid transparent;
  padding-bottom: 3px;
  transition: border-color .15s ease;
}
.nav-links a:hover, .nav-links a.active { border-color: var(--gold); opacity: 1; }
.nav-right { display: flex; align-items: center; gap: 18px; }
.lang-toggle {
  display: flex;
  border: 1px solid var(--line-light);
  border-radius: 3px;
  overflow: hidden;
}
.lang-toggle button {
  background: transparent;
  border: none;
  color: var(--cream-text);
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 13px;
  padding: 6px 11px;
  cursor: pointer;
}
.lang-toggle button.active { background: var(--gold); color: var(--ink); font-weight: 600; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 600;
  font-size: 15px;
  padding: 12px 24px;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform .12s ease;
}
.btn-primary { background: var(--gold); color: var(--ink); }
.btn-primary:hover { transform: translateY(-1px); }
.btn-outline-dark { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-outline-light { border-color: var(--cream-text); color: var(--cream-text); background: transparent; }
.btn-outline-light:hover { background: rgba(244,239,224,0.08); }

/* ---------- Hero ---------- */
.hero {
  background: var(--ink);
  color: var(--cream-text);
  padding: 78px 0 64px;
}
.hero .wrap { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: end; }
.eyebrow-plain {
  color: var(--gold);
  font-size: 15px;
  margin-bottom: 14px;
  font-family: 'IBM Plex Sans', sans-serif;
}
.hero h1 {
  color: var(--cream-text);
  font-size: 46px;
  line-height: 1.12;
  max-width: 13ch;
  margin-bottom: 22px;
}
.hero p.lede {
  font-size: 17px;
  max-width: 46ch;
  color: rgba(244,239,224,0.86);
  margin-bottom: 30px;
}
.hero .cta-row { display: flex; gap: 14px; }
.hero-stats {
  border-left: 1px solid var(--line-light);
  padding-left: 32px;
}
.stat { margin-bottom: 26px; }
.stat:last-child { margin-bottom: 0; }
.stat .num {
  font-family: 'Fraunces', serif;
  font-size: 40px;
  color: var(--gold);
  line-height: 1;
}
.stat .label { font-size: 14px; color: rgba(244,239,224,0.75); margin-top: 4px; }

/* ---------- Sections ---------- */
section { padding: 68px 0; }
.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head h2 { font-size: 30px; margin-bottom: 12px; }
.section-head p { color: rgba(28,23,16,0.72); font-size: 16px; }

.families {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.family {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 26px 22px;
  min-height: 168px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.family .tag {
  font-size: 12.5px;
  color: var(--green);
  font-weight: 600;
}
.family h3 { font-size: 18px; margin: 10px 0 8px; line-height: 1.25; }
.family p { font-size: 13.5px; color: rgba(28,23,16,0.68); margin: 0; }

/* ---------- Model note ---------- */
.model-note {
  background: var(--parchment-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.model-note .wrap { display: grid; grid-template-columns: 1fr 1.6fr; gap: 40px; padding: 56px 28px; }
.model-note h2 { font-size: 24px; margin-bottom: 10px; }
.model-note p { font-size: 15px; color: rgba(28,23,16,0.75); }

/* ---------- CTA banner ---------- */
.cta-banner {
  background: var(--red);
  color: var(--cream-text);
  text-align: left;
}
.cta-banner .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.cta-banner h2 { color: var(--cream-text); font-size: 26px; max-width: 20ch; }

/* ---------- Footer ---------- */
footer.site {
  background: var(--ink);
  color: rgba(244,239,224,0.7);
  padding: 44px 0 28px;
  font-size: 14px;
}
footer.site .wrap {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 24px;
}
footer.site a { text-decoration: none; color: rgba(244,239,224,0.7); }
footer.site .cols { display: flex; gap: 60px; }
footer.site .col h4 {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 13px;
  color: var(--gold);
  margin-bottom: 10px;
  font-weight: 600;
}
footer.site .col a { display: block; margin-bottom: 6px; transition: color .15s ease; }
footer.site .col a:hover { color: var(--gold); }
.foot-bottom {
  max-width: var(--max);
  margin: 32px auto 0;
  padding: 18px 28px 0;
  border-top: 1px solid var(--line-light);
  font-size: 12.5px;
  color: rgba(244,239,224,0.5);
}

/* ---------- Espace membre ---------- */
.auth-shell {
  max-width: 440px;
  margin: 0 auto;
}
.auth-tabs { display: flex; gap: 8px; margin-bottom: 24px; }
.auth-tab {
  flex: 1;
  padding: 10px;
  text-align: center;
  border: 1px solid var(--ink);
  background: transparent;
  cursor: pointer;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 14px;
  color: var(--ink);
}
.auth-tab.active { background: var(--ink); color: var(--cream-text); }
.auth-msg {
  font-size: 13.5px;
  line-height: 1.5;
  padding: 10px 0 10px 14px;
  margin-top: 14px;
  border-left: 3px solid transparent;
  display: none;
}
.auth-msg.error { color: var(--red); border-left-color: var(--red); display: block; }
.auth-msg.success { color: var(--green); border-left-color: var(--green); display: block; }

.member-dashboard { max-width: 640px; margin: 0 auto; }
.dash-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.dash-header .who { font-size: 14px; color: rgba(28,23,16,0.65); }
.publish-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  margin-bottom: 4px;
}
.publish-row input { width: auto; }
.publish-row label { margin-bottom: 0; font-size: 13.5px; }
.btn-link {
  background: none;
  border: none;
  color: var(--red);
  font-size: 13.5px;
  text-decoration: underline;
  cursor: pointer;
  font-family: 'IBM Plex Sans', sans-serif;
  padding: 0;
}

.annuaire-head { background: var(--ink); color: var(--cream-text); padding: 56px 0 40px; }
.annuaire-head h1 { color: var(--cream-text); font-size: 36px; max-width: 20ch; }
.annuaire-head p { color: rgba(244,239,224,0.82); max-width: 52ch; margin-top: 12px; font-size: 15.5px; }

.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
  margin-bottom: 32px;
  align-items: center;
}
.chip {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 13.5px;
  padding: 8px 15px;
  border: 1px solid var(--ink);
  background: transparent;
  cursor: pointer;
  color: var(--ink);
}
.chip.active { background: var(--ink); color: var(--cream-text); }
.search-input {
  margin-left: auto;
  border: 1px solid var(--line);
  background: transparent;
  padding: 9px 13px;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 14px;
  min-width: 220px;
}

.member-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.member-card {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 24px;
}
.member-card .cat {
  font-size: 12px;
  color: var(--green);
  font-weight: 600;
  margin-bottom: 10px;
  display: block;
}
.member-card h3 { font-size: 18px; margin-bottom: 4px; }
.member-card .role { font-size: 14px; color: rgba(28,23,16,0.7); margin-bottom: 14px; }
.member-card .loc {
  font-size: 13px;
  color: rgba(28,23,16,0.55);
  margin-bottom: 6px;
}
.member-card .phone {
  font-size: 13.5px;
  color: rgba(28,23,16,0.75);
  margin-bottom: 14px;
}
.member-card .phone a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(28,23,16,0.3);
}
.member-card .phone a:hover { border-color: var(--ink); }
.member-card .contact-row {
  display: flex;
  gap: 16px;
}
.member-card .contact-link {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--red);
  text-decoration: none;
  border-bottom: 1px solid var(--red);
  padding-bottom: 1px;
}
.empty-state {
  padding: 60px 0;
  text-align: center;
  color: rgba(28,23,16,0.55);
  font-size: 15px;
  display: none;
}

@media (max-width: 880px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-stats { border-left: none; border-top: 1px solid var(--line-light); padding-left: 0; padding-top: 24px; display: flex; gap: 30px; }
  .families { grid-template-columns: repeat(2, 1fr); }
  .member-grid { grid-template-columns: repeat(2, 1fr); }
  .nav-links { display: none; }
  .model-note .wrap { grid-template-columns: 1fr; }
}
.contact-form-section { background: var(--parchment); }
.contact-form-section .wrap { max-width: 640px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; margin-top: 8px; }
.form-grid .full { grid-column: 1 / -1; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}
.field input, .field select, .field textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  padding: 11px 13px;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 14.5px;
  color: var(--ink);
}
.field textarea { resize: vertical; min-height: 100px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
}
.form-submit-row { margin-top: 22px; }
.form-note { font-size: 13px; color: rgba(28,23,16,0.6); margin-top: 14px; }
.form-feedback {
  font-size: 13.5px;
  line-height: 1.5;
  padding: 10px 0 10px 14px;
  margin-top: 16px;
  border-left: 3px solid transparent;
  display: none;
}
.form-feedback.success { color: var(--green); border-left-color: var(--green); display: block; }
.form-feedback.error { color: var(--red); border-left-color: var(--red); display: block; }
.hidden-field { display: none; }

/* ---------- Bouton avec roue de chargement ---------- */
.btn-spinner {
  display: none;
  width: 15px;
  height: 15px;
  border: 2px solid rgba(28,23,16,0.3);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: btn-spin 0.7s linear infinite;
  margin-right: 8px;
  vertical-align: -2px;
}
button.is-loading .btn-spinner { display: inline-block; }
button.is-loading { opacity: 0.85; cursor: wait; pointer-events: none; }
@keyframes btn-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 560px) {
  .families { grid-template-columns: 1fr; }
  .member-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 34px; }
  .form-grid { grid-template-columns: 1fr; }
}

