/* ====== BASE / RESET ====== */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img { max-width: 100%; height: auto; display: block; }

body{
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  line-height: 1.5;
  padding-top: var(--header-h, 0px); /* compense la hauteur du header fixé */
}

/* ====== SECTIONS (navigation par onglets) ====== */
section{
  padding: 16px 12px;
  max-width: 980px;
  margin: 0 auto;
  display: none;
}
section.active{ display: block; }

/* ====== HEADER ====== */
header{
  position: fixed;         /* au lieu de sticky */
  top: 0;
  left: 0;
  width: 100%;
  z-index: 999;
  background: #28844E;
  color: #fff;
  border-bottom: 1px solid rgba(0,0,0,.08);
  transition: transform 0.28s ease;
  will-change: transform;
}

/* Quand on scrolle vers le bas : on cache */
header.hide{
  transform: translateY(-110%);
}

.header-content{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px;
}

/* Logo principal */
.logo-container .logo{
  width: 150px;
  height: 150px;
  object-fit: contain;
}

@media (max-width:720px){
  .logo-container .logo{
    width: 90px;
    height: 90px;
  }
}

/* Titre principal (H1) */
.titre-accueil{
  margin: 0;
  font-size: 32px;   /* plus grand */
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

@media (max-width:720px){
  .titre-accueil{
    font-size: 26px;
  }
}

/* ====== NAV ====== */
nav{ padding: 0 12px 12px; }

.menu{
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.menu a{
  color: #fff;
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 10px;
  display: block;
}

.menu a:hover{
  background: rgba(255,255,255,0.15);
}

.menu-toggle{
  display: none; /* caché sur PC */
  width: calc(100% - 24px);
  margin: 0 12px 12px;
  padding: 10px 12px;
  border: 0;
  border-radius: 12px;
  background: #fff;
  color: #111;
  font-size: 16px;
}

/* ====== SLIDESHOW ====== */
.slideshow-container{
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 14px;
}

.slides img{
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* Ratio stable si supporté */
@supports (aspect-ratio: 16 / 9){
  .slideshow-container { aspect-ratio: 16 / 10; }
  .slides, .slides img { height: 100%; }
  .slides img { object-fit: cover; }
}

.slides img.portrait{
  object-fit: contain !important;
  background: rgba(0,0,0,0.15); /* optionnel: évite un “vide” blanc */
}

.prev, .next{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(0,0,0,.35);
  color: #fff;
  cursor: pointer;
  user-select: none;
}
.prev{ left: 10px; }
.next{ right: 10px; }

/* ====== TEXTE PRESENTATION ====== */
.presentation-text{
  margin-top: 14px;
  background: rgba(0,0,0,.03);
  border-radius: 14px;
  padding: 12px;
}

/* ====== SERVICES ====== */
.services-content{
  display: flex;
  gap: 16px;
  align-items: center; /* centre verticalement */
}
.services-text{ flex: 1; }
.services-image{ width: 240px; flex: 0 0 auto; }
.services-image img{ width: 100%; height: auto; }

/* ====== MAP ====== */
.map-container{
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
}
.map-container iframe{
  width: 100% !important;
  height: 320px;
  border: 0;
  border-radius: 14px;
}

/* ====== FOOTER ====== */
footer{
  padding: 20px 12px;
  text-align: center;
  border-top: 1px solid rgba(0,0,0,.08);
}

/* ====== MOBILE ====== */
@media (max-width: 720px){

  /* Header: logo puis titre centré */
  .header-content{
    flex-direction: column;
    text-align: center;
  }

  .logo-container .logo{
    width: 80px;
    height: 80px;
  }

  .titre-accueil{
    font-size: 20px;
  }

  /* Bouton menu visible */
  .menu-toggle{
    display: block;
  }

  /* MENU : 2 colonnes pour voir Contact sans ouvrir/fermer */
  .menu{
    justify-content: space-around;
  }
  .menu li{
    flex: 0 0 45%;
    text-align: center;
  }

  /* Si tu veux un menu qui se déplie au clic, active ces 3 lignes :
     (et dans ce cas, Contact ne sera visible qu'après clic sur Menu)
  */
  /*
  nav .menu{ display:none; }
  body.nav-open nav .menu{ display:flex; }
  */
  
  /* Services en colonne */
  .services-content{
    flex-direction: column;
  }
  .services-image{
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
  }

  .prev, .next{
    padding: 8px 10px;
  }
}

/* ====== PAYSAGE SMARTPHONE ====== */
@media (max-width: 920px) and (orientation: landscape){
  section{ padding: 12px; }
  .map-container iframe{ height: 240px; }
}

/* Titres SEO : propres et pas envahissants */
section h2{
  margin: 0 0 8px 0;
  font-size: 1.35em;
}

section h3{
  margin: 0 0 12px 0;
  font-size: 1em;
  font-weight: normal;
  opacity: 0.9;
}

/* Accueil : titres centrés et aérés */
#galerie h2,
#galerie h3{
  text-align: center;
}

#galerie h2{
  margin-top: 10px;
}

#galerie h3{
  margin-bottom: 20px;
}

/* Liens SEO discrets (footer) */
.seo-links{
  margin-top: 8px;
  font-size: 12px;
  opacity: 0.7;
}
.seo-links a{
  color: inherit;
  text-decoration: none;
}
.seo-links a:hover{
  text-decoration: underline;
  opacity: 1;
}