/* ===== VARIABLES ===== */
:root {
  --primary-color: #f57c00;   /* Orange chantier */
  --primary-dark: #e65100;    /* Ton plus foncé pour hover */
  --text-color: #333;
  --bg-light: #fff;
}

/* ===== RESET ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background: var(--bg-light);
}

a {
  color: var(--primary-color);
  text-decoration: none;
}

a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

a.active {
  border-bottom: 2px solid var(--primary-color);
}

/* ===== HEADER & NAV ===== */
.site-header {
  background: whitesmoke;  /* Noir pour header */
  border-bottom: 1px solid #ddd;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.main-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  padding: 2rem;
}

.main-nav a {
  font-weight: bold;
  color: var(--primary-dark);
}

.main-nav a.active {
  color: #FF6600;  /* Orange travaux pour lien actif */
}

/* ===== HERO ===== */
.hero {
  background:whitesmoke;
  text-align: center;
  padding: 5rem 1rem;
}

.hero h1,
.hero h2 {
  font-size: 2.0rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.hero p {
  font-size: 1.2rem;
}

.btn {
  display: inline-block;
  background: var(--primary-dark);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 5px;
  margin-top: 1rem;
}

.btn:hover {
  background: var(--primary-color);
}

/* ===== SERVICES OVERVIEW ===== */
.services-overview {
  text-align: center;
  padding: 4rem 1rem;
}

.services-overview .btn {
  background:var(--primary-dark);
  color: white;
}

/* ===== INDEX SERVICES GRID ===== */
.index-services {
  display: flex;
  justify-content: center;
}

.index-services .services-grid {
  display: flex;
  gap: 20px;
  flex-wrap: nowrap;
}

.index-services .service-card {
  width: 300px;
  height: 250px;
  background: whitesmoke;
  padding: 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.index-services .service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 12px 25px var(--primary-color);
}

/* ===== SERVICES GRID (Autre page) ===== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-top: 2rem;
}

.service-item,
.service-card {
  border-radius: 8px;
  transition: box-shadow 0.3s ease;
}

.service-item {
  border: 1px solid #ddd;
  padding: 2rem;
  background: whitesmoke;
}

.service-item:hover {
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.service-item h2 a {
  color: var(--primary-color);
}

.service-item h2 a:hover {
  color: var(--primary-dark);
}

/* ===== SLIDER (index only) ===== */
.index-page .container {
  display: flex;
  justify-content: center;
  height: 100vh;
}

.index-page .slider {
  width: 1350px;
  height: 500px;
  overflow: hidden;
  position: relative;
  border: 5px solid var(--primary-color);
  box-shadow: 0 0 10px white;
}

.index-page .slides {
  display: flex;
  width: calc(1350px * 4);
  animation: slide 95s infinite;
}

.index-page .slides img {
  width: 1350px;
  height: 500px;
  object-fit: cover;
}

@keyframes slide {
  0% { transform: translateX(0%); }
  100% { transform: translateX(-100%); }
}

/* ===== LAYOUT CONTAINERS ===== */
main {
  max-width: 1500px;
  margin: 2rem auto;
  padding: 0 1rem 4rem;
}

footer {
  background: whitesmoke;
  color: var(--primary-dark);
  text-align: center;
  padding: 4rem 1rem;
  margin-top: 4rem;
  font-size: 1.2rem;
}

footer address {
  font-style: normal;
  margin-bottom: 0.5rem;
}

footer p {
  margin-top: 0.5rem;
}

footer a {
  color: #ddd;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .main-nav ul {
    flex-direction: column;
    gap: 1rem;
  }
}

@media (max-width: 600px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
}

/* Mise en page spécifique à cette section */
.index-services .services-grid {
  display: grid;
  grid-template-columns: 1fr; /* 1 carte par ligne par défaut (téléphones) */
  gap: 20px; /* espace entre les cartes */
}

/* Écrans d'ordinateur */
@media (min-width: 1024px) {
  .index-services .services-grid {
    grid-template-columns: repeat(4, 1fr); /* 4 cartes par ligne sur desktop */
  }
}

/* Optionnel : style des cartes pour un rendu propre */
.index-services .service-card {
  background: #fff;
  border: 1px solid #ddd;
  padding: 20px;
  text-align: center;
  border-radius: 8px;
}


/* Mobile uniquement */
@media (max-width: 768px) {
  .site-header {
    position: fixed;
    top: 0; left: 0; width: 100%;
    background: #fff;
    z-index: 9999;
    transition: transform 0.3s ease-in-out;
    will-change: transform;
  }

  .site-header.hidden {
    transform: translateY(-100%);
  }

  body {
    padding-top: var(--header-h, 60px);
  }

  body.header-hidden {
    padding-top: 0;
  }
}
