:root {
  --ink: #123F3A;
  --ink-soft: rgba(18, 63, 58, 0.65);
  --mango: #FA9509;
  --mango-dark: #E67D00;
  --mango-50: #FFF7ED;
  --mango-100: #FFEAD2;
  --hibiscus: #F0295D;
  --hibiscus-dark: #C4184A;
  --cream: #ffffff;
  --white: #ffffff;
  --radius: 18px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

.font-logo { font-family: 'Poppins', sans-serif; }

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

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

.section-container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* NAV */
.navbar {
  background: var(--white);
  border-bottom: 1px solid var(--mango-100);
  position: sticky;
  top: 0;
  z-index: 100;
}

#habitants, #comment-ca-marche, #mairies, #faq, #contact {
  scroll-margin-top: 72px;
}

.nav-container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo { display: flex; align-items: center; gap: 0.5rem; }
.nav-logo img { height: 34px; width: auto; }

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 1.75rem;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
  opacity: 0.75;
  transition: opacity 0.15s;
}

.nav-links a:hover, .nav-links a.active { opacity: 1; }

.nav-cta {
  background: var(--ink);
  color: var(--white) !important;
  padding: 0.5rem 1.1rem;
  border-radius: 10px;
  opacity: 1 !important;
}

.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
}

.burger span {
  width: 24px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: 0.2s;
}

/* HERO */
.hero {
  position: relative;
  padding: 4.5rem 1.5rem;
  color: var(--white);
  background-image:
    linear-gradient(135deg, rgba(250, 149, 9, 0.88), rgba(240, 41, 93, 0.85)),
    url('img/hero-bg.jpg');
  background-size: cover;
  background-position: center;
  isolation: isolate;
}

.hero-content {
  max-width: 960px;
  margin: 0 auto;
  text-align: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.18);
  color: var(--white);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0.4rem 0.9rem;
  border-radius: 8px;
  margin-bottom: 1.25rem;
}

.hero h1 {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(1.7rem, 5.5vw, 2.9rem);
  font-weight: 800;
  line-height: 1.18;
  margin: 0 0 1rem;
  color: var(--white);
}

.hero h1 span { color: var(--white); }

.hero p {
  max-width: 520px;
  margin: 0 auto 1.75rem;
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.92);
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.hero .btn-mango { background: var(--white); color: var(--mango-dark); }
.hero .btn-outline { border-color: var(--white); color: var(--white); }

/* PHONE MOCKUP (placeholder pour capture d'écran réelle) */
.phone-mockup {
  position: relative;
  width: 240px;
  margin: 0 auto;
  border: 10px solid var(--ink);
  border-radius: 32px;
  background: var(--mango-50);
  aspect-ratio: 9 / 18.5;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.25rem;
}

.phone-mockup::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 46px;
  height: 5px;
  border-radius: 3px;
  background: var(--ink);
}

.phone-mockup span {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-soft);
  border: 1.5px dashed var(--mango-200, #FFD4A3);
  border-radius: 12px;
  padding: 1.5rem 1rem;
}

/* PHONE SCREENSHOT (vraie capture d'écran, déjà encadrée dans le visuel) */
.phone-shot {
  width: 100%;
  max-width: 260px;
  margin: 0 auto;
  filter: drop-shadow(0 20px 30px rgba(18, 63, 58, 0.18));
}

/* DEVICE MOCKUP SHOT (visuel large ordinateur/tablette/smartphone) */
.device-shot {
  width: 100%;
  max-width: 400px;
  height: auto;
  margin: 0 auto;
  display: block;
  filter: drop-shadow(0 20px 30px rgba(18, 63, 58, 0.18));
}

/* PHONE SCREENSHOT ANNOTEE (flèches + étiquettes, grand écran uniquement) */
.phone-annotated {
  position: relative;
  width: 100%;
  max-width: 260px;
  margin: 0 auto;
}

.phone-annotated .phone-shot { max-width: none; margin: 0; }

.annotate-labels { display: none; }

.annotate-label {
  display: none;
  font-family: 'Inter', sans-serif;
  text-align: center;
  cursor: pointer;
  animation: annotate-float 3.6s ease-in-out infinite;
}

@keyframes annotate-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.annotate-label--tl { animation-delay: 0s; }
.annotate-label--mr { animation-delay: 0.9s; }
.annotate-label--bl { animation-delay: 1.8s; }
.annotate-label--br { animation-delay: 2.7s; }

@media (prefers-reduced-motion: reduce) {
  .annotate-label { animation: none; }
}

.annotate-label .annotate-title {
  display: block;
  background: var(--white);
  border: 2px solid var(--white);
  border-radius: 8px;
  padding: 0.4rem 0.6rem;
  box-shadow: 0 4px 12px rgba(18, 63, 58, 0.2), 0 1px 3px rgba(18, 63, 58, 0.14);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--mango-dark);
  line-height: 1.25;
  text-align: center;
}

/* Grand écran : pastilles positionnées autour du téléphone */
@media (min-width: 1180px) {
  .annotate-labels { display: block; }
  .annotate-label { display: block; position: absolute; width: 108px; }
  .annotate-label--tl { top: 11%; right: calc(100% + 20px); }
  .annotate-label--mr { top: 41%; left: calc(100% + 20px); }
  .annotate-label--bl { top: 77%; right: calc(100% + 20px); }
  .annotate-label--br { top: 85%; left: calc(100% + 20px); }
}

/* Mobile : le téléphone garde sa taille normale, petites pastilles posées sur ses bords */
@media (max-width: 860px) {
  .annotate-labels { display: block; }

  .annotate-label {
    display: block;
    position: absolute;
    width: 92px;
    animation: none;
    z-index: 2;
  }

  .annotate-label--tl { top: 5%; left: -10px; }
  .annotate-label--mr { top: 37%; right: -10px; }
  .annotate-label--bl { top: 73%; left: -10px; }
  .annotate-label--br { top: 83%; right: -10px; }

  .annotate-label .annotate-title {
    font-size: 0.62rem;
    padding: 0.3rem 0.45rem;
  }
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.98rem;
  border: none;
  cursor: pointer;
  transition: transform 0.15s;
}

.btn:active { transform: scale(0.97); }

.btn-mango { background: var(--mango); color: var(--white); }
.btn-dark { background: var(--ink); color: var(--white); }
.btn-outline { background: transparent; color: var(--ink); border: 2px solid var(--ink); }

/* SECTIONS */
.section {
  padding: 5rem 0;
}

.section-alt {
  background: var(--mango-50);
}

.section-dark {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.85);
}

.section-dark .section-header h2,
.section-dark .steps h3 {
  color: var(--white);
}

.section-dark .section-header p,
.section-dark .steps p {
  color: rgba(255, 255, 255, 0.72);
}

.section-dark .steps li::before {
  background: rgba(255, 255, 255, 0.14);
  color: var(--mango);
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 3rem;
}

.section-tag {
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}

.section-tag.tag-hibiscus { color: var(--hibiscus-dark); }
.section-tag.tag-mango { color: var(--mango-dark); }

.section-header h2 {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(1.7rem, 3.5vw, 2.3rem);
  margin: 0 0 0.75rem;
}

.section-header p { color: var(--ink-soft); font-size: 1.05rem; margin: 0; }

/* FEATURE ROWS (liste habitants, à la place d'une grille de cartes) */
.feature-row {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.1rem 0;
  border-top: 1px solid var(--mango-100);
}

.feature-row:first-child { border-top: none; }

.feature-icon {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
}

.feature-icon svg { width: 21px; height: 21px; }

.feature-icon.mango { background: var(--mango); }
.feature-icon.hibiscus { background: var(--hibiscus); }
.feature-icon.ink { background: var(--ink); }

.feature-row h3 { margin: 0 0 0.25rem; font-size: 1.02rem; }
.feature-row p { margin: 0; color: var(--ink-soft); font-size: 0.92rem; line-height: 1.5; }

.card h3 { margin: 0 0 0.5rem; font-size: 1.1rem; }
.card p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; line-height: 1.5; }

/* MAIRIES SPLIT */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 1180px) {
  #habitants .split { gap: 6rem; }
}

.split-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 2rem;
}

.split-list li {
  display: flex;
  gap: 0.7rem;
  margin-bottom: 0.9rem;
  font-size: 0.98rem;
  color: var(--ink-soft);
}

.split-list li strong { color: var(--ink); }

.check {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--hibiscus);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.1rem;
}

.check svg { width: 13px; height: 13px; }

.info-card {
  background: var(--ink);
  color: var(--white);
  border-radius: 24px;
  padding: 2.25rem;
}

.info-card-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--mango);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.info-card-icon svg { width: 24px; height: 24px; color: var(--ink); }

.info-card h3 { font-family: 'Poppins', sans-serif; margin: 0 0 0.6rem; }
.info-card p { color: rgba(255,255,255,0.72); margin: 0; line-height: 1.6; }

/* CONTACT FORM */
.contact-form {
  max-width: 560px;
  margin: 0 auto;
  text-align: left;
  display: grid;
  gap: 1.1rem;
}

.contact-form label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink);
  margin-bottom: 0.4rem;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--mango-100);
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.98rem;
  color: var(--ink);
  background: var(--white);
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--mango);
}

.contact-form textarea { resize: vertical; min-height: 130px; }

.contact-form button { justify-self: center; margin-top: 0.25rem; }

.contact-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
}

@media (max-width: 480px) {
  .contact-form-row { grid-template-columns: 1fr; }
}

.contact-note { text-align: center; margin: 1.5rem 0 0; color: var(--ink-soft); font-size: 0.92rem; }
.contact-note a { color: var(--mango-dark); font-weight: 700; }

.contact-status {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 600;
}

.contact-status-success { background: var(--mango-50); color: var(--ink); border: 1.5px solid var(--mango-100); }
.contact-status-error { background: var(--mango-50); color: var(--hibiscus-dark); border: 1.5px solid var(--hibiscus); }
.contact-status-error a { color: var(--hibiscus-dark); text-decoration: underline; }

/* FAQ */
.faq-list { max-width: 760px; margin: 0 auto; }

.faq-item {
  border-bottom: 1px solid var(--mango-100);
  padding: 1.1rem 0;
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-weight: 700;
  font-size: 1rem;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: '+';
  flex-shrink: 0;
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--mango-dark);
  transition: transform 0.15s;
}

.faq-item[open] summary::after { transform: rotate(45deg); }

.faq-item p {
  margin: 0.85rem 0 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* PROSE (pages de contenu long : guide, à propos) */
.prose { max-width: 760px; margin: 0 auto; }
.prose-img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin: 0 0 2rem;
}
.prose h2 {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(1.3rem, 2.5vw, 1.6rem);
  margin: 2.5rem 0 1rem;
  color: var(--ink);
}
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.05rem; margin: 1.5rem 0 0.5rem; color: var(--ink); }
.prose p { color: var(--ink-soft); line-height: 1.75; margin: 0 0 1.1rem; font-size: 1.02rem; }
.prose ul, .prose ol { color: var(--ink-soft); line-height: 1.7; padding-left: 1.25rem; margin: 0 0 1.25rem; }
.prose li { margin-bottom: 0.5rem; }
.prose strong { color: var(--ink); }
.prose a { color: var(--hibiscus-dark); font-weight: 600; }
.prose a:hover { text-decoration: underline; }

/* STEPS (étapes numérotées, façon Gaspiz : colonnes horizontales, numéro en cercle au-dessus) */
.steps {
  list-style: none;
  padding: 0;
  margin: 1rem 0 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 2rem 1.5rem;
  counter-reset: step;
  text-align: center;
}

.steps li { display: flex; flex-direction: column; align-items: center; }

.steps li::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--mango-100);
  color: var(--mango-dark);
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.steps h3 { margin: 0 0 0.4rem; font-size: 1rem; }
.steps p { margin: 0; color: var(--ink-soft); font-size: 0.92rem; line-height: 1.5; }

/* BENEFIT GRID (page mairies : 3 blocs courts au lieu de longs paragraphes) */
.benefit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  text-align: center;
  margin-top: 1rem;
}

.benefit-card .feature-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  margin: 0 auto 1rem;
}

.benefit-card .feature-icon svg { width: 24px; height: 24px; }
.benefit-card h3 { font-family: 'Poppins', sans-serif; font-size: 1.05rem; margin: 0 0 0.5rem; }
.benefit-card p { color: var(--ink-soft); font-size: 0.95rem; line-height: 1.55; margin: 0; }

/* BLOG */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 1rem 0 3rem;
}

.blog-card {
  background: var(--white);
  border: 1px solid var(--mango-100);
  border-radius: var(--radius);
  overflow: hidden;
}

.blog-card-img { display: block; width: 100%; height: 180px; object-fit: cover; }
.blog-card-body { padding: 1.75rem; }
.blog-card .section-tag { margin-bottom: 0.75rem; }
.blog-card h3 { font-family: 'Poppins', sans-serif; font-size: 1.15rem; margin: 0 0 0.6rem; }
.blog-card p { color: var(--ink-soft); font-size: 0.95rem; line-height: 1.55; margin: 0 0 1rem; }
.blog-card .read-more { color: var(--hibiscus-dark); font-weight: 700; font-size: 0.92rem; }
.blog-card { display: block; text-decoration: none; transition: border-color 0.15s; }
.blog-card:hover { border-color: var(--hibiscus); }

/* DOWNLOAD PAGE */
.page-hero {
  padding: 3.5rem 1.5rem 3rem;
  text-align: center;
  background-image:
    linear-gradient(135deg, rgba(250, 149, 9, 0.88), rgba(240, 41, 93, 0.85)),
    url('img/hero-bg.jpg');
  background-size: cover;
  background-position: center;
  color: var(--white);
}

.breadcrumb {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 1rem;
}

.breadcrumb a { color: var(--white); font-weight: 600; }

.page-hero h1 {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  margin: 0 0 0.75rem;
  color: var(--white);
}

.page-hero p { max-width: 560px; margin: 0 auto; color: rgba(255, 255, 255, 0.92); }

.download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin: 3rem 0;
}

.download-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: 0 8px 24px rgba(18, 63, 58, 0.08);
}

.download-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--ink);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.download-icon svg { width: 28px; height: 28px; }

.download-card h3 { margin: 0 0 0.4rem; }
.download-card p { color: var(--ink-soft); font-size: 0.92rem; margin: 0 0 1.25rem; }

.notice-box {
  background: var(--mango-50);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
  box-shadow: 0 8px 24px rgba(250, 149, 9, 0.15);
}

.notice-box h4 { margin: 0 0 0.5rem; }
.notice-box p { margin: 0; color: var(--ink-soft); font-size: 0.92rem; }
.notice-box a { color: var(--mango-dark); font-weight: 700; }

/* FOOTER */
.footer {
  background: var(--ink);
  color: rgba(255,255,255,0.7);
  padding: 3.5rem 0 1.5rem;
  text-align: center;
}

.footer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
  margin-bottom: 2.5rem;
}

.footer-container img { height: 32px; }
.footer-container .footer-tagline { font-size: 0.9rem; line-height: 1.5; margin: 0; }

.footer-nav {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1.75rem;
  padding: 0;
  margin: 0;
}

.footer-nav li { font-size: 0.92rem; }
.footer-nav a:hover { color: var(--white); }

.footer-social { display: flex; gap: 0.75rem; }
.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  transition: background 0.15s;
}
.footer-social a:hover { background: var(--mango); }
.footer-social svg { width: 18px; height: 18px; }

.footer-bottom {
  max-width: 1120px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 0;
  border-top: 1px solid rgba(255,255,255,0.12);
  text-align: center;
  font-size: 0.78rem;
}

.footer-bottom p { margin: 0 0 0.6rem; }

.footer-legal {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  font-size: 0.78rem;
}
.footer-legal a:hover { color: var(--white); }

/* TABLET */
@media (max-width: 1024px) {
  .section { padding: 4rem 0; }
  .hero { padding: 4rem 1.5rem; }
  .split { gap: 2rem; }
}

/* MOBILE */
@media (max-width: 860px) {
  .phone-mockup, .phone-shot, .device-shot { order: -1; }
  .split { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .download-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .nav-links {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--cream);
    flex-direction: column;
    justify-content: flex-start;
    padding: 2rem 1.5rem;
    gap: 1.5rem;
    transform: translateX(100%);
    transition: transform 0.25s ease;
  }

  .nav-links.open { transform: translateX(0); }

  .burger { display: flex; }

  .nav-links a { font-size: 1.1rem; }
}
