/* ============================================
   SI ON PLANT'HAIES — Feuille de style globale
   Ambiance : Bois & Terre — Chaud, Organique, Artisanal
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,500;0,9..144,700;1,9..144,400&family=Nunito:wght@400;600;700&display=swap');

:root {
  /* Palette bois & terre chaude */
  --ocre:         #C8832A;
  --ocre-clair:   #E8A84A;
  --ocre-pale:    #FDF0DC;
  --terre:        #7A4B1E;
  --terre-moyen:  #A0632E;
  --terre-clair:  #D4A06A;
  --vert-mousse:  #4E6B3A;
  --vert-sage:    #7A9E5F;
  --vert-pale:    #E8EFE0;
  --creme:        #FBF6EE;
  --creme-fonce:  #F2E8D8;
  --blanc-chaud:  #FFFCF7;
  --texte-fonce:  #2E1E0E;
  --texte-moyen:  #6B4A28;
  --texte-clair:  #A07850;
  --ombre-chaude: rgba(122, 75, 30, 0.14);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Nunito', sans-serif;
  font-weight: 400;
  color: var(--texte-fonce);
  background-color: var(--creme);
  line-height: 1.75;
}

/* Grain de texture subtil */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23noise)' opacity='0.035'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  opacity: 0.6;
}

/* ---- TYPOGRAPHIE ---- */

h1, h2, h3 {
  font-family: 'Fraunces', serif;
  line-height: 1.2;
  font-weight: 500;
}

h1 { font-size: clamp(2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); color: var(--terre); }
h3 { font-size: clamp(1.1rem, 2vw, 1.5rem); color: var(--terre-moyen); }

p {
  font-size: 1.05rem;
  color: var(--texte-moyen);
  margin-bottom: 1.2rem;
}

a {
  color: var(--vert-mousse);
  text-decoration: none;
  transition: color 0.2s;
}

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

/* ---- NAVIGATION ---- */

nav {
  background-color: var(--terre);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 3px 18px rgba(122,75,30,0.28);
  min-height: 72px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  text-decoration: none;
  z-index: 1;
}

.nav-logo img {
  height: 50px;
  width: auto;
  filter: brightness(0) invert(1);
}

.nav-logo span {
  font-family: 'Fraunces', serif;
  font-size: 1.15rem;
  color: var(--ocre-clair);
  font-style: italic;
  font-weight: 300;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 0.2rem;
  z-index: 1;
}

.nav-links a {
  color: rgba(255,252,247,0.82);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.5rem 0.85rem;
  border-radius: 30px;
  transition: all 0.22s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--blanc-chaud);
  background-color: rgba(200,131,42,0.3);
}

.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1;
}

.nav-burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--blanc-chaud);
  border-radius: 2px;
}

/* ---- BOUTONS ---- */

.btn {
  display: inline-block;
  padding: 0.9rem 2.2rem;
  border-radius: 60px;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.02em;
  transition: all 0.25s;
  cursor: pointer;
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--ocre), var(--terre-moyen));
  color: var(--blanc-chaud);
  box-shadow: 0 4px 18px rgba(200,131,42,0.4);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--ocre-clair), var(--ocre));
  color: var(--blanc-chaud);
  transform: translateY(-2px);
  box-shadow: 0 7px 24px rgba(200,131,42,0.45);
}

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

.btn-secondary:hover {
  background-color: var(--terre);
  color: var(--blanc-chaud);
}

.btn-white {
  background-color: var(--blanc-chaud);
  color: var(--terre);
  box-shadow: 0 4px 14px rgba(0,0,0,0.1);
}

.btn-white:hover {
  background-color: var(--ocre-pale);
  color: var(--terre);
  transform: translateY(-2px);
}

/* ---- LAYOUT ---- */

section { padding: 5rem 2rem; }
.container { max-width: 960px; margin: 0 auto; }
.container-wide { max-width: 1200px; margin: 0 auto; }
.section-title { margin-bottom: 0.4rem; }

.section-subtitle {
  font-size: 1.1rem;
  color: var(--texte-clair);
  margin-bottom: 3rem;
  font-style: italic;
  font-family: 'Fraunces', serif;
}

.section-fonce { background-color: var(--terre); }
.section-fonce h2,
.section-fonce h3,
.section-fonce p { color: var(--blanc-chaud); }

/* ---- SEPARATEUR ---- */

.separator {
  display: block;
  width: 52px;
  height: 3px;
  background: linear-gradient(to right, var(--ocre), var(--terre-clair));
  border-radius: 3px;
  margin: 0.8rem 0 2rem 0;
}

/* ---- HERO IMAGE ---- */

.page-hero-overlay {
  position: relative;
  height: 340px;
  overflow: hidden;
}

.page-hero-overlay img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.page-hero-overlay .overlay-text {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right,
    rgba(122,75,30,0.80) 0%,
    rgba(78,107,58,0.28) 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem 3rem;
}

.page-hero-overlay .overlay-text h1 {
  color: var(--blanc-chaud);
  text-shadow: 0 2px 12px rgba(0,0,0,0.25);
  max-width: 600px;
}

.page-hero-overlay .overlay-text p {
  color: rgba(255,252,247,0.88);
  font-size: 1.15rem;
  max-width: 520px;
  font-family: 'Fraunces', serif;
  font-style: italic;
}

/* ---- CARTES ---- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.card {
  background: var(--blanc-chaud);
  border-radius: 28px;
  padding: 2.2rem;
  box-shadow: 0 5px 28px var(--ombre-chaude);
  border-top: 4px solid var(--ocre);
  transition: transform 0.22s, box-shadow 0.22s;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 40px var(--ombre-chaude);
}

.card:nth-child(2) { border-top-color: var(--vert-mousse); }
.card:nth-child(3) { border-top-color: var(--terre-clair); }

.card-icon { font-size: 2.4rem; margin-bottom: 1rem; }

/* ---- TAGS ---- */

.tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 0.3rem 0.9rem;
  border-radius: 50px;
}

.tag-ocre  { background: var(--ocre-pale); color: var(--terre); }
.tag-vert  { background: var(--vert-pale); color: var(--vert-mousse); }
.tag-terre { background: var(--creme-fonce); color: var(--terre-moyen); }

/* ---- FOOTER ---- */

footer {
  background: linear-gradient(160deg, var(--texte-fonce) 0%, var(--terre) 100%);
  color: rgba(255,252,247,0.8);
  padding: 3.5rem 2rem 2rem;
}

footer .footer-inner {
  max-width: 960px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

footer h4 {
  font-family: 'Fraunces', serif;
  color: var(--ocre-clair);
  margin-bottom: 1rem;
  font-size: 1.1rem;
  font-weight: 500;
}

footer p, footer a {
  color: rgba(255,252,247,0.72);
  font-size: 0.92rem;
  line-height: 1.9;
}

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

.footer-bottom {
  text-align: center;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.8rem;
  color: rgba(255,252,247,0.4);
}

/* ---- RESPONSIVE ---- */

@media (max-width: 768px) {
  nav { flex-wrap: wrap; padding: 0.8rem 1.2rem; }
  .nav-burger { display: flex; }
  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    padding: 0.8rem 0;
    gap: 0.15rem;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.6rem 0.5rem; font-size: 0.85rem; }
  section { padding: 3.5rem 1.2rem; }
  .page-hero-overlay { height: 240px; }
  .page-hero-overlay .overlay-text { padding: 1.5rem; }
}

/* ---- CORRECTIFS LISIBILITE FONDS SOMBRES ---- */

/* Tout texte fort sur fond sombre */
.section-fonce strong,
.section-fonce b,
.bandeau-cta strong { color: var(--ocre-clair); }

/* Sections avec gradient sombre — forcer texte clair */
[style*="background: linear-gradient(135deg, var(--terre)"] p,
[style*="background: linear-gradient(135deg, var(--terre)"] h2,
[style*="background: linear-gradient(135deg, var(--terre)"] h3 {
  color: var(--blanc-chaud);
}

/* Ce qu'on ne fait pas (mission.html) */
.ce-quon-fait-pas { color: var(--blanc-chaud); }
.ce-quon-fait-pas h2,
.ce-quon-fait-pas h3,
.ce-quon-fait-pas p,
.ce-quon-fait-pas li,
.ce-quon-fait-pas strong { color: var(--blanc-chaud) !important; }
.ce-quon-fait-pas .citation { color: rgba(255,252,247,0.92) !important; }

/* Thématique connexion (haie.html) */
.thematique-connexion,
.thematique-connexion h2,
.thematique-connexion h3,
.thematique-connexion p,
.thematique-connexion li,
.thematique-connexion strong { color: var(--blanc-chaud) !important; }
.thematique-connexion .services-list li { color: rgba(255,252,247,0.9) !important; }

/* En-têtes de projets (projets.html) */
.projet-header h2,
.projet-header p,
.projet-header .subtitle,
.entretien-header h2,
.entretien-header p,
.entretien-header .subtitle { color: var(--blanc-chaud) !important; }

/* Futurs projets */
.futurs-projets h2,
.futurs-projets p { color: var(--blanc-chaud) !important; }

/* Chiffres (plantations.html) */
.chiffres h2,
.chiffres p,
.chiffre-label { color: var(--blanc-chaud) !important; }
.chiffre-number { color: var(--ocre-clair) !important; }

/* Footer */
footer p, footer a, footer li { color: rgba(255,252,247,0.78); }
footer h4 { color: var(--ocre-clair) !important; }

/* Bandeau CTA */
.bandeau-cta h2 { color: var(--blanc-chaud) !important; }
.bandeau-cta p  { color: rgba(255,252,247,0.9) !important; }

/* ---- LOGO DANS LES HEROES DE PAGE ---- */
.hero-title-block {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 0.4rem;
}

.hero-title-block img {
  height: 90px;
  width: auto;
  filter: drop-shadow(0 3px 12px rgba(0,0,0,0.45));
  flex-shrink: 0;
}

.page-hero-overlay .overlay-text h1 {
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .hero-title-block img { height: 56px; }
  .hero-title-block { gap: 0.8rem; }
}
