/* ============================================
   Commune de Cormoyeux — feuille de style
   ============================================ */

:root {
  --navy: #1a3a5c;
  --navy-dark: #112740;
  --navy-light: #2c5485;
  --gold: #b8945f;
  --gold-light: #d4b785;
  --cream: #faf8f3;
  --bg: #ffffff;
  --bg-soft: #f7f5f0;
  --text: #1a1a1a;
  --text-soft: #4a4a4a;
  --muted: #7a7a7a;
  --border: #e8e5dc;
  --border-soft: #f0ede5;
  --shadow: 0 1px 3px rgba(26, 58, 92, 0.04), 0 8px 24px rgba(26, 58, 92, 0.06);
  --shadow-lg: 0 4px 12px rgba(26, 58, 92, 0.08), 0 24px 48px rgba(26, 58, 92, 0.10);
  --radius: 4px;
  --radius-lg: 8px;
  --max-width: 1240px;
  --transition: 0.25s ease;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a { color: var(--navy); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold); }

h1, h2, h3, h4 {
  font-family: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  font-weight: 500;
  line-height: 1.2;
  color: var(--navy);
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 500; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.15rem; font-weight: 600; font-family: 'Inter', sans-serif; letter-spacing: 0; }

p { margin: 0 0 1em; color: var(--text-soft); }

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

/* ============================================
   En-tête / Navigation
   ============================================ */
.topbar {
  background: var(--navy-dark);
  color: rgba(255,255,255,0.85);
  font-size: 0.82rem;
  padding: 8px 0;
}
.topbar-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.topbar a { color: rgba(255,255,255,0.85); }
.topbar a:hover { color: var(--gold-light); }
.topbar span { display: inline-flex; align-items: center; gap: 6px; }

.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
  background: rgba(255, 255, 255, 0.95);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  gap: 32px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--navy);
}
.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--cream);
  display: grid;
  place-items: center;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 2px solid var(--gold);
}
.brand-text { line-height: 1.1; }
.brand-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.brand-sub {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin-top: 2px;
}

.main-nav { display: flex; gap: 2px; align-items: center; }
.main-nav > .nav-item { position: relative; }
.main-nav > .nav-item > a,
.main-nav > .nav-item > button {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
  padding: 10px 14px;
  border-radius: var(--radius);
  position: relative;
  transition: all var(--transition);
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  white-space: nowrap;
}
.main-nav > .nav-item > a:hover,
.main-nav > .nav-item > button:hover,
.main-nav > .nav-item:hover > button,
.main-nav > .nav-item:hover > a { color: var(--navy); background: var(--bg-soft); }
.main-nav > .nav-item > a.active,
.main-nav > .nav-item > button.active { color: var(--navy); }
.main-nav > .nav-item > a.active::after,
.main-nav > .nav-item > button.active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 18px;
  height: 2px;
  background: var(--gold);
}
.main-nav .caret {
  width: 9px;
  height: 9px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  opacity: 0.6;
  transition: transform var(--transition);
}
.main-nav .nav-item:hover .caret { transform: rotate(225deg) translateY(0); opacity: 0.9; }

/* Submenus */
.submenu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 280px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 10px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s ease;
  z-index: 200;
  margin-top: 4px;
}
.nav-item:hover > .submenu,
.nav-item:focus-within > .submenu { opacity: 1; visibility: visible; transform: translateY(0); }
.submenu a {
  display: block;
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 0.88rem;
  color: var(--text);
  text-decoration: none;
  transition: all var(--transition);
  line-height: 1.3;
}
.submenu a:hover { background: var(--bg-soft); color: var(--navy); padding-left: 18px; }
.submenu .submenu-group {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--gold);
  font-weight: 600;
  padding: 12px 14px 6px;
  margin-top: 4px;
  border-top: 1px solid var(--border-soft);
}
.submenu .submenu-group:first-child { margin-top: 0; border-top: 0; padding-top: 6px; }
.submenu.right-aligned { left: auto; right: 0; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 12px;
  cursor: pointer;
  color: var(--navy);
  font-family: inherit;
}

@media (max-width: 1080px) {
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg);
    border-top: 1px solid var(--border);
    padding: 12px;
    gap: 0;
    display: none;
    box-shadow: var(--shadow);
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    align-items: stretch;
  }
  .main-nav.open { display: flex; }
  .main-nav > .nav-item { width: 100%; }
  .main-nav > .nav-item > a,
  .main-nav > .nav-item > button { width: 100%; padding: 14px 16px; justify-content: space-between; }
  .submenu {
    position: static;
    box-shadow: none;
    border: none;
    border-left: 2px solid var(--border);
    border-radius: 0;
    margin: 0 0 8px 16px;
    padding: 4px 0 4px 8px;
    opacity: 1;
    visibility: visible;
    transform: none;
    min-width: 0;
    display: none;
  }
  .nav-item.open > .submenu { display: block; }
  .submenu a { padding: 10px 14px; }
  .nav-toggle { display: block; }
}

/* ============================================
   Hero
   ============================================ */
.hero {
  position: relative;
  min-height: 580px;
  display: grid;
  align-items: center;
  background:
    linear-gradient(270deg, rgba(17,39,64,0.62) 0%, rgba(17,39,64,0.35) 55%, rgba(17,39,64,0.10) 100%),
    url("images/vue-aerienne-cormoyeux.jpg") center/cover no-repeat,
    radial-gradient(ellipse at top right, #4a7eb5, #1a3a5c 70%);
  color: var(--cream);
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(45deg, transparent 0 12px, rgba(255,255,255,0.025) 12px 13px);
  opacity: 0.25;
  pointer-events: none;
}
.hero-inner {
  position: relative;
  padding: 90px 0 100px;
  max-width: 620px;
  margin-left: auto;
  margin-right: 0;
  text-align: left;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--gold-light);
  margin-bottom: 24px;
  font-weight: 500;
}
.hero-eyebrow::before {
  content: '';
  width: 28px;
  height: 1px;
  background: var(--gold);
}
.hero h1 {
  color: var(--cream);
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  margin-bottom: 24px;
  font-weight: 400;
}
.hero h1 em {
  font-style: italic;
  color: var(--gold-light);
  font-weight: 400;
}
.hero-lead {
  font-size: 1.12rem;
  color: rgba(250, 248, 243, 0.85);
  max-width: 580px;
  line-height: 1.7;
  margin-bottom: 36px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}
.btn-primary {
  background: var(--gold);
  color: var(--navy-dark);
}
.btn-primary:hover { background: var(--gold-light); color: var(--navy-dark); transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  color: var(--cream);
  border-color: rgba(250,248,243,0.4);
}
.btn-ghost:hover { background: rgba(255,255,255,0.08); color: var(--cream); border-color: var(--cream); }
.btn-outline {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}
.btn-outline:hover { background: var(--navy); color: var(--cream); }

/* ============================================
   Page header (pages internes)
   ============================================ */
.page-header {
  background: var(--bg-soft);
  padding: 70px 0 50px;
  border-bottom: 1px solid var(--border);
}
.page-header .breadcrumb {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 14px;
}
.page-header .breadcrumb a { color: var(--muted); }
.page-header .breadcrumb a:hover { color: var(--navy); }
.page-header h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
}
.page-header .lead {
  margin-top: 14px;
  max-width: 720px;
  font-size: 1.05rem;
  color: var(--text-soft);
}

/* ============================================
   Sections génériques
   ============================================ */
section { padding: 80px 0; }
section.tight { padding: 60px 0; }

.section-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 56px;
}
.section-title .eyebrow {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--gold);
  margin-bottom: 14px;
  font-weight: 600;
}
.section-title h2 { margin: 0 0 14px; }
.section-title p {
  max-width: 600px;
  color: var(--text-soft);
  font-size: 1.02rem;
}

.divider {
  width: 50px;
  height: 2px;
  background: var(--gold);
  margin: 0 auto 24px;
}

/* ============================================
   Quick links / Accès rapides
   ============================================ */
.quick-strip {
  background: var(--cream);
  border-bottom: 1px solid var(--border);
  padding: 28px 0;
}
.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.quick-item {
  background: var(--cream);
  padding: 22px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  color: var(--text);
  transition: background var(--transition);
}
.quick-item:hover { background: #fff; color: var(--navy); }
.quick-icon {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--bg-soft);
  display: grid; place-items: center;
  color: var(--navy);
  flex-shrink: 0;
}
.quick-item:hover .quick-icon { background: var(--navy); color: var(--gold-light); }
.quick-text { line-height: 1.2; }
.quick-text strong { display: block; font-size: 0.95rem; color: var(--navy); }
.quick-text small { font-size: 0.78rem; color: var(--muted); }

@media (max-width: 800px) { .quick-grid { grid-template-columns: repeat(2, 1fr); } }

/* ============================================
   Cartes / Grilles
   ============================================ */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 36px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
@media (max-width: 960px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); border-color: var(--gold-light); }
.card-image {
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, var(--navy-light), var(--navy));
  position: relative;
  overflow: hidden;
}
.card-image svg { width: 100%; height: 100%; display: block; }
.card-body { padding: 26px 28px 28px; flex: 1; display: flex; flex-direction: column; }
.card-tag {
  display: inline-block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 10px;
}
.card h3 { margin: 0 0 10px; font-size: 1.35rem; }
.card p { color: var(--text-soft); font-size: 0.94rem; flex: 1; }
.card-link {
  margin-top: 14px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--navy);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.card-link::after { content: '→'; transition: transform var(--transition); }
.card:hover .card-link::after { transform: translateX(4px); }

/* ============================================
   Grand bloc texte / image
   ============================================ */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.split.reverse > :first-child { order: 2; }
.split-image {
  aspect-ratio: 4 / 5;
  background: var(--bg-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
}
.split-image svg { width: 100%; height: 100%; }
.split-content .eyebrow {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--gold);
  margin-bottom: 14px;
  font-weight: 600;
}
@media (max-width: 800px) {
  .split { grid-template-columns: 1fr; gap: 36px; }
  .split.reverse > :first-child { order: 0; }
}

/* ============================================
   Stats
   ============================================ */
.stats {
  background: var(--navy);
  color: var(--cream);
  padding: 64px 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  text-align: center;
}
.stat-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 3rem;
  color: var(--gold-light);
  line-height: 1;
  font-weight: 500;
  margin-bottom: 8px;
}
.stat-lbl {
  font-size: 0.85rem;
  color: rgba(250, 248, 243, 0.75);
  text-transform: uppercase;
  letter-spacing: 0.18em;
}
@media (max-width: 700px) { .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 36px; } }

/* ============================================
   Tableaux
   ============================================ */
.info-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
}
.info-table th, .info-table td {
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}
.info-table th {
  background: var(--bg-soft);
  font-weight: 600;
  color: var(--navy);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ============================================
   Encadrés
   ============================================ */
.callout {
  background: var(--bg-soft);
  border-left: 3px solid var(--gold);
  padding: 24px 28px;
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  margin: 28px 0;
}
.callout h4 { margin-top: 0; color: var(--navy); }
.callout p:last-child { margin-bottom: 0; }

.contact-card {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
}
.contact-card h3 {
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 18px;
}
.contact-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-soft);
}
.contact-row:last-child { border-bottom: 0; }
.contact-row .icon {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: #fff;
  display: grid; place-items: center;
  color: var(--navy);
  flex-shrink: 0;
}
.contact-row strong { display: block; color: var(--navy); font-size: 0.95rem; }
.contact-row span { color: var(--text-soft); font-size: 0.92rem; }

/* ============================================
   Liste vignerons
   ============================================ */
.vigneron-list { list-style: none; padding: 0; margin: 0; }
.vigneron {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
}
.vigneron:last-child { border-bottom: 0; }
.vigneron-num {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  display: grid; place-items: center;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  color: var(--navy);
}
.vigneron-info h4 { margin: 0 0 4px; font-size: 1.1rem; color: var(--navy); font-family: 'Cormorant Garamond', serif; font-weight: 600; }
.vigneron-info p { margin: 0; font-size: 0.9rem; color: var(--text-soft); }
.vigneron-tag {
  font-size: 0.72rem;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}
@media (max-width: 600px) {
  .vigneron { grid-template-columns: auto 1fr; }
  .vigneron-tag { grid-column: 2; justify-self: start; }
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
  background: var(--navy-dark);
  color: rgba(250, 248, 243, 0.7);
  padding: 70px 0 30px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 50px;
}
.footer-brand .brand-name { color: var(--cream); }
.footer-brand .brand-sub { color: var(--gold-light); }
.footer-brand p { font-size: 0.92rem; line-height: 1.7; color: rgba(250, 248, 243, 0.65); margin-top: 18px; max-width: 320px; }
.footer-col h4 {
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--gold-light);
  font-weight: 600;
  margin-bottom: 18px;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: rgba(250, 248, 243, 0.7); font-size: 0.92rem; }
.footer-col a:hover { color: var(--gold-light); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 0.82rem;
  color: rgba(250, 248, 243, 0.5);
}
@media (max-width: 800px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
  .footer-brand { grid-column: 1 / -1; }
}

/* ============================================
   Décorations SVG
   ============================================ */
.svg-illust { width: 100%; height: 100%; display: block; }

/* ============================================
   Utilitaires
   ============================================ */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.bg-cream { background: var(--cream); }
.bg-soft { background: var(--bg-soft); }
.no-pad-top { padding-top: 0; }
