/* ===================================================================
   Éolien Bois de la Cedrogne — style épuré, mobile-first
   =================================================================== */

:root {
  --vert: #2d5a3a;
  --vert-fonce: #1e3f28;
  --vert-pale: #eef4ec;
  --vert-ligne: #d8e2d4;
  --encre: #22301f;
  --texte: #2b2f2a;
  --fond: #fbfbf8;
  --ambre: #f7edd2;
  --ambre-fonce: #6b5418;
}

html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; }

body {
  background: var(--fond);
  color: var(--texte);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.65;
}

h1, h2, h3, h4 {
  font-family: Georgia, "Times New Roman", serif;
  color: var(--encre);
  line-height: 1.25;
}

a { color: var(--vert); }
a:hover { color: var(--vert-fonce); }

/* ------------------------------------------------ navigation ----- */
.topnav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 251, 248, 0.95);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--vert-ligne);
}
.topnav-inner {
  max-width: 820px;
  margin: 0 auto;
  padding: 0.55rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  font-family: Georgia, serif;
  font-weight: 700;
  color: var(--vert-fonce);
  text-decoration: none;
  white-space: nowrap;
}
.topnav-links {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.topnav-links a {
  color: var(--texte);
  text-decoration: none;
  font-size: 0.92rem;
  white-space: nowrap;
}
.topnav-links a:hover { color: var(--vert); }

/* ------------------------------------------------ entête ----- */
.hero {
  background:
    linear-gradient(rgba(18, 33, 22, 0.45), rgba(18, 33, 22, 0.7)),
    url("header.png") center / cover no-repeat;
  color: #fff;
  text-align: center;
  padding: clamp(3.5rem, 12vw, 7rem) 1rem;
}
.hero h1 {
  color: #fff;
  font-size: clamp(1.7rem, 5.5vw, 3rem);
  margin: 0.4rem 0;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}
.hero-surtitre {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.8rem;
  opacity: 0.9;
  margin: 0;
}
.hero-soustitre {
  max-width: 38rem;
  margin: 0.6rem auto 0;
  font-size: clamp(0.95rem, 2.6vw, 1.15rem);
  opacity: 0.95;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}

/* ------------------------------------------------ bandeau enquête ----- */
.bandeau-enquete {
  display: block;
  background: var(--ambre);
  color: var(--ambre-fonce);
  text-align: center;
  padding: 0.65rem 1rem;
  text-decoration: none;
  font-size: 0.98rem;
  border-bottom: 1px solid #ecdcab;
}
.bandeau-enquete:hover { background: #f3e5c0; color: var(--ambre-fonce); }

/* ------------------------------------------------ sections ----- */
.section { padding: 2.8rem 1rem; }
main .container, .section-participer .container { max-width: 820px; }

.section h2 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  margin-bottom: 1.2rem;
}
.overline {
  display: block;
  font-family: system-ui, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--vert);
  margin-bottom: 0.3rem;
}

.note-maj { font-size: 0.85rem; color: #6b7265; }

/* ------------------------------------------------ figures / images ----- */
figure { margin: 1.6rem 0; }
figure img, .info-card img {
  width: 100%;
  height: auto;
  border-radius: 0.5rem;
  border: 1px solid var(--vert-ligne);
}
figcaption {
  font-size: 0.85rem;
  color: #6b7265;
  margin-top: 0.45rem;
  text-align: center;
}
.zoom { cursor: zoom-in; display: block; }
.zoom-hint { font-size: 0.82rem; color: #8a9183; }

.avis-row {
  display: flex;
  gap: 1.2rem;
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--vert-ligne);
  border-radius: 0.6rem;
  padding: 1rem;
  margin: 1.6rem 0;
}
.avis-thumb { flex: 0 0 110px; }
.avis-thumb img { width: 110px; border-radius: 0.3rem; border: 1px solid var(--vert-ligne); }
.avis-texte h3 { font-size: 1.05rem; margin-bottom: 0.4rem; }
.avis-texte p { margin: 0; font-size: 0.95rem; }

/* ------------------------------------------------ encadré kDrive ----- */
.encadre-kdrive {
  background: var(--vert);
  color: #fff;
  border-radius: 0.6rem;
  padding: 1.3rem 1.4rem;
  margin-top: 1.8rem;
}
.encadre-kdrive p { margin-bottom: 0.8rem; }
.btn-kdrive {
  display: inline-block;
  background: #fff;
  color: var(--vert-fonce);
  font-weight: 600;
  padding: 0.55rem 1rem;
  border-radius: 0.4rem;
  text-decoration: none;
}
.btn-kdrive:hover { background: var(--vert-pale); color: var(--vert-fonce); }

/* ------------------------------------------------ argumentaire ----- */
.controls-technique { margin: 0 0 1.4rem; }

.argumentaire h2 {
  font-size: clamp(1.3rem, 3.5vw, 1.6rem);
  margin: 2.4rem 0 1rem;
  padding-top: 1rem;
}
.argumentaire h3 {
  font-size: clamp(1.12rem, 3vw, 1.3rem);
  margin: 2rem 0 0.9rem;
}
.argumentaire .sep {
  border: 0;
  border-top: 1px solid var(--vert-ligne);
  margin: 1.6rem 0;
}

/* table des matières (premier <ol> du document) */
.argumentaire > ol:first-of-type {
  background: #fff;
  border: 1px solid var(--vert-ligne);
  border-radius: 0.6rem;
  padding: 1.1rem 1.1rem 1.1rem 2.2rem;
  font-size: 0.95rem;
}
.argumentaire > ol:first-of-type a { text-decoration: none; }
.argumentaire > ol:first-of-type a:hover { text-decoration: underline; }
.argumentaire > ol:first-of-type ul { list-style: none; padding-left: 0.9rem; margin: 0.2rem 0 0.4rem; }

/* En clair */
.en-clair {
  background: var(--vert-pale);
  border-radius: 0.6rem;
  padding: 1.1rem 1.25rem;
  margin: 1.1rem 0;
  font-size: 1.05rem;
}
.en-clair p:last-child { margin-bottom: 0; }

.bloc-label {
  font-family: system-ui, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--vert);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

/* bouton « Copier » (ajouté par app.js dans les encadrés retenir) */
.btn-copier {
  font-family: system-ui, sans-serif;
  text-transform: none;
  letter-spacing: normal;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--vert);
  background: #fff;
  border: 1px solid var(--vert-ligne);
  border-radius: 0.35rem;
  padding: 0.12rem 0.6rem;
  cursor: pointer;
  flex-shrink: 0;
}
.btn-copier:hover { background: var(--vert); color: #fff; border-color: var(--vert); }
.btn-copier.ok { background: var(--vert); color: #fff; border-color: var(--vert); }

/* Sur le plan technique (replié par défaut) */
details.technique {
  background: #fff;
  border: 1px solid var(--vert-ligne);
  border-radius: 0.6rem;
  margin: 1.1rem 0;
}
details.technique summary {
  list-style: none;
  cursor: pointer;
  padding: 0.85rem 1.15rem;
  font-weight: 600;
  color: var(--vert);
  user-select: none;
}
details.technique summary::-webkit-details-marker { display: none; }
details.technique summary::before {
  content: "▸";
  display: inline-block;
  margin-right: 0.55rem;
  transition: transform 0.15s ease;
}
details.technique[open] summary::before { transform: rotate(90deg); }
details.technique[open] summary { border-bottom: 1px solid var(--vert-ligne); }
.technique-corps { padding: 1rem 1.15rem 0.4rem; font-size: 0.95rem; }
.technique-refs { color: #5a6354; }

/* Ce qu'il faut retenir */
.retenir {
  border-left: 5px solid var(--vert);
  background: #f4f7f1;
  border-radius: 0 0.5rem 0.5rem 0;
  padding: 0.95rem 1.15rem;
  margin: 1.1rem 0;
}
.retenir p:last-child { margin-bottom: 0; }

/* citations du dossier */
.argumentaire blockquote {
  border-left: 3px solid #c5d1c0;
  margin: 1rem 0;
  padding: 0.3rem 0 0.3rem 1rem;
  color: #4a5244;
}
.argumentaire blockquote p { margin-bottom: 0.4rem; }

/* tableaux */
.table-responsive { margin: 1rem 0; border: 1px solid var(--vert-ligne); border-radius: 0.4rem; }
.argumentaire table { font-size: 0.88rem; margin: 0; }
.argumentaire th { background: var(--vert-pale); color: var(--encre); }

/* bloc « À qui appartiennent les terrains ? » (intro) */
.repartition-proprio {
  margin: 1.6rem 0;
  padding: 1.1rem 1.2rem 0.6rem;
  background: var(--vert-pale);
  border: 1px solid var(--vert-ligne);
  border-radius: 0.5rem;
}
.repartition-proprio h3 { margin: 0 0 0.5rem; font-size: 1.05rem; color: var(--vert-fonce); }
.repartition-proprio p { font-size: 0.95rem; }
.repartition-proprio .table-responsive { background: #fff; }
.repartition-proprio table { font-size: 0.88rem; margin: 0; }
.repartition-proprio th { background: var(--vert); color: #fff; }
.repartition-sub { color: #6b7265; font-size: 0.82rem; font-weight: 400; }
.repartition-source { font-size: 0.8rem; color: #6b7265; margin-bottom: 0.5rem; }

.lien-kdrive { font-size: 0.85rem; white-space: nowrap; }

/* ------------------------------------------------ participer ----- */
.section-participer {
  background: var(--vert-fonce);
  color: #e9efe6;
}
.section-participer h2, .section-participer h3 { color: #fff; }
.section-participer .overline { color: #9fc4a8; }
.section-participer h3 { font-size: 1.15rem; margin: 1.8rem 0 0.6rem; }
.section-participer a { color: #bcd9c2; }
.section-participer a:hover { color: #fff; }

.dates-enquete {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin: 1.4rem 0;
}
.date-bloc {
  flex: 1 1 200px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 0.6rem;
  padding: 0.9rem 1.1rem;
}
.date-cloture { background: var(--ambre); border-color: var(--ambre); }
.date-cloture .date-label, .date-cloture .date-val { color: var(--ambre-fonce); }
.date-label {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  font-size: 0.7rem;
  font-weight: 600;
  opacity: 0.85;
}
.date-val { font-size: 1.25rem; font-weight: 700; font-family: Georgia, serif; }

.adresse-commune {
  background: rgba(255, 255, 255, 0.08);
  border-left: 4px solid #9fc4a8;
  border-radius: 0 0.5rem 0.5rem 0;
  padding: 0.9rem 1.1rem;
  margin: 1rem 0;
}
.adresse-commune p { margin: 0; }

.reference-dossier {
  background: rgba(255, 255, 255, 0.06);
  border: 1px dashed rgba(255, 255, 255, 0.3);
  border-radius: 0.5rem;
  padding: 0.8rem 1.1rem;
}

.section-participer .contact { margin-top: 1.6rem; font-size: 1.02rem; }

/* encadré « Faites-vous aider par l'IA » */
.encadre-ia {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 0.6rem;
  padding: 1.15rem 1.25rem;
  margin: 1.8rem 0;
}
.encadre-ia h3 { margin-top: 0 !important; }
.prompt-ia {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 0.5rem;
  padding: 0.95rem 1.05rem;
  margin: 0.9rem 0;
}
.prompt-ia p {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.88rem;
  color: #dfe8db;
  margin-bottom: 0.8rem;
}
.ia-note { font-size: 0.9rem; opacity: 0.85; margin-bottom: 0; }
.ia-note + .ia-note { margin-top: 0.6rem; }
.ia-note-bouton { margin: 0.5rem 0 0.9rem; }

/* ------------------------------------------------ pour info ----- */
.info-card {
  background: #fff;
  border: 1px solid var(--vert-ligne);
  border-radius: 0.6rem;
  padding: 1.3rem 1.4rem;
  margin: 1.2rem 0;
}
.info-card h3 { font-size: 1.2rem; }
.info-card figure { margin-bottom: 0; }

/* ------------------------------------------------ footer ----- */
.footer {
  background: #16271b;
  color: #b9c4b4;
  text-align: center;
  padding: 2rem 1rem;
  font-size: 0.9rem;
}
.footer a { color: #cfdcca; }
.footer p { margin-bottom: 0.4rem; }
.footer-maj { font-size: 0.8rem; opacity: 0.7; }

/* ------------------------------------------------ lightbox ----- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(10, 15, 10, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  cursor: zoom-out;
}
.lightbox img {
  max-width: 100%;
  max-height: 95vh;
  border-radius: 0.3rem;
}
.lightbox-close {
  position: absolute;
  top: 0.8rem;
  right: 1rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.6rem;
  cursor: pointer;
}

/* ------------------------------------------------ mobile ----- */
@media (max-width: 575px) {
  .section { padding: 2rem 0.9rem; }
  .avis-row { flex-direction: row; }
  .avis-thumb { flex-basis: 90px; }
  .avis-thumb img { width: 90px; }
  .en-clair { font-size: 1.02rem; }
  .technique-corps { font-size: 0.92rem; }
}
