/* ============================================================
   Écogîte — styles globaux (composants + habillage)
   Palette : vert forêt #4a7c59 / vert profond #2d4a35 /
             ocre #d9a566 / crème #f9f7f2 / encre #333333
   ============================================================ */

:root {
  --forest: #4a7c59;
  --forest-dark: #2d4a35;
  --ocre: #d9a566;
  --cream: #f9f7f2;
  --ink: #333333;
  --white: #ffffff;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Lato', sans-serif;
  color: var(--ink);
  background-color: var(--cream);
  line-height: 1.6;
}

h1, h2, h3, h4, h5 {
  font-family: 'Playfair Display', serif;
  color: var(--forest);
}

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

/* ---------- En-tête ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(6px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.brand img {
  width: 50px;
  height: 50px;
}

.brand-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--forest);
}

.nav-list {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 1.2rem;
}

.nav-list a {
  text-decoration: none;
  color: var(--forest);
  font-weight: 600;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.nav-list a:hover,
.nav-list a[aria-current="page"] {
  color: var(--forest-dark);
  border-bottom-color: var(--forest-dark);
}

.has-children {
  position: relative;
}

.subnav {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 230px;
  background: var(--white);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  padding: 0.5rem 0;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
}

.has-children:hover .subnav,
.has-children:focus-within .subnav {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.subnav a {
  display: block;
  padding: 0.5rem 1.1rem;
}

.subnav a:hover {
  background: var(--cream);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.35rem;
}

.menu-toggle span {
  width: 26px;
  height: 3px;
  background: var(--forest);
  border-radius: 2px;
}

/* ---------- Hero ---------- */
.hero {
  min-height: 72vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white);
  background-size: cover;
  background-position: center;
  position: relative;
  padding: 7rem 1.5rem 4rem;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.45));
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero h1 {
  color: var(--white);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.15;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.hero p {
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  max-width: 720px;
  margin: 1rem auto 1.75rem;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
}

.hero-compact {
  min-height: 46vh;
  padding-top: 8rem;
  padding-bottom: 3rem;
}

/* ---------- Boutons ---------- */
.btn {
  display: inline-block;
  background: var(--forest);
  color: var(--white);
  padding: 0.85rem 1.9rem;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.25s, transform 0.25s;
}

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

.btn-ocre {
  background: var(--ocre);
  color: var(--forest-dark);
}

.btn-ocre:hover {
  background: #c9934e;
}

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

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* ---------- Sections & conteneurs ---------- */
.section {
  padding: 4.5rem 0;
}

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

.section-title {
  font-size: clamp(1.9rem, 3vw, 2.5rem);
  text-align: center;
  margin-bottom: 2rem;
}

/* ---------- Cartes ---------- */
.card {
  background: var(--white);
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

.card img {
  width: 100%;
  object-fit: cover;
  display: block;
}

.card-body {
  padding: 1.5rem;
}

/* ---------- Formulaire ---------- */
.form-card {
  background: var(--white);
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  padding: 2rem;
}

.field {
  margin-bottom: 1.25rem;
}

label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 700;
  color: var(--forest);
}

input,
select,
textarea {
  width: 100%;
  padding: 0.8rem 0.9rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  background: var(--white);
  color: var(--ink);
}

textarea {
  resize: vertical;
  min-height: 140px;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--forest);
  outline-offset: 1px;
  border-color: var(--forest);
}

.form-note {
  font-size: 0.9rem;
  color: #666;
  margin-top: 0.75rem;
}

/* ---------- Pied de page ---------- */
.site-footer {
  background: var(--forest-dark);
  color: var(--white);
  padding: 3rem 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  padding-bottom: 2rem;
}

.site-footer h3 {
  color: var(--white);
  font-size: 1.15rem;
  margin-bottom: 1rem;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  display: block;
  margin-bottom: 0.55rem;
  transition: color 0.2s;
}

.site-footer a:hover {
  color: var(--ocre);
}

.site-footer .footer-social {
  display: flex;
  gap: 0.75rem;
}

.site-footer .footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  font-weight: 700;
  margin-bottom: 0;
}

.site-footer .footer-social a:hover {
  background: rgba(255, 255, 255, 0.22);
}

.copyright {
  text-align: center;
  padding: 1.25rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.9rem;
}

.copyright a {
  display: inline;
  margin: 0 0.2rem;
}

/* ---------- Apparition au défilement ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- Accessibilité ---------- */
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--ocre);
  outline-offset: 2px;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .menu-toggle {
    display: flex;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
    display: none;
    padding: 1rem 1.5rem;
  }

  .site-nav.open {
    display: block;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
  }

  .has-children {
    position: static;
  }

  .subnav {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    padding: 0.25rem 0 0.5rem 1.1rem;
  }
}
