/* ===========================================================
   Eglise les Préaux — feuille de style principale
   =========================================================== */

:root {
  --paper: #FFFFFF;
  --paper-alt: #EAF5F6;
  --ink: #262626;
  --ink-soft: #5A5A5A;
  --teal: #0B8D9A;
  --teal-dark: #086D78;
  --gold: #FFC934;
  --gold-dark: #C69C28;
  --line: #DCE8E9;

  --font-display: Tahoma, Arial, sans-serif;
  --font-body: Tahoma, Arial, sans-serif;

  --container: 1080px;
  --radius: 6px;
}

/* --- Reset minimal --- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  font-size: 17px;
}
img { max-width: 100%; display: block; }
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 0.5em;
  color: var(--ink);
}
h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 500; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
ul { padding-left: 1.2em; }

/* Focus visible clavier — accessibilité */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

/* --- Layout --- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
.section { padding: 72px 0; }
.section--alt { background: var(--paper-alt); }
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head p { color: var(--ink-soft); font-size: 1.05rem; }
.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
  font-weight: 600;
  margin-bottom: 12px;
}

/* --- Header / Navigation --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  max-width: var(--container);
  margin: 0 auto;
}
.nav-brand {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-brand img {
  height: 56px;
  width: auto;
  display: block;
  border-radius: 8px;
}
.nav-brand:hover { text-decoration: none; }
.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--ink);
  font-size: 0.95rem;
  position: relative;
  padding: 4px 0;
}
.nav-links a:hover { text-decoration: none; color: var(--teal); }
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; right: 100%;
  bottom: -2px;
  height: 2px;
  background: var(--teal);
  transition: right 0.25s ease;
}
.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after { right: 0; }
.nav-links a[aria-current="page"] { color: var(--teal); font-weight: 500; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--ink);
}
.nav-toggle svg { width: 26px; height: 26px; }

/* --- Boutons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn:hover { text-decoration: none; }
.btn--primary {
  background: var(--gold);
  color: #262626;
}
.btn--primary:hover { background: var(--gold-dark); }
.btn--outline {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}
.btn--outline:hover { border-color: var(--teal); color: var(--teal); }

/* --- Hero --- */
.hero {
  position: relative;
  padding: 96px 0;
  background:
    linear-gradient(180deg, rgba(11,141,154,0.42) 0%, rgba(20,30,32,0.38) 100%),
    url('../images/montmeyran.jpg') center/cover no-repeat;
  color: #fff;
}
.hero h1, .hero p.lede, .hero .eyebrow {
  text-shadow: 0 1px 12px rgba(0,0,0,0.35);
}
.hero .eyebrow { color: var(--gold); }
.hero h1 { color: #fff; }
.hero-inner { max-width: 700px; }
.hero p.lede {
  font-size: 1.2rem;
  color: rgba(255,255,255,0.9);
  margin-bottom: 32px;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.hero .btn--outline {
  border-color: #fff;
  color: #fff;
}
.hero .btn--outline:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* --- Bande horaires (élément signature) --- */
.horaires-strip {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--paper-alt);
}
.horaires-strip .container { padding-top: 0; padding-bottom: 0; }
.horaires-list {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.horaires-list li {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 28px 24px;
  border-left: 1px solid var(--line);
}
.horaires-list li:first-child { border-left: none; }
.horaires-day {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--teal);
}
.horaires-name { font-weight: 500; }
.horaires-time { color: var(--ink-soft); font-size: 0.92rem; }

/* --- Grilles de cartes --- */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}
.card h3 { margin-bottom: 8px; }
.card p { color: var(--ink-soft); margin-bottom: 0; font-size: 0.95rem; }
.card-img {
  width: calc(100% + 56px);
  margin: -28px -28px 20px -28px;
  height: 160px;
  object-fit: cover;
  border-radius: var(--radius) var(--radius) 0 0;
  display: block;
}

/* --- Contenu éditorial (profession de foi, etc.) --- */
.prose { max-width: 700px; }
.prose h2 { margin-top: 2em; }
.prose h2:first-child { margin-top: 0; }
.prose p { color: var(--ink-soft); }

.toc {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 48px;
  background: var(--paper-alt);
}
.toc h2 { font-size: 1rem; text-transform: uppercase; letter-spacing: 0.05em; font-family: var(--font-body); font-weight: 600; margin-bottom: 12px; }
.toc ol { margin: 0; padding-left: 1.2em; }
.toc a { color: var(--ink); }
.toc a:hover { color: var(--teal); }

/* --- Formulaires --- */
.form-field { margin-bottom: 20px; }
.form-field label {
  display: block;
  font-weight: 500;
  margin-bottom: 6px;
  font-size: 0.92rem;
}
.form-field input,
.form-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1rem;
  background: var(--paper);
  color: var(--ink);
}
.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(47,82,51,0.12);
}
.form-note { font-size: 0.85rem; color: var(--ink-soft); }
.alert {
  padding: 14px 18px;
  border-radius: var(--radius);
  margin-bottom: 24px;
  font-size: 0.95rem;
}
.alert--error { background: #FBEAF0; color: #72243E; border: 1px solid #ED93B1; }
.alert--success { background: #EAF3DE; color: #27500A; border: 1px solid #97C459; }

/* --- Espace privé --- */
.login-wrap {
  min-height: calc(100vh - 300px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
}
.login-card {
  width: 100%;
  max-width: 380px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 40px 36px;
}
.login-card h1 { font-size: 1.6rem; margin-bottom: 8px; }
.login-card p.form-note { margin-bottom: 24px; }

.doc-list { list-style: none; margin: 0; padding: 0; }
.doc-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.doc-list li:first-child { border-top: 1px solid var(--line); }
.doc-name { font-weight: 500; }
.doc-meta { font-size: 0.85rem; color: var(--ink-soft); }

/* --- Footer --- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 48px 0;
  margin-top: 72px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}
.footer-grid h3 { font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 12px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid a { color: var(--ink-soft); font-size: 0.92rem; }
.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  font-size: 0.85rem;
  color: var(--ink-soft);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

/* ===========================================================
   Responsive
   =========================================================== */
@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed;
    top: 63px;
    left: 0; right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    gap: 0;
    padding: 8px 24px 16px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }
  .nav-links.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  .nav-links a { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav-links a::after { display: none; }

  .horaires-list { grid-template-columns: 1fr; }
  .horaires-list li { border-left: none; border-top: 1px solid var(--line); }
  .horaires-list li:first-child { border-top: none; }

  .grid, .grid--2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }
  .section { padding: 48px 0; }
  .hero { padding: 48px 0 0; }
}
