/* ==========================================================================
   VAAD — charte « vert forêt » (voir CHARTERTE.md, déduite de apps/style.css).
   - Lime #76b900 réservé à l'accentuation : CTA, liens, focus, succès,
     indicateurs. Jamais de texte courant en lime, jamais blanc sur lime.
   - Hiérarchie par la taille et la graisse (600/600-700), pas par la couleur.
   - Échelle de verts #0f1f18 → #152820 → #1f3a2e → #2d5a3e ; bleu nuit
     #1a1a2e réservé au fond de page.
   - Breakpoint unique : 768px.
   ========================================================================== */

:root {
  --page:      #1a1a2e;
  --container: #1f3a2e;
  --panel:     #152820;
  --panel-2:   #1d3326;   /* champs secondaires */
  --deep:      #0f1f18;   /* fond creusé, footer */
  --raised:    #2d5a3e;   /* surfaces renforcées */
  --raised-2:  #3a5a42;
  --accent:    #76b900;
  --border:    #4a6b52;
  --text:      #e0e0e0;
  --text-2:    #aaa;
  --text-3:    #888;
  --danger:    #ff5252;
  --warn:      #d97706;
  --inactive:  #6b7280;

  --wash:   rgba(118, 185, 0, .12);  /* lavage d'accent (états actifs) */
  --wash-6: rgba(118, 185, 0, .06);  /* lavage léger (survol lignes) */
  --ring:   0 0 0 3px rgba(118, 185, 0, .2);
  --shadow: 0 20px 60px rgba(0, 0, 0, .3);
  --glow:   0 8px 20px rgba(118, 185, 0, .3);

  --r-card: 12px;   /* cards, navbar, dropzone */
  --r-box:  16px;   /* conteneur */
  --r-btn:  8px;    /* boutons, inputs, code */
  --r-pill: 20px;   /* badges */
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  line-height: 1.5;
  font-size: 1rem;
}

/* Échelle typographique : base charte, h1/h2 remontés pour la vitrine
   (arbitrage validé : hiérarchie marketing, graisses 600/700 inchangées). */
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .75rem; }
h1 { font-size: 2.2rem; font-weight: 700; }
h2 { font-size: 1.5rem; font-weight: 700; }
h3 { font-size: 1rem;   font-weight: 600; }
h4 { font-size: .9rem;  font-weight: 600; }
p  { margin: 0 0 1rem; }
@media (max-width: 767px) { h1 { font-size: 1.6rem; } h2 { font-size: 1.4rem; } }

a { color: var(--accent); }
a:hover { text-decoration-thickness: 2px; }

/* Focus clavier visible en lime. */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--accent); color: #1a1a2e; font-weight: 600;
  padding: .5rem 1rem; border-radius: 0 0 var(--r-btn) 0;
}
.skip-link:focus { left: 0; }

/* ---------- Conteneur (largeur demandée : 1400 max, marges visibles) ---------- */
.container { width: min(1400px, calc(100% - 56px)); margin-inline: auto; }

/* ---------- Vues du routeur (une seule affichée à la fois) ---------- */
.view { display: none; }
.view.active { display: block; animation: viewin .35s ease; }
@keyframes viewin { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Colonne de lecture pour le texte suivi (~70 caractères). Ne s'applique
   jamais aux grilles de cartes ni aux tableaux : uniquement aux paragraphes. */
.prose { max-width: 70ch; }

.view > section {
  background: var(--container);
  border-radius: var(--r-box);
  box-shadow: var(--shadow);
  padding: clamp(20px, 4vw, 40px);
  margin-block: 20px;
  scroll-margin-top: 88px;
}

/* Filet décoratif réutilisable : dégradé 90deg raised → accent. */
.view > section::before {
  content: "";
  display: block;
  height: 4px; width: 96px;
  border-radius: 4px;
  margin-bottom: 20px;
  background: linear-gradient(90deg, #2d5a3e, #76b900);
}

.section-intro, .note { color: var(--text-2); max-width: 60ch; }
.section-cta { margin-top: 20px; }

/* Card : fond #152820 + bordure 1px + rayon 12 + padding 20. */
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 20px;
}

.meta-label, .benefit {
  text-transform: uppercase;
  color: var(--text-2);
  letter-spacing: .04em;
  font-size: .8rem;
  font-weight: 600;
}

.eyebrow {
  text-transform: uppercase; letter-spacing: .04em;
  color: var(--text-2); font-size: .8rem; font-weight: 600;
}

/* Validation-box (ambre) : bordure gauche 4px + fond lavé 12 %. */
.todo {
  border-left: 4px solid var(--warn);
  background: rgba(217, 119, 6, .12);
  border-radius: var(--r-btn);
  padding: 10px 14px;
  color: var(--text);
  font-size: .9rem;
}

/* ---------- Boutons (recettes de la charte) ---------- */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: var(--r-btn);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s, background-color .2s, border-color .2s, color .2s;
}
/* CTA principal : le brief réserve le lime aux CTA — fond lime, texte sombre. */
.btn-primary { background: var(--accent); color: #1a1a2e; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--glow); }
/* Ghost : fond transparent, bordure 2px, lavage lime au hover. */
.btn-ghost { border-color: var(--border); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--accent); background: var(--wash); }

/* ---------- En-tête / navigation (navbar = fond panneau) ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
}
.nav-wrap {
  width: min(1400px, calc(100% - 56px));
  margin-inline: auto;
  display: flex; align-items: center; gap: 14px;
  flex-wrap: wrap;
  padding-block: 10px;
}
.brand { flex: 0 0 auto; display: inline-flex; align-items: center; min-width: 0; }
.brand img { height: 36px; width: auto; max-width: 230px; display: block; }

.nav-toggle {
  background: var(--raised); border: 1px solid var(--border); border-radius: var(--r-btn);
  color: var(--text); padding: 6px; cursor: pointer;
  transition: border-color .2s;
}
.nav-toggle:hover { border-color: var(--accent); }

.main-nav { width: 100%; display: none; }
.main-nav.open { display: block; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.main-nav a {
  display: block; padding: 8px 14px; border-radius: 6px;
  color: var(--text); text-decoration: none; font-weight: 600; font-size: .9rem;
  transition: color .2s, background-color .2s;
}
.main-nav a:hover { color: var(--accent); background: var(--wash-6); }
.main-nav .nav-cta a { color: #1a1a2e; background: var(--accent); text-align: center; }
.main-nav .nav-cta a:hover { background: var(--accent); color: #1a1a2e; box-shadow: var(--glow); }

@media (min-width: 768px) {
  .nav-toggle { display: none; }
  .main-nav { width: auto; display: block; }
  .main-nav ul { flex-direction: row; align-items: center; gap: 6px; }
}
@media (max-width: 767px) { .brand img { height: 30px; } }

/* ---------- Hero ---------- */
.hero { display: block; }
.tagline { font-size: 1.15rem; font-weight: 600; }
.slogan { color: var(--text-2); font-style: italic; font-size: .9rem; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 20px; }

/* ---------- Est-ce votre cas ? ---------- */
.cases { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.cases li { display: flex; gap: 14px; align-items: flex-start; }
.cases p { margin: 0; }
.ico { flex: 0 0 auto; width: 22px; height: 22px; color: var(--text-2); margin-top: .15rem; }

/* ---------- Services ---------- */
.cards { display: grid; gap: 16px; }
@media (min-width: 768px) { .cards { grid-template-columns: repeat(2, 1fr); } }
.card h3 { display: flex; gap: 8px; align-items: baseline; }
.benefit { margin-bottom: 10px; }
.quote-link { font-weight: 700; }

.card-flag { border: 2px solid var(--accent); position: relative; }
.card-flag::after {
  content: "Différenciateur";
  position: absolute; top: -12px; left: 20px;
  background: var(--accent); color: #1a1a2e;
  font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
  padding: 2px 10px; border-radius: var(--r-pill);
}

/* ---------- Pour qui ---------- */
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li {
  border: 1px solid var(--border); border-radius: var(--r-pill);
  padding: 6px 14px; font-weight: 600; font-size: .9rem;
  background: var(--panel);
}

/* ---------- Méthode ---------- */
.steps { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 16px; }
@media (min-width: 768px) { .steps { grid-template-columns: repeat(2, 1fr); } }
.step-n {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--raised); color: var(--text);
  font-weight: 700; margin-bottom: 10px;
}

.honesty h4 { margin-top: 14px; }
.honesty ul { margin: 0; padding-left: 20px; }
.honesty li { margin-bottom: 6px; }
@media (min-width: 768px) { .honesty-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 25px; } }

.social { margin-top: 16px; }
.social .todo { margin-bottom: 8px; }

/* ---------- Devis ---------- */
.section-devis { background-image: radial-gradient(600px 300px at 85% 0%, rgba(118, 185, 0, .10), transparent 70%); }
.devis-grid { display: grid; gap: 25px; }
.billing { padding-left: 20px; }
.billing li { margin-bottom: 8px; }
.alt-contact a { font-weight: 600; }
@media (min-width: 768px) { .devis-grid { grid-template-columns: 1.1fr .9fr; } }

/* ---------- Comparatif (tableau) ---------- */
.compare { width: 100%; border-collapse: collapse; }
.compare th, .compare td {
  text-align: left; vertical-align: top;
  padding: 10px 8px;
  border-bottom: 1px solid rgba(74, 107, 82, .5);
}
/* En-têtes de tableau : 0.8rem, MAJUSCULES, #aaa. */
.compare thead th {
  font-size: .8rem; text-transform: uppercase; letter-spacing: .04em;
  color: var(--text-2); font-weight: 600;
}
.compare thead tr th:nth-child(3)::after {
  content: ""; display: block; height: 3px; width: 48px; margin-top: 4px;
  border-radius: 4px; background: linear-gradient(90deg, #2d5a3e, #76b900);
}
.compare tbody th { font-weight: 600; color: var(--text); }
.compare td { color: var(--text-2); }
.compare tbody tr:hover { background: var(--wash-6); }
/* Sous 768px : passage en blocs empilés. */
@media (max-width: 767px) {
  .compare, .compare tbody, .compare tr, .compare td, .compare th { display: block; width: 100%; }
  .compare thead { display: none; }
  .compare tr { border-bottom: 1px solid rgba(74, 107, 82, .5); margin-bottom: 10px; }
  .compare td { border: 0; }
}

/* ---------- FAQ (accordéon natif <details>) ---------- */
.faq { display: grid; gap: 10px; }
.faq summary {
  cursor: pointer; font-weight: 600; font-size: 1rem;
  list-style: none; display: flex; justify-content: space-between; gap: 14px; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; color: var(--accent); font-weight: 700; font-size: 1.2rem; flex: 0 0 auto;
}
.faq details[open] summary::after { content: "\2212"; }
.faq p { margin: 10px 0 0; color: var(--text-2); }

/* ---------- Formulaires ---------- */
.field { margin-bottom: 14px; }
@media (min-width: 768px) { .field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; } }
.devis-form-wrap { align-self: start; }
label {
  display: block; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em;
  color: var(--text-2); font-weight: 600; margin-bottom: 6px;
}
.req { color: var(--accent); }
input[type="text"], input[type="email"], select, textarea {
  width: 100%; padding: 10px 14px;
  background: var(--panel-2); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--r-btn);
  font: inherit;
  transition: border-color .3s, box-shadow .3s;
}
/* Focus champ : bordure lime + anneau (recette charte). */
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: var(--ring);
}
textarea { resize: vertical; }
.field-consent label.consent {
  display: flex; gap: 8px; align-items: flex-start;
  text-transform: none; letter-spacing: 0; color: var(--text);
  font-weight: 400; font-size: .9rem;
}
.consent input { margin-top: .2rem; accent-color: var(--accent); }
.err { color: var(--danger); font-size: .85rem; margin: 6px 0 0; }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--danger); }
.form-status { font-size: .9rem; margin-top: 10px; min-height: 1.2em; }
/* Sémantique des statuts : vert = OK, #ff5252 = erreur. */
.form-status.ok { color: var(--accent); font-weight: 600; }
.form-status.ko { color: var(--danger); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; gap: 16px; }
.contact-meta { font-style: normal; }
.contact-meta p { margin: 0 0 6px; }
.contact-meta .meta-label { margin-top: 14px; }
@media (min-width: 768px) { .contact-grid { grid-template-columns: 1.4fr .6fr; } }

/* ---------- Repères de confiance (hero) ---------- */
.trust { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--text-2); font-size: .9rem; }
.trust li { display: flex; gap: 8px; align-items: center; }
.trust li::before { content: "\2713"; color: var(--accent); font-weight: 700; }

/* ---------- Montants « à partir de » ---------- */
.price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 14px 0 0; font-size: 1.05rem; font-weight: 600; color: var(--text); }
.price-from { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-2); font-weight: 600; }
.price-note { color: var(--text-2); font-size: .85rem; font-weight: 400; }

/* ---------- Interfaces de démonstration (vue Tester) ---------- */
.demo-tag {
  display: inline-block; vertical-align: middle; margin-left: 8px;
  font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
  color: var(--text-2); border: 1px solid var(--border); border-radius: var(--r-pill);
  padding: 1px 8px;
}
.teaser { display: block; }
.teaser .btn { margin-top: 14px; }
.pricing { font-size: .92rem; }

/* ---------- Pied de page (fond creusé) ---------- */
.site-footer {
  background: var(--deep);
  margin-top: 40px;
  border-top: 1px solid var(--border);
  color: var(--text-3);
  font-size: .9rem;
}
.footer-grid { display: grid; gap: 25px; padding-block: 30px; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1.2fr .6fr 1.2fr; } }
.site-footer a { color: var(--text-2); }
.site-footer a:hover { color: var(--accent); }
.footer-brand { font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 10px; }
.footer-brand img { height: 38px; width: auto; }
.footer-slogan { color: var(--text-3); }
.site-footer nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.footer-legal p { margin-bottom: 8px; }
.footer-legal .todo { font-size: .85rem; }
.footer-bottom { border-top: 1px solid var(--border); padding-block: 14px; }
