/* ======================
   VARIABLES
====================== */
:root {
  --bg: #E9E4D9;
  --primary: #5F4836;
  --accent: #A88060;
  --text: #2b2b2b;
  --card: #ffffff;
  --success-bg: #f0f7f1;
  --success-border: #c3e6cb;
  --success-text: #155724;
  
  /* Spacing & Sizes */
  --nav-height: 64px;
  --border-radius: 10px;
  --border-radius-sm: 6px;
  --border-radius-lg: 30px;
  --max-content: 1100px;
  --max-form: 500px;
  --max-verse: 700px;
  --max-card-wide: 800px;
  --gap: 1.5rem;
}

/* ======================
   LIENS
====================== */
.lien-externe {
  color: #3B82F6;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.lien-externe i {
  font-size: 0.8em;
  margin-left: 4px;
  color: var(--accent);
  transition: transform 0.2s ease, opacity 0.2s ease;
  opacity: 0.8;
}

.lien-externe:hover {
  color: #2563EB;         /* couleur au survol */
  text-decoration: underline;
}

.lien-externe:hover i {
  transform: translateX(2px) translateY(-2px);
  opacity: 1;
}

/* ======================
   LIENS VERS DAILYSCRIPT
====================== */
#dailyVersesWrapper a {
  color: #3B82F6;        /* couleur des liens DailyVerses */
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

#dailyVersesWrapper a:hover {
  color: #2563EB;         /* couleur au survol */
  text-decoration: underline;
}

/* ======================
   BASE
====================== */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden;
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

html {
  scroll-behavior: smooth;
}

/* ======================
   HEADER
====================== */
header {
  background: linear-gradient(rgba(0,0,0,.35), rgba(0,0,0,.35)), 
              url('https://eglisechatham.ca/media/bible1.jpg') center/cover no-repeat;
  color: white;
  text-align: center;
  padding: 3rem 1.5rem;
}

header h1 {
  font-size: 2rem;
  margin-bottom: .5rem;
}

header p {
  max-width: var(--max-verse);
  margin: 0 auto;
  font-size: 1.1rem;
}

/* adjust size & spacing of the logo */
.titre-logo {
  width: clamp(250px, 80%, 950px); /* min | preferred | max */
  height: auto;
  display: block;
  margin: 0 auto;
  transition: width 0.3s ease;
}

/* ======================
   NAVIGATION
====================== */
.site-nav {
  position: sticky;
  top: 0;
  background: white;
  z-index: 1000;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  height: var(--nav-height);
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
}

/* Mobile: Hamburger on right */
.nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  margin-top: 0; /* Changed from -4px */
  line-height: 1; /* Prevents text/icon from being pushed by line spacing */
  width: 40px;
  height: 40px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1.6rem;
  cursor: pointer;
  padding: 0;
}

.nav-toggle:focus {
  outline: none;          /* remove focus outline */
  background: var(--primary); /* reset background */
}

/* Mobile: Hidden menu */
.nav-links {
  display: none;
}

/* Mobile: Open menu */
.site-nav.active .nav-links {
  display: flex;
  flex-direction: column;
  align-items: center; /* Centers the link containers horizontally */
  position: absolute;
  top: var(--nav-height);
  left: 0;
  width: 100%;
  background: white;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0;
}

.nav-links a {
  display: block;
  text-decoration: none;
  color: var(--primary);
  font-weight: 600;
  font-size: 1.1rem; /* Makes text ~20px if root is 16px */
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #f0f0f0;
}

.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.nav-logo img {
  height: 48px;   /* adjust size here */
  width: auto;
  max-height: 48px;     /* ensure it doesnâ€™t exceed desktop size */
  transition: height 0.3s ease;  /* smooth resizing */
}

/* Icons */
.icon-close {
  display: none;
}

.site-nav.active .icon-open {
  display: none;
}

.site-nav.active .icon-close {
  display: inline;
}

.nav-toggle span {
  line-height: 1;
}

/* ======================
   SECTIONS
====================== */
section {
  padding: 1rem 1.5rem 2rem; /* Top: 1rem, Sides: 1.5rem, Bottom: 2rem */
  max-width: var(--max-content);
  margin: auto;
  margin-top: 0; /* supprime espace inutile */
  scroll-margin-top: 50px;
}

section h2 {
  text-align: center;
  font-size: 1.75rem;
  margin-top: 0;        /* annule tout espace au-dessus du titre */
  padding-top: 0 !important;
  margin-bottom: 1.25rem;
  color: var(--primary);
}

section h3 {
  margin-top: 0;        /* annule tout espace au-dessus du titre */
  padding-top: 0 !important;
  margin-bottom: 0;
}

.titre-special {
  color: white;
}

/* ======================
   CARDS - BASE STYLES
====================== */
.card,
.card2,
.verset-du-jour {
  background: var(--card);
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: 0 10px 25px rgba(0,0,0,.08);
}

/* Card Containers */
.cards {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--gap); /* ou moins selon ton goût */
  margin-top: 0; /* supprime espace inutile */
  width: 100%;
}

.cards2 {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--gap); /* ou moins selon ton goût */
  margin-top: 0; /* supprime espace inutile */
  width: 100%;
}

/* Individual Card Sizing */
.card {
  width: 100%;
  max-width: var(--max-form);
}

.card2 {
  width: 100%;
  max-width: var(--max-card-wide);
}

.verset-du-jour {
  margin: 1.5rem auto;
  max-width: var(--max-verse);
  text-align: left;
}

/* Success Message */
.success,
#message-envoye.card.success {
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  color: var(--success-text);
  width: 100%;
  max-width: var(--max-form);
  margin: 1.25rem auto;
  padding: 2.5rem 1.25rem;
  text-align: center;
}

.checkmark {
  font-size: 3rem;
  color: var(--primary);
  margin-bottom: 10px;
  font-weight: bold;
}

/* ======================
   FORMS
====================== */
form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: none; /* remove restriction */
  margin: 0 auto;  /* center inside card */
}

label,
input,
textarea,
button {
  display: block;
  width: 100%;
}

input,
textarea {
  padding: 10px;
  font-size: 1rem;
  border-radius: var(--border-radius-sm);
  border: 1px solid #ccc;
}

button {
  background: var(--primary);
  color: white;
  padding: 12px;
  border: none;
  border-radius: var(--border-radius-lg);
  cursor: pointer;
  font-size: 1rem;
  margin-top: 1.5rem;
  transition: background 0.2s, opacity 0.2s;
}

button:hover {
  background: var(--accent);
  opacity: 0.9;
}

/* ======================
   CTA
====================== */
.cta {
  background: var(--primary);
  color: white;
  text-align: center;
  padding: 3rem 1.5rem;
  width: 100%;
  max-width: none;
  margin: 0;
}

.cta a {
  color: #fff;
  text-decoration: underline;
}

/* ======================
   SCROLL TO TOP
====================== */
.scroll-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--primary);
  color: white;
  text-decoration: none;
  font-size: 22px;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0,0,0,.3);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
  z-index: 1000;
}

.scroll-top:hover {
  background: var(--accent);
}

.scroll-top.visible {
  opacity: 1;
  pointer-events: auto;
}

/* ======================
   FOOTER
====================== */
footer {
  background: #1f1f1f;
  color: #ccc;
  text-align: center;
  padding: 2rem 1.5rem;
  font-size: .9rem;
}

/* ======================
   TABLET+ BREAKPOINT
====================== */
@media (min-width: 769px) {

  /* Desktop: Hide hamburger */
  .nav-toggle {
    display: none;
  }

  /* Desktop: Show centered horizontal menu */
  .nav-links {
    display: flex;
    flex-direction: row;
    gap: 2rem;
    list-style: none;
    margin: 0 auto;
    padding: 0;
    position: static;
    width: auto;
  }

  .nav-links a {
    padding: 0;
    border-bottom: none;
  }

  /* Desktop: Cards side-by-side */
  .cards {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;   /* ðŸ‘ˆ THIS is key */
  }

  .card {
    flex: 1 1 calc(50% - var(--gap));
    min-width: 250px;
    display: flex;          /* ðŸ‘ˆ make card a flex container */
    flex-direction: column; /* stack content vertically */
  }

  .verset-du-jour {
    margin: 1.5rem auto; /* réduit vertical spacing sur desktop */
  }

  /* Larger headers on desktop */
  header {
    padding: 5rem 1.5rem;
  }

  header h1 {
    font-size: 2.6rem;
  }

  header p {
    font-size: 1.2rem;
  }

  section {
    padding: 2.5rem 1.5rem;
  }

  section h2 {
    font-size: 2rem;
  }
}