/* =========================
   RESET
========================= */

*{
  box-sizing:border-box;
}

html{
  scroll-behavior:smooth;
}

html,
body{
  margin:0;
  padding:0;
}

body{
  font-family:'Handlee',cursive;
  background:#f7f7f7;
  color:#1f1f1f;
  line-height:1.5;
  position:relative;
}

/* =========================
   WATERMARK
========================= */

body::before{
  content:"";
  position:fixed;
  inset:0;
  background:url('logo.png') no-repeat center center;
  background-size:clamp(700px,58vw,1450px);
  opacity:.07;
  filter:grayscale(100%) brightness(.9);
  pointer-events:none;
  z-index:-1;
}

@media (max-width:700px){

  body::before{
    background-size:85%;
  }

  body{
    overscroll-behavior-y:contain;
  }
}

/* =========================
   HERO
========================= */

.hero{
  background:#2e7d32;
  color:#fff;
  box-shadow:0 6px 20px rgba(0,0,0,.25);
}

.hero-inner{
  max-width:1100px;
  margin:0 auto;
  display:grid;
  grid-template-columns:120px 1fr auto;
  gap:1rem;
  align-items:center;
  padding:1.2rem 1rem;
}

.logo{
  width:110px;
  height:auto;
  display:block;
}

.hero-text h1{
  margin:0;
  font-size:2.2rem;
  text-align:center;
}

.hero-text p{
  margin:.25rem 0 0;
  opacity:.95;
  text-align:center;
}

/* =========================
   NAV
========================= */

.topnav{
  margin-left:auto;
  display:flex;
  gap:.6rem;
  align-items:center;
  flex-wrap:wrap;
}

.topnav a{
  color:#fff;
  text-decoration:none;
  font-weight:bold;
  padding:.5rem .8rem;
  background:rgba(255,255,255,.15);
  border-radius:999px;
  transition:
    background .25s ease,
    transform .2s ease;
}

.topnav a:hover{
  background:rgba(255,255,255,.28);
  transform:scale(1.03);
}

.topnav a:active{
  transform:scale(.98);
}

.tel-link{
  display:flex;
  align-items:center;
  gap:.5rem;
  background:#fff !important;
  color:#2e7d32 !important;
}

.tel-link svg{
  width:22px;
  height:22px;
}

.tel-text{
  display:none;
}

/* =========================
   MAIN
========================= */

main section{
  max-width:1100px;
  margin:0 auto 2rem;
  padding:2rem 1rem;
  text-align:center;
}

h2{
  font-size:1.8rem;
  margin-top:0;
  color:#2e7d32;
}

/* =========================
   SERVICES
========================= */

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

.card{
  position:relative;
  background:#fff;
  border-radius:16px;
  padding:1.5rem;
  box-shadow:0 4px 14px rgba(0,0,0,.1);
  overflow:hidden;
  min-height:160px;
}

.card::before{
  content:"";
  position:absolute;
  inset:0;
  background-repeat:no-repeat;
  background-position:center;
  background-size:200px auto;
  opacity:.25;
  pointer-events:none;
}

.card-elagage::before{
  background-image:url('icons/elagage.png');
}

.card-abattage::before{
  background-image:url('icons/abattage.png');
}

.card-broyage::before{
  background-image:url('icons/broyage.png');
}

.card-content{
  position:relative;
  z-index:1;
}

.card h3{
  margin:0 0 .25rem;
  font-size:1.3rem;
}

/* =========================
   REALISATIONS
========================= */

#avant-apres{
  border-top:2px solid #2e7d32;
}

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

.photo{
  position:relative;
  background:#fff;
  border-radius:14px;
  padding:.4rem;
  box-shadow:0 6px 18px rgba(0,0,0,.08);
}

.photo img{
  width:100%;
  aspect-ratio:3/4;
  object-fit:cover;
  border-radius:10px;
  transition:
    transform .25s ease,
    box-shadow .25s ease;
}

.photo:hover img{
  transform:scale(1.03);
  box-shadow:0 8px 24px rgba(0,0,0,.18);
}

.photo figcaption{
  margin:.6rem .4rem .2rem;
  text-align:center;
  font-size:.98rem;
  line-height:1.35;
}

.badge-aa{
  position:absolute;
  top:18px;
  left:18px;
  z-index:2;
  background:rgba(120,120,120,.8);
  color:#fff;
  font-size:.85rem;
  padding:6px 12px;
  border-radius:999px;
}

/* =========================
   ABOUT
========================= */

#apropos{
  border-top:2px solid #2e7d32;
}

.about-text{
  max-width:900px;
  margin:.5rem auto 0;
}

.about-text p{
  margin:.5rem 0;
}

/* =========================
   CONTACT
========================= */

#contact{
  border-top:2px solid #2e7d32;
}

form{
  max-width:520px;
  margin:1.2rem auto 2rem;
  display:flex;
  flex-direction:column;
  gap:1rem;
}

form input,
form textarea{
  width:100%;
  padding:.8rem .9rem;
  border:1px solid #cfd8dc;
  border-radius:10px;
  font-family:inherit;
  font-size:1rem;
  background:#fff;
}

form button{
  background:#2e7d32;
  color:#fff;
  padding:.85rem;
  font-size:1.1rem;
  border:none;
  border-radius:10px;
  cursor:pointer;
  transition:
    transform .2s ease,
    opacity .2s ease;
}

form button:hover{
  opacity:.92;
  transform:scale(1.03);
}

form button:active{
  transform:scale(.98);
}

.phone-row{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:.6rem;
  margin:1rem auto 0;
}

.icon-btn,
.copy-btn{
  background:none;
  border:none;
  cursor:pointer;
  transition:transform .2s ease;
}

.icon-btn:hover,
.copy-btn:hover{
  transform:scale(1.05);
}

.icon-btn:active,
.copy-btn:active{
  transform:scale(.97);
}

.icon-btn svg{
  width:24px;
  height:24px;
}

.phone-text{
  font-size:1.25rem;
  color:#2e7d32;
  text-decoration:none;
  font-weight:700;
}

.icon-copy{
  display:block;
  position:relative;
  width:14px;
  height:14px;
  border:2px solid #2e7d32;
  border-radius:3px;
}

.icon-copy::before{
  content:"";
  position:absolute;
  top:3px;
  left:3px;
  width:14px;
  height:14px;
  border:2px solid #2e7d32;
  border-radius:3px;
}

.copy-line{
  text-align:center;
  min-height:1.25rem;
  margin-top:.35rem;
}

.copy-msg{
  color:#2e7d32;
  opacity:0;
  transition:opacity .2s ease;
}

.copy-msg.visible{
  opacity:1;
}

.alt-mail{
  margin-top:1rem;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:.25rem;
  flex-wrap:wrap;
}

.alt-mail a{
  color:#2e7d32;
  text-decoration:none;
  border-bottom:1px dashed #2e7d32;
}

.rgpd{
  font-size:.85rem;
  opacity:.75;
  margin-top:1rem;
}

.hidden{
  display:none;
}

/* =========================
   FOOTER
========================= */

footer{
  text-align:center;
  background:#333;
  color:#fff;
  padding:1rem;
}

footer p{
  margin:.35rem 0;
}

footer a{
  color:#ddd;
  text-decoration:none;
  border-bottom:1px dashed #bbb;
}

footer a:hover{
  color:#fff;
  border-color:#fff;
}

.footer-thanks{
  font-size:1.15rem;
}

.footer-sep{
  display:inline-block;
  margin:0 .4rem;
}

/* =========================
   COPY BUBBLE
========================= */

.copy-bubble{
  position:fixed;
  z-index:9999;
  background:#fff;
  color:#2e7d32;
  border:1px solid #2e7d32;
  border-radius:10px;
  padding:.4rem .6rem;
  box-shadow:0 6px 18px rgba(0,0,0,.12);
  font-size:.95rem;
  display:inline-flex;
  align-items:center;
  gap:.35rem;
  opacity:0;
  transform:translateY(4px);
  pointer-events:none;
  transition:
    opacity .2s ease,
    transform .2s ease;
}

.copy-bubble.show{
  opacity:1;
  transform:translateY(0);
}

/* =========================
   LIGHTBOX
========================= */

.noscroll{
  overflow:hidden;
}

.lightbox{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.85);
  display:flex;
  align-items:center;
  justify-content:center;
  opacity:0;
  pointer-events:none;
  transition:opacity .2s ease;
  z-index:1000;
}

.lightbox.is-open{
  opacity:1;
  pointer-events:auto;
}

.lightbox-grid{
  display:grid;
  gap:1rem;
  grid-template-columns:1fr;
  max-width:90vw;
}

.lightbox-img{
  max-width:90vw;
  max-height:80vh;
  border-radius:12px;
  box-shadow:0 10px 30px rgba(0,0,0,.35);
}

.lightbox-close{
  position:absolute;
  top:12px;
  right:12px;
  font-size:1.6rem;
  border:none;
  background:#fff;
  color:#111;
  border-radius:999px;
  width:42px;
  height:42px;
  cursor:pointer;
}

@media (min-width:900px){
  .lightbox-grid{
    grid-template-columns:1fr 1fr;
  }
}

/* =========================
   MOBILE
========================= */

@media (max-width:700px){

  .hero{
    padding:.6rem 0;
  }

  .hero-inner{
    grid-template-columns:78px 1fr;
    grid-template-areas:
      "logo title"
      "subtitle subtitle"
      "nav nav";
    column-gap:.75rem;
    row-gap:.35rem;
    padding:0 .9rem;
  }

  .logo{
    grid-area:logo;
    width:78px;
  }

  .hero-text{
    grid-area:title;
    display:flex;
    flex-direction:column;
    justify-content:center;
    margin:0;
    padding-left:.2rem;
  }

  .hero-text h1{
    font-size:1.45rem;
    line-height:1.1;
    margin:0;
    text-align:left;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
  }

  .hero-text p{
    grid-area:subtitle;
    text-align:left;
    line-height:1.25;
    margin:.25rem 0 0;
    font-size:.95rem;
    opacity:.9;
  }

  .topnav{
    grid-area:nav;
    display:flex;
    flex-wrap:nowrap;
    justify-content:space-between;
    align-items:center;
    gap:.5rem;
    margin-top:.2rem;
  }

  .topnav a{
    flex:1 1 auto;
    text-align:center;
    padding:.5rem .6rem;
    font-size:.95rem;
    white-space:nowrap;
  }

  .tel-link{
    flex:0 0 auto;
    padding:.45rem .6rem !important;
  }

  .tel-link svg{
    width:24px;
    height:24px;
  }

  .tel-text{
    display:none !important;
  }

  .pair{
    gap:12px;
  }

  .photo img{
    aspect-ratio:auto;
  }

  .mobile-break::after{
    content:"\A";
    white-space:pre;
  }
}