/* =============================================================================
   La feuille du site. Aucune police ni image venue d'ailleurs : des polices du
   système, une feuille SVG dessinée dans la page. Téléphone d'abord.
   ========================================================================== */

:root {
  --fond: #f5f3ec;
  --carte: #ffffff;
  --encre: #1c2620;
  --doux: #4c5a50;
  --vert: #2e5a3c;
  --vert-fonce: #1f402a;
  --vert-pale: #e6efe4;
  --ecorce: #8a4f22;
  --trait: #d9d6c9;
  --alerte: #8a2a17;
  --alerte-fond: #fbeee9;
  --titre: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --texte: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --large: 1120px;
  --lecture: 720px;
}

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

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

body {
  margin: 0;
  background: var(--fond);
  color: var(--encre);
  font-family: var(--texte);
  font-size: 17px;
  line-height: 1.6;
}

a { color: var(--vert); text-underline-offset: 2px; }
a:hover { color: var(--vert-fonce); }

h1, h2, h3, .outil-titre, .promesse {
  font-family: var(--titre);
  font-weight: 600;
  line-height: 1.2;
  color: var(--encre);
}
h1 { font-size: 32px; margin: 0 0 14px; }
h2 { font-size: 24px; margin: 36px 0 10px; }
h3 { font-size: 20px; margin: 0 0 8px; }

.saut {
  position: absolute; left: -9999px; top: 0;
  background: var(--vert); color: #fff; padding: 8px 14px; z-index: 10;
}
.saut:focus { left: 8px; top: 8px; }

/* ---- L'en-tête ------------------------------------------------------------ */
.bande { background: var(--carte); border-bottom: 1px solid var(--trait); }
.dedans { max-width: var(--large); margin: 0 auto; padding: 0 16px; }
.tete {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 6px 16px; padding: 12px 0 6px;
}
.enseigne {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--encre);
}
.enseigne .feuille { flex: none; }
.enseigne .nom { font-family: var(--titre); font-weight: 700; font-size: 21px; }
.enseigne .zone {
  font-size: 13px; color: var(--doux); border-left: 1px solid var(--trait);
  padding-left: 10px;
}
.tel-tete {
  font-weight: 700; text-decoration: none; white-space: nowrap; font-size: 16px;
}
.tel-tete span { font-weight: 400; color: var(--doux); }
.enseigne .nom { white-space: nowrap; }
@media (max-width: 479px) {
  .enseigne .zone { display: none; }
}

.menu { position: relative; }
.menu ul {
  list-style: none; margin: 0; padding: 4px 0 10px;
  display: flex; gap: 4px 18px; overflow-x: auto; white-space: nowrap;
  scrollbar-width: none;
}
.menu ul::-webkit-scrollbar { display: none; }
.menu a { text-decoration: none; color: var(--doux); font-size: 15px; padding: 6px 0; display: inline-block; }
.menu a[aria-current="page"] { color: var(--vert); font-weight: 700; border-bottom: 2px solid var(--vert); }
.menu li:last-child a { color: var(--ecorce); font-weight: 700; }
.menu.continue::after {
  content: ""; position: absolute; right: 0; top: 0; bottom: 10px; width: 40px;
  background: linear-gradient(to right, rgba(255,255,255,0), var(--carte));
  pointer-events: none;
}

/* ---- Le fil d'Ariane ------------------------------------------------------ */
.fil { max-width: var(--lecture); margin: 0 auto; padding: 14px 16px 0; font-size: 14px; color: var(--doux); }
.fil ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.fil li + li::before { content: "›"; margin-right: 6px; color: var(--trait); }

/* ---- Le corps ------------------------------------------------------------- */
.page { max-width: var(--lecture); margin: 0 auto; padding: 18px 16px 56px; }
.page.accueil { max-width: var(--large); }
.chapeau { font-size: 19px; color: var(--encre); }
.petit { font-size: 14px; color: var(--doux); }
.aide { font-size: 14px; color: var(--doux); margin: 6px 0 0; }

.bouton {
  display: inline-block; background: var(--ecorce); color: #fff;
  border: 0; border-radius: 999px; padding: 14px 26px;
  font: 700 17px/1.2 var(--texte); text-decoration: none; cursor: pointer;
}
.bouton:hover, .bouton:focus-visible { background: #6f3e19; color: #fff; }

/* ---- La première vue de l'accueil ---------------------------------------- */
.premiere { display: grid; gap: 24px; padding-top: 8px; }
.premiere h1 { font-size: 34px; }
.promesse { font-size: 23px; color: var(--vert-fonce); margin: 0 0 14px; }
.atouts { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 6px; }
.atouts li { padding-left: 26px; position: relative; }
.atouts li::before {
  content: ""; position: absolute; left: 4px; top: 8px; width: 12px; height: 7px;
  border-left: 3px solid var(--vert); border-bottom: 3px solid var(--vert);
  transform: rotate(-45deg);
}
.saison {
  background: var(--vert-pale); border-left: 4px solid var(--vert);
  padding: 12px 14px; border-radius: 0 10px 10px 0; margin: 0 0 14px;
}
.tel-premiere { font-size: 18px; margin: 0; }
.vers-trois { margin: 0 0 16px; }
.vers-trois .bouton { display: block; text-align: center; }
.saison-bloc .saison { margin: 0; }
.tel-premiere a { font-weight: 700; }

/* ---- Les formulaires ------------------------------------------------------ */
.outil {
  background: var(--carte); border: 1px solid var(--trait); border-radius: 16px;
  padding: 20px 16px; box-shadow: 0 6px 24px rgba(31, 64, 42, 0.07);
}
.outil-titre { font-size: 21px; margin: 0 0 12px; }
.champ { margin: 0 0 16px; border: 0; padding: 0; min-width: 0; }
.champ label, .champ legend { display: block; font-weight: 600; margin: 0 0 6px; padding: 0; }
.num {
  display: inline-grid; place-items: center; width: 24px; height: 24px; margin-right: 6px;
  border-radius: 50%; background: var(--vert); color: #fff; font-size: 14px;
}
.requis { color: var(--ecorce); }
select, input[type="text"], input[type="tel"], input[type="email"], textarea {
  width: 100%; font: 16px/1.4 var(--texte); color: var(--encre);
  background: #fff; border: 1px solid #b9b5a6; border-radius: 10px; padding: 11px 12px;
}
select:focus, input:focus, textarea:focus, button:focus-visible, a:focus-visible {
  outline: 3px solid #f0b46a; outline-offset: 2px;
}
.cases { display: grid; gap: 6px; }
.case { display: flex; gap: 10px; align-items: flex-start; font-weight: 400 !important; margin: 0 !important; cursor: pointer; }
.case input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--vert); }
.piege { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* L'encadré de sécurité : visible si « Une ligne électrique » est cochée.
   Sans :has(), il reste toujours visible : rien ne se cache à tort. */
.encadre-ligne, .encadre-urgence {
  background: var(--alerte-fond); border: 1px solid #e6b9a9; border-left: 4px solid var(--alerte);
  border-radius: 10px; padding: 10px 14px; margin: 0 0 16px; font-size: 15px;
}
.encadre-ligne p, .encadre-urgence p { margin: 0; }
.encadre-ligne strong, .encadre-urgence strong { color: var(--alerte); }
.encadre-ligne a, .encadre-urgence a { color: var(--alerte); font-weight: 700; white-space: nowrap; }
@supports selector(:has(*)) {
  form .encadre-ligne { display: none; }
  form:has(input[value="Une ligne électrique"]:checked) .encadre-ligne { display: block; }
  .demande .champ-haie { display: none; }
  .demande:has(#travaux option[value="Taille de haie"]:checked) .champ-haie,
  .demande:has(#travaux option[value="Plusieurs de ces travaux"]:checked) .champ-haie,
  .demande:has(#nombre option[value="Aucun arbre, seulement une haie"]:checked) .champ-haie { display: block; }
}

.demande { display: grid; gap: 0 20px; margin-top: 18px; }
.envoi { margin-top: 4px; }
.envoi .petit { margin: 10px 0 0; }

/* ---- Les sections --------------------------------------------------------- */
.comment { margin-top: 40px; }
.etapes { counter-reset: e; list-style: none; padding: 0; display: grid; gap: 12px; }
.etapes li {
  counter-increment: e; background: var(--carte); border: 1px solid var(--trait);
  border-radius: 12px; padding: 14px 14px 14px 58px; position: relative;
}
.etapes li::before {
  content: counter(e); position: absolute; left: 14px; top: 14px;
  width: 30px; height: 30px; border-radius: 50%; background: var(--vert); color: #fff;
  display: grid; place-items: center; font-weight: 700;
}
.etapes strong { display: block; }

.reponses { margin-top: 40px; display: grid; gap: 16px; }
.reponses h2 { margin-bottom: 0; }
.reponse { background: var(--carte); border: 1px solid var(--trait); border-radius: 12px; padding: 16px; }
.reponse p { margin: 0 0 8px; }
.reponse p:last-child { margin: 0; font-weight: 600; }

.guide ul { padding-left: 20px; }
.guide li { margin: 0 0 6px; }

table { width: 100%; border-collapse: collapse; background: var(--carte); border-radius: 12px; overflow: hidden; }
caption { text-align: left; font-size: 14px; color: var(--doux); padding: 0 0 6px; }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--trait); vertical-align: top; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
thead th { background: var(--vert-pale); font-size: 15px; }
th[scope="row"] { font-weight: 600; }
.tableau-reperes th[scope="row"] { width: 58%; }
.tableau-reperes td { font-weight: 700; color: var(--vert-fonce); }
.tableau-reperes td.montant { white-space: nowrap; }
.estimation { font-size: 15px; color: var(--doux); }

.appel {
  margin-top: 44px; background: var(--vert-pale); border-radius: 16px; padding: 20px 16px; text-align: center;
}
.appel .promesse { margin-bottom: 12px; }
.appel p { margin: 0 0 8px; }
.appel-tel { margin-top: 20px; font-size: 18px; }
.appel-tel a { font-weight: 700; }
.avant ul { padding-left: 20px; }

/* ---- Le pied -------------------------------------------------------------- */
.pied { background: var(--vert-fonce); color: #e9efe7; padding: 28px 0 90px; font-size: 15px; }
.pied a { color: #fff; }
.pied p { margin: 0 0 8px; }
.pied-liens { list-style: none; padding: 0; margin: 14px 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.pied-legal { font-size: 14px; opacity: 0.9; }

/* ---- Le bouton fixe, sur téléphone ---------------------------------------- */
.fixe { display: none; }
@media (max-width: 699px) {
  .js .fixe.visible {
    display: block; position: fixed; left: 16px; right: 16px; bottom: 12px; z-index: 5;
    text-align: center; background: var(--ecorce); color: #fff; font-weight: 700;
    padding: 14px; border-radius: 999px; text-decoration: none;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
  }
}

/* ---- Les grands écrans ---------------------------------------------------- */
@media (min-width: 700px) {
  h1 { font-size: 38px; }
  .outil { padding: 24px; }
  .demande { grid-template-columns: 1fr 1fr; }
  .demande .large, .demande .envoi, .demande fieldset { grid-column: 1 / -1; }
  .cases { grid-template-columns: 1fr 1fr; }
  .etapes { grid-template-columns: 1fr 1fr; }
  .reponses { grid-template-columns: 1fr 1fr; }
  .reponses h2 { grid-column: 1 / -1; }
  .pied { padding-bottom: 32px; }
}
@media (min-width: 960px) {
  .premiere {
    grid-template-columns: 1.1fr 1fr; grid-template-areas: "texte outil" "saison outil";
    grid-template-rows: auto 1fr; align-items: start; gap: 24px 40px; padding-top: 20px;
  }
  .premiere-texte { grid-area: texte; }
  .premiere .trois { grid-area: outil; }
  .premiere .saison-bloc { grid-area: saison; }
  .vers-trois { display: none; }
  .premiere h1 { font-size: 42px; }
  .etapes { grid-template-columns: repeat(4, 1fr); }
  .reponses { grid-template-columns: repeat(3, 1fr); }
  .trois .cases { grid-template-columns: 1fr; }
}
