:root {
  --green: #087a3d;
  --green-dark: #064525;
  --green-soft: #e8f5ee;
  --yellow: #f6d21a;
  --yellow-soft: #fff7c7;
  --red: #d71920;
  --cream: #faf6ea;
  --white: #ffffff;
  --text: #10231a;
  --muted: #5f6f66;
  --border: rgba(6, 69, 37, 0.14);
  --shadow: 0 18px 45px rgba(6, 69, 37, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background: var(--cream);
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

/* HEADER */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 14px;
  background: rgba(250, 246, 234, 0.96);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-logo {
  width: 58px;
  height: 58px;
  object-fit: contain;
  flex: 0 0 auto;
  background: #ffffff;
  padding: 5px;
  border-radius: 16px;
  border: 1px solid rgba(6, 69, 37, 0.18);
  box-shadow: 0 8px 22px rgba(6, 69, 37, 0.16);
}

.brand-text {
  font-size: 14px;
  font-weight: 900;
  line-height: 1.05;
  color: var(--green-dark);
  letter-spacing: -0.03em;
}

.menu-toggle {
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--white);
  display: grid;
  place-content: center;
  gap: 5px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(6, 69, 37, 0.08);
}

.menu-toggle span {
  display: block;
  width: 19px;
  height: 2px;
  background: var(--green-dark);
  border-radius: 99px;
}

.nav-menu {
  position: fixed;
  top: 82px;
  left: 14px;
  right: 14px;
  display: none;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.nav-menu.open {
  display: flex;
}

.nav-menu a {
  padding: 13px 14px;
  border-radius: 14px;
  font-weight: 800;
  color: var(--green-dark);
}

.nav-menu a.active,
.nav-menu a:hover {
  background: var(--green-soft);
  color: var(--green);
}

/* HERO MOBILE-FIRST */

.hero {
  position: relative;
  min-height: 620px;
  display: flex;
  align-items: flex-end;
  padding: 112px 16px 30px;
  overflow: hidden;
  background: var(--green-dark);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      rgba(250, 246, 234, 0.38) 0%,
      rgba(250, 246, 234, 0.70) 42%,
      rgba(250, 246, 234, 0.98) 100%
    ),
    url("assets/hero-mairie.jpg");
  background-size: cover;
  background-position: center 18%;
  transform: scale(1.03);
}

.hero::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  right: -90px;
  top: 90px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(246, 210, 26, 0.5),
    rgba(8, 122, 61, 0.12),
    transparent 70%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 620px;
}

.badge,
.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 7px 11px;
  border-radius: 999px;
  background: var(--yellow-soft);
  color: var(--green-dark);
  border: 1px solid rgba(246, 210, 26, 0.6);
  font-size: 12px;
  font-weight: 900;
}

.hero h1 {
  margin: 16px 0 8px;
  font-size: clamp(38px, 11vw, 72px);
  line-height: 0.95;
  letter-spacing: -0.055em;
  color: var(--green-dark);
}

.hero-subtitle {
  margin: 0;
  color: var(--green);
  font-size: clamp(20px, 5.6vw, 30px);
  font-weight: 900;
  font-style: italic;
}

.hero-text {
  margin: 16px 0 0;
  max-width: 520px;
  color: #263b30;
  font-size: 16px;
  font-weight: 700;
}

.hero-actions {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 13px 18px;
  border-radius: 15px;
  font-weight: 900;
  border: 1px solid transparent;
  box-shadow: 0 10px 24px rgba(6, 69, 37, 0.11);
}

.btn-primary {
  background: var(--green);
  color: var(--white);
}

.btn-warning {
  background: var(--yellow);
  color: #2a2100;
}

.btn-outline {
  background: rgba(255, 255, 255, 0.82);
  color: var(--green-dark);
  border-color: rgba(8, 122, 61, 0.34);
}

.full-mobile {
  width: 100%;
  margin-top: 16px;
}

/* SECTIONS */

.section {
  padding: 30px 16px;
}

.page-hero {
  padding-top: 44px;
  padding-bottom: 20px;
}

.page-hero h1 {
  margin: 14px 0 10px;
  color: var(--green-dark);
  font-size: clamp(34px, 10vw, 62px);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.page-hero p {
  margin: 0;
  color: var(--text);
  max-width: 760px;
  font-weight: 650;
}

.section-heading {
  margin-bottom: 18px;
}

.section-heading h2,
.section h2 {
  margin: 10px 0 0;
  font-size: clamp(24px, 7vw, 38px);
  line-height: 1.05;
  letter-spacing: -0.035em;
  color: var(--green-dark);
}

.section-text {
  margin: 0 0 18px;
  color: var(--muted);
  font-weight: 650;
}

.trust-card {
  margin: -14px 16px 0;
  padding: 22px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  position: relative;
  z-index: 3;
}

.trust-card h2 {
  font-size: 22px;
}

.trust-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.trust-list span {
  padding: 12px 13px;
  border-radius: 14px;
  background: var(--green-soft);
  color: var(--green-dark);
  font-weight: 850;
}

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 13px;
}

.feature-card,
.action-card,
.news-grid article {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 12px 28px rgba(6, 69, 37, 0.07);
}

.feature-card {
  min-height: 160px;
}

.icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  border-radius: 16px;
  background: var(--green-soft);
  border: 1px solid rgba(8, 122, 61, 0.16);
  color: var(--green);
}

.icon svg {
  width: 26px;
  height: 26px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature-card h3,
.action-card h3,
.news-grid h3 {
  margin: 0 0 8px;
  color: var(--green-dark);
  font-size: 19px;
  letter-spacing: -0.02em;
}

.feature-card p,
.action-card p,
.news-grid article {
  margin: 0;
  color: var(--muted);
  font-weight: 650;
}

.soft-section {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.45),
    rgba(232, 245, 238, 0.85)
  );
}

.pill-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.pill-grid span {
  display: flex;
  align-items: center;
  min-height: 56px;
  padding: 12px;
  border-radius: 17px;
  background: var(--white);
  border: 1px solid var(--border);
  font-weight: 850;
  color: var(--green-dark);
}

.action-list {
  display: grid;
  gap: 12px;
}

.mayor-card {
  margin: 8px 16px;
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(8, 122, 61, 0.96), rgba(6, 69, 37, 1)),
    var(--green-dark);
  color: var(--white);
  box-shadow: var(--shadow);
}

.mayor-card h2,
.mayor-card .eyebrow {
  color: var(--white);
}

.mayor-card .eyebrow {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.24);
}

.mayor-card p {
  color: rgba(255, 255, 255, 0.86);
  font-weight: 650;
}

.report-card {
  margin: 16px;
  border-radius: 28px;
  background: linear-gradient(135deg, var(--yellow-soft), var(--white));
  border: 1px solid rgba(246, 210, 26, 0.5);
}

.report-card p,
.contact-preview p {
  color: var(--muted);
  font-weight: 650;
}

.news-grid {
  display: grid;
  gap: 12px;
}

.news-grid span {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--green);
  font-weight: 900;
  font-size: 13px;
}

.contact-preview {
  background: var(--green-soft);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* FORMULAIRE DE SIGNALEMENT */

.demo-form {
  display: grid;
  gap: 14px;
  padding: 18px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: 0 14px 32px rgba(6, 69, 37, 0.08);
}

.demo-form label {
  display: grid;
  gap: 7px;
  color: var(--green-dark);
  font-size: 14px;
  font-weight: 900;
}

.demo-form input,
.demo-form select,
.demo-form textarea {
  width: 100%;
  border: 1px solid rgba(6, 69, 37, 0.18);
  border-radius: 15px;
  background: #ffffff;
  padding: 14px 14px;
  color: var(--text);
  font: inherit;
  font-weight: 650;
  outline: none;
}

.demo-form textarea {
  resize: vertical;
}

.demo-form input:focus,
.demo-form select:focus,
.demo-form textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(8, 122, 61, 0.12);
}

.demo-form input[type="file"] {
  padding: 12px;
  background: var(--green-soft);
}

.form-note {
  margin: 0;
  padding: 13px;
  border-radius: 16px;
  background: var(--yellow-soft);
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 750;
}

/* CARTES PROJETS */

.project-grid {
  display: grid;
  gap: 16px;
}

.project-card {
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: 0 14px 32px rgba(6, 69, 37, 0.08);
}

.project-image {
  min-height: 155px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(8, 122, 61, 0.16), rgba(246, 210, 26, 0.22)),
    var(--green-soft);
  color: var(--green-dark);
  font-weight: 900;
}

.project-image img {
  width: 100%;
  height: 100%;
  min-height: 155px;
  object-fit: cover;
}

.project-content {
  padding: 18px;
}

.project-content span {
  display: inline-flex;
  margin-bottom: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--yellow-soft);
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 900;
}

.project-content h3 {
  margin: 0 0 8px;
  color: var(--green-dark);
  font-size: 20px;
  line-height: 1.1;
}

.project-content p {
  margin: 0;
  color: var(--muted);
  font-weight: 650;
}

/* ACTUALITÉS, AVIS DE DÉCÈS ET CONTACT */

.obituary-section {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.65),
    rgba(232, 245, 238, 0.75)
  );
}

.obituary-list {
  display: grid;
  gap: 14px;
}

.obituary-card {
  padding: 20px;
  background: var(--white);
  border: 1px solid rgba(6, 69, 37, 0.14);
  border-radius: 24px;
  box-shadow: 0 14px 32px rgba(6, 69, 37, 0.07);
}

.obituary-card span {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 900;
}

.obituary-card h3 {
  margin: 0 0 8px;
  color: var(--green-dark);
  font-size: 20px;
  line-height: 1.1;
}

.obituary-card p {
  margin: 0;
  color: var(--muted);
  font-weight: 650;
}

.contact-page {
  background: var(--cream);
}

.contact-grid {
  display: grid;
  gap: 12px;
}

.contact-card {
  padding: 18px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: 0 12px 28px rgba(6, 69, 37, 0.06);
}

.contact-card h3 {
  margin: 0 0 6px;
  color: var(--green-dark);
  font-size: 17px;
}

.contact-card p {
  margin: 0;
  color: var(--muted);
  font-weight: 650;
}

.map-placeholder {
  min-height: 180px;
  display: grid;
  place-items: center;
  margin: 16px 0 0;
  padding: 22px;
  text-align: center;
  color: var(--green-dark);
  font-weight: 850;
  background:
    linear-gradient(135deg, rgba(8, 122, 61, 0.12), rgba(246, 210, 26, 0.18)),
    var(--green-soft);
  border: 1px dashed rgba(6, 69, 37, 0.25);
  border-radius: 24px;
}

/* SECTION À LA UNE */

.featured-section {
  padding-top: 26px;
}

.featured-grid {
  display: grid;
  gap: 14px;
}

.featured-main {
  position: relative;
  overflow: hidden;
  min-height: 340px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  border-radius: 28px;
  background:
    linear-gradient(
      180deg,
      rgba(6, 69, 37, 0.10) 0%,
      rgba(6, 69, 37, 0.55) 48%,
      rgba(6, 69, 37, 0.94) 100%
    ),
    url("assets/a-la-une-popenguine.jpg");
  background-size: cover;
  background-position: center;
  color: var(--white);
  box-shadow: var(--shadow);
}

.featured-tag,
.featured-side span {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 12px;
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.featured-tag {
  background: rgba(255, 255, 255, 0.14);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.featured-main h3 {
  margin: 0 0 10px;
  font-size: 25px;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.featured-main p {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.86);
  font-weight: 650;
}

.featured-side {
  display: grid;
  gap: 14px;
}

.featured-side article {
  padding: 20px;
  border-radius: 24px;
  background: var(--white);
  border: 1px solid var(--border);
  box-shadow: 0 12px 28px rgba(6, 69, 37, 0.07);
}

.featured-side span {
  background: var(--yellow-soft);
  color: var(--green-dark);
}

.featured-side h3 {
  margin: 0 0 8px;
  color: var(--green-dark);
  font-size: 20px;
  line-height: 1.1;
}

.featured-side p {
  margin: 0;
  color: var(--muted);
  font-weight: 650;
}

.site-footer {
  padding: 20px 16px 30px;
  background: var(--green-dark);
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  text-align: center;
}

/* CORRECTION MOBILE : PHOTO EN BANDE, TEXTE SUR FOND PROPRE */

@media (max-width: 759px) {
  .hero {
    min-height: auto;
    display: block;
    padding: 245px 16px 30px;
    background: var(--cream);
  }

  .hero-bg {
    height: 235px;
    bottom: auto;
    background:
      linear-gradient(
        180deg,
        rgba(250, 246, 234, 0.18) 0%,
        rgba(250, 246, 234, 0.46) 60%,
        rgba(250, 246, 234, 1) 100%
      ),
      url("assets/hero-mairie.jpg");
    background-size: cover;
    background-position: center 18%;
    transform: scale(1.01);
  }

  .hero-content {
    padding: 0;
  }

  .hero h1 {
    margin-top: 14px;
    font-size: 38px;
    line-height: 0.98;
  }

  .hero-subtitle {
    font-size: 20px;
  }

  .hero-text {
    font-size: 15px;
  }

  .hero-actions {
    margin-top: 18px;
  }
}

/* TABLETTE ET ORDINATEUR */

@media (min-width: 760px) {
  .site-header {
    padding: 14px 34px;
  }

  .brand-logo {
    width: 68px;
    height: 68px;
  }

  .brand-text {
    font-size: 18px;
  }

  .menu-toggle {
    display: none;
  }

  .nav-menu {
    position: static;
    display: flex;
    flex-direction: row;
    align-items: center;
    box-shadow: none;
    border: 0;
    background: transparent;
    padding: 0;
  }

  .nav-menu a {
    font-size: 14px;
  }

  .hero {
    min-height: 620px;
    padding: 120px 44px 70px;
    align-items: center;
  }

  .hero-bg {
    background:
      linear-gradient(
        90deg,
        rgba(250, 246, 234, 0.96) 0%,
        rgba(250, 246, 234, 0.88) 35%,
        rgba(250, 246, 234, 0.58) 68%,
        rgba(250, 246, 234, 0.38) 100%
      ),
      url("assets/hero-mairie.jpg");
    background-size: cover;
    background-position: center 28%;
    transform: scale(1.02);
  }

  .hero-content {
    max-width: 590px;
    padding: 34px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.54);
    border: 1px solid rgba(6, 69, 37, 0.12);
    box-shadow: 0 24px 60px rgba(6, 69, 37, 0.12);
    backdrop-filter: blur(10px);
  }

  .hero h1 {
    font-size: clamp(54px, 5.4vw, 78px);
    max-width: 560px;
  }

  .hero-text {
    font-size: 17px;
    max-width: 500px;
  }

  .hero-actions {
    display: flex;
    flex-wrap: wrap;
  }

  .section {
    padding: 54px 44px;
    max-width: 1180px;
    margin: 0 auto;
  }

  .page-hero {
    padding-top: 70px;
    padding-bottom: 34px;
  }

  .trust-card {
    max-width: 1040px;
    margin: -36px auto 0;
  }

  .trust-list,
  .action-list,
  .news-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .card-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .service-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .pill-grid {
    grid-template-columns: repeat(6, 1fr);
  }

  .project-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .obituary-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .featured-grid {
    grid-template-columns: 1.35fr 0.85fr;
    align-items: stretch;
  }

  .featured-side {
    grid-template-rows: 1fr 1fr;
  }

  .featured-main {
    padding: 34px;
  }

  .featured-main h3 {
    font-size: 34px;
  }

  .mayor-card,
  .report-card {
    max-width: 1120px;
    margin-left: auto;
    margin-right: auto;
  }

  .full-mobile {
    width: auto;
  }
}