/*
  Feuille de styles principale pour le site Atelier Moto. Pour une meilleure
  lisibilité, les variables CSS sont utilisées pour définir les couleurs
  dominantes et faciliter les ajustements ultérieurs. Le site a été conçu
  afin d'être responsive et agréable à parcourir sur ordinateur comme sur
  mobile.
*/

/* Variables principales */
:root {
  --primary-color: #e63946;    /* Rouge vif pour les accents et les boutons */
  --secondary-color: #2a9d8f;  /* Vert bleuâtre pour les survols */
  --dark-bg: #1d3557;          /* Bleu foncé pour le pied de page */
  --light-text: #f1faee;       /* Couleur claire pour les textes sur fond sombre */
  --max-width: 1100px;         /* Largeur maximale pour le contenu central */
}

/* Réinitialisation de base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  /* Permet un défilement fluide lors des ancres internes */
  scroll-behavior: smooth;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  color: #333;
  line-height: 1.6;
  background-color: #fff;
}

/* Section héros */
.hero {
  background-image: url('images/hero-bg.png');
  background-size: cover;
  background-position: center;
  height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--light-text);
}

/* Superposition sombre pour améliorer la lisibilité du texte sur l'image */
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.45);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 90%;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
}

.btn {
  display: inline-block;
  background: var(--primary-color);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.3s ease;
}

.btn:hover {
  background: var(--secondary-color);
}

/* Section Services */
.services-section {
  padding: 4rem 1rem;
  background: #f9f9f9;
}

.services-section h2 {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 2.2rem;
  color: var(--dark-bg);
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.service-card {
  background: #fff;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  text-align: left;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.service-card h3 {
  margin-bottom: 1rem;
  color: var(--primary-color);
  font-size: 1.5rem;
}

.service-card p {
  font-size: 1rem;
  line-height: 1.5;
}

.service-card img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  margin-bottom: 1rem;
}

/* Section À propos et contact */
.about-section,
.contact-section {
  padding: 4rem 1rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.about-section h2,
.contact-section h2 {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 2rem;
  color: var(--dark-bg);
}

.about-section p {
  font-size: 1.15rem;
  line-height: 1.8;
  text-align: justify;
}

.contact-section p {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  text-align: center;
}

.contact-section ul {
  list-style: none;
  font-size: 1.1rem;
  line-height: 2;
  text-align: center;
}

.contact-section a {
  color: var(--primary-color);
  text-decoration: none;
}

.contact-section a:hover {
  text-decoration: underline;
}

/* Pied de page */
footer {
  background: var(--dark-bg);
  color: var(--light-text);
  text-align: center;
  padding: 1rem 0;
  font-size: 0.9rem;
}

/* Adaptation mobile pour l'en‑tête */
@media (max-width: 600px) {
  .hero h1 {
    font-size: 2.5rem;
  }
  .hero p {
    font-size: 1rem;
  }
  .service-card {
    padding: 1.5rem;
  }
}
