/* ═══════════════════════════════════════════
   COMMUNE DE CHANTEHEUX — Feuille de styles
   ═══════════════════════════════════════════ */

:root {
  /* ── Palette principale ── */
  --red:        #DC2626;
  --red-light:  #FEE2E2;
  --red-dark:   #B91C1C;

  --blue:       #3B82F6;
  --blue-light: #DBEAFE;
  --blue-dark:  #1D4ED8;

  /* ── Fond & texte ── */
  --bg:         #F8FAFC;
  --bg2:        #EFF6FF;
  --text:       #1E293B;
  --text-muted: #64748B;
  --white:      #FFFFFF;

  /* ── Utilitaires ── */
  --radius: 20px;
  --shadow:       0 8px 32px rgba(59,130,246,0.12);
  --shadow-hover: 0 16px 48px rgba(220,38,38,0.18);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* ══════════════════════════
   HEADER
══════════════════════════ */
header {
  background: var(--white);
  border-bottom: 2px solid var(--blue-light);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 16px rgba(59,130,246,0.08);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 70px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo-img {
  width: 50px;   /* ajuste la taille */
  height: auto;
  margin-right: 10px;
}

.logo-icon {
  width: 44px;
  height: 44px;
  background: var(--red);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.logo-text {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  color: var(--text);
}

.logo-text span { color: var(--red-dark); }

.header-facebook {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 10px;
  padding: 10px 14px;
  background-color: white;
  color: #1877f2;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  transition: 0.3s;
}

.header-facebook img {
  width: 18px;
  height: 18px;
}

.header-facebook:hover {
  background-color: whitesmoke;
}

nav { display: flex; gap: 2rem; }

nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  transition: color 0.2s;
}

nav a:hover { color: var(--blue-dark); }

.header-cta {
  background: var(--red);
  color: var(--white);
  border: none;
  border-radius: 10px;
  padding: 9px 20px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  text-decoration: none;
}

.header-cta:hover {
  background: var(--red-dark);
  transform: translateY(-1px);
}

/* ══════════════════════════
   HERO
══════════════════════════ */
.hero {
  background: linear-gradient(135deg, #EFF6FF 0%, #F8FAFC 55%, #FEE2E2 100%);
  padding: 80px 2rem 90px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(59,130,246,0.15) 0%, transparent 70%);
  border-radius: 50%;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -60px;
  left: -60px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(220,38,38,0.10) 0%, transparent 70%);
  border-radius: 50%;
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-block;
  background: var(--blue-light);
  color: var(--blue-dark);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 30px;
  margin-bottom: 1.2rem;
}

.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  line-height: 1.18;
  color: var(--text);
  margin-bottom: 1.2rem;
}

.hero h1 em { color: var(--red-dark); font-style: normal; }

.hero p {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.75;
  max-width: 440px;
  margin-bottom: 2rem;
}

.hero-btns { display: flex; gap: 1rem; flex-wrap: wrap; }

.btn-primary {
  background: var(--red);
  color: var(--white);
  padding: 13px 28px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
  box-shadow: 0 4px 16px rgba(220,38,38,0.30);
}

.btn-primary:hover {
  background: var(--red-dark);
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--white);
  color: var(--text);
  padding: 13px 28px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 2px solid var(--blue-light);
  transition: border-color 0.2s, transform 0.15s;
}

.btn-secondary:hover {
  border-color: var(--blue);
  transform: translateY(-2px);
}

/* Hero right : info card */
.hero-card {
  background: var(--white);
  border-radius: 24px;
  padding: 2.2rem;
  box-shadow: var(--shadow);
  border: 1.5px solid var(--blue-light);
}

.hero-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  margin-bottom: 1.2rem;
  color: var(--text);
}

.info-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #EFF6FF;
}

.info-row:last-child { border-bottom: none; }

.info-icon {
  width: 36px;
  height: 36px;
  background: var(--blue-light);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.info-row strong { font-size: 0.88rem; color: var(--text); display: block; }
.info-row span   { font-size: 0.82rem; color: var(--text-muted); }

/* ══════════════════════════
   SECTIONS GÉNÉRALES
══════════════════════════ */
.section { padding: 70px 2rem; }

.section-title {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  color: var(--text);
  margin-bottom: 0.6rem;
}

.section-title p { color: var(--text-muted); font-size: 1rem; }

.section-title .line {
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--red), var(--blue));
  border-radius: 4px;
  margin: 1rem auto 0;
}

/* ══════════════════════════
   RUBRIQUES
══════════════════════════ */
.rubriques-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
}

.rubrique-card {
  background: var(--white);
  border: 2px solid transparent;
  border-radius: var(--radius);
  padding: 2rem 1.2rem 1.6rem;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.2s;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.rubrique-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(59,130,246,0.05) 0%, rgba(220,38,38,0.04) 100%);
  opacity: 0;
  transition: opacity 0.25s;
}

.rubrique-card:hover {
  border-color: var(--blue);
  box-shadow: var(--shadow-hover);
  transform: translateY(-6px);
}

.rubrique-card:hover::before { opacity: 1; }

.rubrique-icon-wrap {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.2rem;
  border-radius: 50%;
  border: 3px solid var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  background: var(--bg2);
  transition: background 0.25s, border-color 0.25s;
}

.rubrique-card:hover .rubrique-icon-wrap {
  background: var(--blue-light);
  border-color: var(--red);
}

.rubrique-card h3 {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.2s;
}

.rubrique-card:hover h3 { color: var(--blue-dark); }

/* ══════════════════════════
   ACTUALITÉS
══════════════════════════ */
.actualites-bg { background: var(--bg2); }

.actualites-inner { max-width: 1200px; margin: 0 auto; }

.actu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.actu-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
  transition: transform 0.2s, box-shadow 0.2s;
}

.actu-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.actu-img {
  height: 160px;
  background: linear-gradient(135deg, var(--blue-light), var(--blue));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
}

.actu-body { padding: 1.4rem; }

.actu-tag {
  display: inline-block;
  background: var(--red-light);
  color: var(--red-dark);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 0.7rem;
}

.actu-body h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.actu-body p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.actu-date {
  font-size: 0.78rem;
  color: var(--blue-dark);
  margin-top: 0.8rem;
  font-weight: 500;
}

/* ══════════════════════════
   MAIRIE
══════════════════════════ */
.mairie-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.mairie-info h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  margin-bottom: 1.5rem;
}

.mairie-desc {
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 1.5rem;
}

.horaires { margin-top: 1rem; }

.horaires-label {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--red-dark);
  font-weight: 700;
}

.horaire-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #EFF6FF;
  font-size: 0.9rem;
}

.horaire-row span:first-child { color: var(--text-muted); }
.horaire-row span:last-child  { font-weight: 600; }
.horaire-row .closed          { color: var(--text-muted); font-weight: 400; }

.contact-list {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.92rem;
}

.contact-item .ci { font-size: 1.2rem; }

.map-placeholder {
  background: linear-gradient(135deg, var(--blue-light) 0%, #BFDBFE 100%);
  border-radius: var(--radius);
  height: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  border: 2px solid var(--blue-light);
}

.map-placeholder .map-icon { font-size: 4rem; }

.map-placeholder p {
  color: var(--blue-dark);
  font-weight: 600;
  font-size: 1rem;
}

/* ══════════════════════════
   FOOTER
══════════════════════════ */
footer {
  background: var(--text);
  color: var(--white);
  padding: 50px 2rem 30px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
}

footer h4 {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--blue-light);
}

footer p {
  font-size: 0.88rem;
  color: #94A3B8;
  line-height: 1.7;
}

footer ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

footer ul li a {
  text-decoration: none;
  color: #94A3B8;
  font-size: 0.88rem;
  transition: color 0.2s;
}

footer ul li a:hover { color: var(--red); }

.footer-bottom {
  max-width: 1200px;
  margin: 2rem auto 0;
  border-top: 1px solid #334155;
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-bottom p { font-size: 0.8rem; color: #64748B; }

/* ══════════════════════════
   ANIMATIONS
══════════════════════════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.rubrique-card { animation: fadeUp 0.5s ease both; }
.rubrique-card:nth-child(1) { animation-delay: 0.05s; }
.rubrique-card:nth-child(2) { animation-delay: 0.10s; }
.rubrique-card:nth-child(3) { animation-delay: 0.15s; }
.rubrique-card:nth-child(4) { animation-delay: 0.20s; }
.rubrique-card:nth-child(5) { animation-delay: 0.25s; }
.rubrique-card:nth-child(6) { animation-delay: 0.30s; }
.rubrique-card:nth-child(7) { animation-delay: 0.35s; }
.rubrique-card:nth-child(8) { animation-delay: 0.40s; }
.rubrique-card:nth-child(9) { animation-delay: 0.45s; }

/* ══════════════════════════
   RESPONSIVE
══════════════════════════ */
@media (max-width: 768px) {
  .hero-inner            { grid-template-columns: 1fr; }
  .hero-card             { display: none; }
  .mairie-grid           { grid-template-columns: 1fr; }
  .footer-inner          { grid-template-columns: 1fr; gap: 2rem; }
  nav                    { display: none; }
  .rubriques-grid        { grid-template-columns: repeat(2, 1fr); }
}

/* ══════════════════════════
   SOUS-PAGES
══════════════════════════ */

.subpage-hero {
  background: linear-gradient(135deg, #EFF6FF 0%, #F8FAFC 60%, #FEE2E2 100%);
  padding: 50px 2rem 60px;
  position: relative;
  overflow: hidden;
  text-align: center;
}

.subpage-hero::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(59,130,246,0.13) 0%, transparent 70%);
  border-radius: 50%;
}

.subpage-hero-inner {
  max-width: 760px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
}

.breadcrumb {
  align-self: flex-start;
  text-decoration: none;
  color: var(--blue-dark);
  font-size: 0.88rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--blue-light);
  padding: 6px 14px;
  border-radius: 30px;
  transition: background 0.2s;
  margin-bottom: 0.5rem;
}

.breadcrumb:hover { background: #BFDBFE; }

.subpage-icon {
  font-size: 3.2rem;
  line-height: 1;
}

.subpage-hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  color: var(--text);
  line-height: 1.2;
}

.subpage-hero p {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.75;
  max-width: 600px;
}

/* Contenu principal sous-page */
.subpage-main {
  padding: 60px 2rem 80px;
}

.subpage-content {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.subpage-block {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem 2.2rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
  border-left: 4px solid var(--blue);
  transition: box-shadow 0.2s, border-color 0.2s;
}

.subpage-block:hover {
  box-shadow: var(--shadow);
  border-color: var(--red);
}

.subpage-block h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.7rem;
}

.subpage-block p {
  font-size: 0.97rem;
  color: var(--text-muted);
  line-height: 1.78;
}

/* Bloc contact en bas */
.subpage-contact-block {
  background: linear-gradient(135deg, var(--blue-light) 0%, #EFF6FF 100%);
  border-radius: var(--radius);
  padding: 1.8rem 2.2rem;
  display: flex;
  align-items: center;
  gap: 1.2rem;
  border: 1.5px solid var(--blue-light);
  margin-top: 0.5rem;
}

.subpage-contact-icon { font-size: 2.2rem; flex-shrink: 0; }

.subpage-contact-block strong {
  display: block;
  font-size: 1rem;
  color: var(--blue-dark);
  margin-bottom: 0.3rem;
}

.subpage-contact-block p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

@media (max-width: 768px) {
  .subpage-hero { padding: 36px 1.2rem 44px; }
  .subpage-main  { padding: 36px 1.2rem 60px; }
  .subpage-block { padding: 1.4rem 1.4rem; }
  .subpage-contact-block { flex-direction: column; text-align: center; }
}
