/* ============================================
   Vivons nos Quartiers — Site vitrine
   Palette officielle :
     - Bleu marine : #1f4582
     - Bleu clair  : #1f78b8
     - Beige doux  : #f5efe4
     - Crème       : #fbf8f2
   ============================================ */

:root {
  --blue-dark: #1f4582;
  --blue: #1f78b8;
  --blue-light: #e8f1fa;
  --beige: #f5efe4;
  --cream: #fbf8f2;
  --ink: #1a2840;
  --ink-soft: #4a5a75;
  --white: #ffffff;
  --shadow-sm: 0 2px 6px rgba(31, 69, 130, 0.06);
  --shadow-md: 0 8px 24px rgba(31, 69, 130, 0.10);
  --shadow-lg: 0 20px 50px rgba(31, 69, 130, 0.15);
  --radius: 14px;
  --radius-lg: 22px;
  --max-w: 1180px;
  --transition: 200ms ease;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--blue-dark);
  text-decoration: none;
  transition: color var(--transition);
}

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

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

.center {
  text-align: center;
}

/* ===== TYPOGRAPHIE ===== */

h1, h2, h3 {
  color: var(--blue-dark);
  line-height: 1.2;
  margin: 0 0 0.5em;
  font-weight: 800;
}

h1 {
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 900;
  letter-spacing: -0.02em;
}

h2.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  margin-bottom: 0.5em;
}

h3 {
  font-size: 1.25rem;
}

p {
  margin: 0 0 1em;
}

.eyebrow {
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  font-weight: 700;
  color: var(--blue);
  margin: 0 0 0.8em;
}

.lead {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 720px;
  margin-bottom: 2.5em;
}

.lead.center {
  margin-left: auto;
  margin-right: auto;
}

/* ===== BOUTONS ===== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
  text-decoration: none;
  font-family: inherit;
}

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

.btn-primary:hover {
  background: var(--blue);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-ghost {
  background: transparent;
  color: var(--blue-dark);
  border-color: var(--blue-dark);
}

.btn-ghost:hover {
  background: var(--blue-dark);
  color: var(--white);
}

.btn-block {
  width: 100%;
}

.btn.is-disabled {
  background: #c5d0e0;
  color: var(--white);
  cursor: not-allowed;
  pointer-events: none;
  opacity: 0.85;
}

/* ===== HEADER ===== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 248, 242, 0.92);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid rgba(31, 69, 130, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--blue-dark);
  font-weight: 800;
}

.brand-mark {
  width: 40px;
  height: 40px;
}

.brand-text {
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

.brand-q {
  color: var(--blue);
}

.primary-nav {
  display: flex;
  gap: 28px;
  align-items: center;
}

.primary-nav a {
  font-weight: 600;
  color: var(--ink);
  font-size: 0.98rem;
  position: relative;
}

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

.primary-nav a:last-child {
  background: var(--blue-dark);
  color: var(--white);
  padding: 9px 18px;
  border-radius: 999px;
}

.primary-nav a:last-child:hover {
  background: var(--blue);
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  background: none;
  border: 0;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  align-items: center;
  justify-content: center;
}

.nav-toggle span {
  width: 24px;
  height: 2.5px;
  background: var(--blue-dark);
  border-radius: 2px;
  transition: all var(--transition);
}

/* ===== HERO ===== */

.hero {
  position: relative;
  padding: 80px 0 60px;
  background: linear-gradient(180deg, var(--cream) 0%, var(--beige) 100%);
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-text h1 {
  margin-bottom: 0.3em;
}

.hero-q {
  color: var(--blue);
  position: relative;
}

.hero-baseline {
  font-size: 1.3rem;
  color: var(--ink-soft);
  margin-bottom: 2em;
  max-width: 520px;
}

.hero-ctas {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-logo {
  width: 100%;
  max-width: 320px;
  height: auto;
  filter: drop-shadow(0 20px 40px rgba(31, 69, 130, 0.15));
  animation: float 6s ease-in-out infinite;
}

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

.skyline {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 80px;
  pointer-events: none;
}

.skyline-illustration {
  display: block;
  width: 100%;
  max-width: 1400px;
  margin: 40px auto 0;
  padding: 0 24px;
  height: auto;
  pointer-events: none;
}

/* ===== SECTIONS ===== */

.section {
  padding: 90px 0;
}

.section-mission {
  background: var(--white);
  text-align: center;
}

.keywords {
  list-style: none;
  padding: 0;
  margin: 30px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.keywords li {
  padding: 8px 18px;
  background: var(--blue-light);
  color: var(--blue-dark);
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all var(--transition);
}

.keywords li:hover {
  background: var(--blue-dark);
  color: var(--white);
  transform: translateY(-2px);
}

.quartiers-intro,
.keywords-intro {
  margin: 30px 0 12px;
  font-weight: 700;
  color: var(--blue-dark);
  font-size: 1rem;
  letter-spacing: 0.02em;
}

.keywords--quartiers li {
  background: var(--blue-dark);
  color: var(--white);
}

.keywords--quartiers li:hover {
  background: var(--blue);
}

/* ===== ACTUALITÉS / BLOG ===== */

.page-hero {
  padding: 80px 0 40px;
  background: linear-gradient(180deg, var(--cream) 0%, var(--beige) 100%);
  text-align: center;
}

.page-hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
}

.page-hero .lead {
  margin-left: auto;
  margin-right: auto;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
  margin: 40px 0;
}

.news-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}

.news-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.news-card-media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--blue-light);
  position: relative;
}

.news-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 400ms ease;
}

.news-card:hover .news-card-media img {
  transform: scale(1.04);
}

.news-card-body {
  padding: 24px 26px 28px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.news-card-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin-bottom: 10px;
}

.news-card-meta time {
  font-weight: 600;
  color: var(--blue);
}

.news-card-tag {
  background: var(--blue-light);
  color: var(--blue-dark);
  padding: 2px 10px;
  border-radius: 999px;
  font-weight: 600;
}

.news-card h2 {
  font-size: 1.3rem;
  margin: 0 0 12px;
  color: var(--blue-dark);
  line-height: 1.3;
}

.news-card p {
  color: var(--ink-soft);
  margin: 0;
  font-size: 0.97rem;
  flex: 1;
}

.news-card-footer {
  margin-top: 16px;
  font-size: 0.9rem;
  color: var(--blue);
  font-weight: 700;
}

/* Bouton retour accueil */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 24px;
  font-weight: 600;
  color: var(--blue-dark);
}

.back-link:hover {
  color: var(--blue);
}

/* ===== ACTIONS / CARDS ===== */

.section-actions {
  background: var(--beige);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
  margin-top: 20px;
}

.card {
  background: var(--white);
  padding: 32px 28px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  border: 1px solid rgba(31, 69, 130, 0.05);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: rgba(31, 120, 184, 0.2);
}

.card-icon {
  width: 52px;
  height: 52px;
  background: var(--blue-light);
  color: var(--blue-dark);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.card-icon svg {
  width: 26px;
  height: 26px;
}

.card h3 {
  margin-bottom: 10px;
  font-size: 1.2rem;
}

.card p {
  color: var(--ink-soft);
  margin: 0;
  font-size: 0.97rem;
}

/* ===== BUREAU ===== */

.section-bureau {
  background: var(--white);
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 22px;
  margin-top: 20px;
}

.team-card {
  background: var(--cream);
  padding: 30px 24px;
  border-radius: var(--radius);
  text-align: center;
  transition: all var(--transition);
}

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

.team-avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: var(--blue-light);
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.team-avatar img {
  width: 60%;
  height: 60%;
  object-fit: contain;
  opacity: 0.7;
}

.team-card h3 {
  margin-bottom: 4px;
  font-size: 1.1rem;
}

.team-role {
  color: var(--blue);
  font-weight: 600;
  margin: 0;
  font-size: 0.95rem;
}

/* ===== ADHÉSION ===== */

.section-adhesion {
  background: linear-gradient(180deg, var(--beige) 0%, var(--cream) 100%);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin: 40px 0;
  align-items: stretch;
}

.pricing-card {
  background: var(--white);
  padding: 36px 28px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 2px solid transparent;
  transition: all var(--transition);
  position: relative;
  display: flex;
  flex-direction: column;
}

.pricing-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.pricing-card--featured {
  border-color: var(--blue);
  box-shadow: var(--shadow-md);
  transform: scale(1.03);
}

.pricing-card--featured:hover {
  transform: scale(1.03) translateY(-6px);
}

.pricing-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--blue);
  color: var(--white);
  padding: 5px 16px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-radius: 999px;
  white-space: nowrap;
}

.pricing-name {
  font-size: 1.3rem;
  color: var(--blue-dark);
  margin-bottom: 4px;
}

.pricing-sub {
  font-size: 0.92rem;
  color: var(--ink-soft);
  min-height: 2.5em;
  margin-bottom: 20px;
}

.pricing-price {
  margin: 0 0 24px;
  display: flex;
  align-items: baseline;
  gap: 4px;
  color: var(--blue-dark);
}

.pricing-price .amount {
  font-size: 3.4rem;
  font-weight: 900;
  line-height: 1;
}

.pricing-price .currency {
  font-size: 1.6rem;
  font-weight: 700;
}

.pricing-price .period {
  font-size: 1rem;
  color: var(--ink-soft);
  font-weight: 600;
  margin-left: 6px;
}

.pricing-features {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  flex: 1;
}

.pricing-features li {
  padding: 6px 0 6px 26px;
  position: relative;
  color: var(--ink);
  font-size: 0.97rem;
}

.pricing-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 6px;
  color: var(--blue);
  font-weight: 900;
}

.pricing-note {
  font-size: 0.82rem;
  color: var(--ink-soft);
  text-align: center;
  margin: 14px 0 0;
}

/* Adhésion fallback (chèque) */
.adhesion-fallback {
  margin-top: 50px;
  padding: 36px;
  background: var(--white);
  border-radius: var(--radius-lg);
  text-align: center;
  border: 1px dashed rgba(31, 120, 184, 0.3);
}

.adhesion-fallback h3 {
  margin-bottom: 10px;
}

.adhesion-fallback .hint {
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin-top: 16px;
}

.adhesion-fallback code {
  background: var(--blue-light);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}

/* ===== CONTACT ===== */

.section-contact {
  background: var(--blue-dark);
  color: var(--white);
}

.section-contact .eyebrow {
  color: #8fb8e0;
}

.section-contact h2 {
  color: var(--white);
}

.section-contact .lead {
  color: rgba(255, 255, 255, 0.85);
}

.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.contact-email {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 20px 0 30px;
}

.contact-email a {
  color: var(--white);
  border-bottom: 2px solid rgba(255, 255, 255, 0.3);
}

.contact-email a:hover {
  color: var(--white);
  border-bottom-color: var(--white);
}

.socials {
  display: flex;
  gap: 14px;
}

.socials a {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  transition: all var(--transition);
}

.socials a:hover {
  background: var(--white);
  color: var(--blue-dark);
  transform: translateY(-3px);
}

.socials svg {
  width: 20px;
  height: 20px;
}

.contact-form {
  background: var(--white);
  padding: 36px;
  border-radius: var(--radius-lg);
  color: var(--ink);
  box-shadow: var(--shadow-lg);
}

.contact-form label {
  display: block;
  margin-bottom: 16px;
}

.contact-form label span {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 0.92rem;
  color: var(--blue-dark);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid rgba(31, 69, 130, 0.15);
  border-radius: 10px;
  font-family: inherit;
  font-size: 1rem;
  background: var(--cream);
  transition: all var(--transition);
  color: var(--ink);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--blue);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(31, 120, 184, 0.15);
}

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

.contact-form button {
  margin-top: 8px;
  width: 100%;
}

.form-hint {
  margin: 14px 0 0;
  font-size: 0.82rem;
  color: var(--ink-soft);
  text-align: center;
}

.form-hint code {
  background: var(--blue-light);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}

/* ===== FOOTER ===== */

.site-footer {
  background: #142d56;
  color: rgba(255, 255, 255, 0.85);
  padding: 50px 0 30px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.footer-brand {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.footer-brand .brand-mark {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

.footer-text {
  font-size: 0.94rem;
  line-height: 1.5;
  margin: 0;
}

.footer-text strong {
  color: var(--white);
  font-size: 1.1rem;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-nav a {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.94rem;
}

.footer-nav a:hover {
  color: var(--white);
}

.footer-legal {
  font-size: 0.85rem;
  text-align: right;
}

.footer-legal a {
  color: var(--white);
}

.footer-legal p {
  margin: 0 0 6px;
}

/* ===== RESPONSIVE ===== */

@media (max-width: 900px) {
  .hero-inner,
  .contact-inner,
  .footer-inner {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .hero-visual {
    order: -1;
  }

  .hero-logo {
    max-width: 200px;
  }

  .footer-legal {
    text-align: left;
  }

  .pricing-card--featured {
    transform: none;
  }

  .pricing-card--featured:hover {
    transform: translateY(-6px);
  }

  .section {
    padding: 60px 0;
  }
}

@media (max-width: 700px) {
  .nav-toggle {
    display: flex;
  }

  .primary-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--white);
    padding: 20px 24px;
    gap: 6px;
    box-shadow: var(--shadow-md);
    transform: translateY(-10px);
    opacity: 0;
    pointer-events: none;
    transition: all var(--transition);
  }

  .primary-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .primary-nav a {
    padding: 10px 0;
    width: 100%;
  }

  .primary-nav a:last-child {
    text-align: center;
    margin-top: 8px;
  }

  .brand-text {
    font-size: 1rem;
  }

  .hero {
    padding: 50px 0 40px;
  }

  .hero-ctas {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-ctas .btn {
    width: 100%;
  }
}

/* ===== ACCESSIBILITÉ — Reduce motion ===== */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}
