/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  color: #fff;
  font-size: 10px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Roboto", sans-serif;
}

p,
p a {
  font-family: "Open Sans", sans-serif;
}

li,
li a {
  font-family: "Montserrat", sans-serif;
}

ul {
  list-style: none;
}

a {
  color: #fff;
  text-decoration: none;
}

/* Classes génériques */

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* Header */
.header-site {
  background-color: #2c3e50;
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 1000;
  padding: 15px 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-site nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#logo {
  color: white;
  text-decoration: none;
  font-family: "Open Sans", sans-serif;
  font-size: 2.3em;
  font-weight: 700;
}

#logo span {
  color: #3498db;
}

/* Menu de navigation */
.header-site nav ul {
  display: flex;
}

.header-site nav ul li {
  margin-left: 20px;
}

.header-site nav ul li a {
  font-size: 1.7em;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 4px;
  transition: color 0.3s;
}

.header-site nav ul li a:hover,
.header-site nav ul li a.active {
  color: #3498db;
  background-color: rgba(255, 255, 255, 0.1);
}

/* Bouton burger (mobile) */
.mobile-menu {
  display: none;
  font-size: 2.5em;
  padding: 10px;
  cursor: pointer;
}

.mobile-menu i {
  display: block;
  margin: 5px auto;
  transition: all 0.3s ease;
}

/* Hero - 1ère section */
.hero {
  background:
    linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)),
    url("depannage_informatique.jpg") no-repeat center center/cover;
  height: 100vh;
  display: flex;
  align-items: center;
  text-align: center;
  padding-top: 70px;
}

.hero h1 {
  font-size: 4.3em;
  margin-bottom: 20px;
}

.hero h2 {
  font-size: 2.3em;
  margin-bottom: 30px;
}

.btn {
  display: inline-block;
  background: #3498db;
  font-size: 2em;
  padding: 10px 20px;
  border-radius: 5px;
  transition: background 0.3s;
}

.btn:hover {
  background-color: #2980b9;
}

/* 2ème section */
section:nth-child(2) {
  background-color: #ecf0f1;
  padding: 50px 0;
}

section:nth-child(2) .container {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  flex-wrap: wrap;
}

.columns {
  flex: 0 0 calc(33.33% - 20px); /* 3 blocs par ligne */
  background-color: #fff;
  text-align: center;
  margin: 10px;
  padding: 20px;
  border-radius: 5px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  opacity: 0; /* Initialement invisible */
  transform: translateY(0); /* Position initiale */
  transition: all 0.3s ease; /* Transition pour l'animation */
  animation: fadeInUp 0.5s ease forwards; /* Animation au chargement */
}

/* Délai pour chaque bloc (pour un effet en cascade) */
.columns:nth-child(1) {
  animation-delay: 0.1s;
}
.columns:nth-child(2) {
  animation-delay: 0.2s;
}
.columns:nth-child(3) {
  animation-delay: 0.3s;
}
.columns:nth-child(4) {
  animation-delay: 0.4s;
}
.columns:nth-child(5) {
  animation-delay: 0.5s;
}
.columns:nth-child(6) {
  animation-delay: 0.6s;
}

.columns:hover {
  background-color: #f9f9f9; /* Fond légèrement plus clair */
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15); /* Ombre plus marquée */
  transform: translateY(-5px); /* Lève légèrement le bloc */
}

.columns i {
  color: #3498db;
  font-size: 4em;
  margin-bottom: 20px;
  transition: color 0.3s ease; /* Animation pour l'icône */
}

.columns:hover i {
  color: #2980b9; /* Couleur plus foncée au survol */
}

.columns h3 {
  color: #000;
  font-size: 2em;
  font-weight: 400;
  transition: color 0.3s ease; /* Animation pour le titre */
}

.columns:hover h3 {
  color: #3498db; /* Changement de couleur du titre */
}

.columns p {
  color: #000;
  font-size: 1.5em;
  line-height: 1.6;
  font-weight: 300;
}

/* 3ème section + animation */
section:nth-child(3) {
  background-color: #fff;
  padding: 80px 0;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.6s ease forwards;
}

.content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.text {
  flex: 1;
  padding-right: 30px;
}

.text h2 {
  color: #2c3e50;
  font-size: 2.3rem;
  font-weight: 500;
  margin-bottom: 20px;
}

.text p {
  color: #2c3e50;
  font-size: 1.6em;
  line-height: 1.8;
  margin-bottom: 20px;
}

.text p i {
  color: #3498db;
}

.image {
  flex: 1;
  text-align: center;
}

.image img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

section:nth-child(3) .btn {
  display: inline-block;
  margin-top: 20px;
}

/* Services avancés - Avec images */
.services {
  background-color: #f8f9fa;
  padding: 80px 0;
}

.services .header-section {
  text-align: center;
  margin-bottom: 50px;
  animation: fadeIn 0.8s ease-out;
}

.services h2 {
  color: #2c3e50;
  font-size: 3.8em;
  font-weight: 500;
  margin-bottom: 15px;
}

.services .subtitle {
  max-width: 700px;
  color: #666;
  font-size: 1.8em;
  margin: 0 auto;
  animation: fadeIn 1s ease-out;
}

/* Grille principale */
.services-grid {
  display: grid;
  grid-template-columns: 2fr 1fr; /* 2 colonnes sur desktop */
  gap: 25px;
}

/* Cartes larges pour les sections 1, 3 et 5 sur desktop */
.service-card:nth-child(1),
.service-card:nth-child(3),
.service-card:nth-child(5) {
  grid-column: 1 / 2; /* Occupe 2 colonnes */
  min-height: 350px; /* Hauteur minimal pour desktop */
}

/* Cartes larges pour les sections 2, 4 et 6 sur desktop */
.service-card:nth-child(2),
.service-card:nth-child(4),
.service-card:nth-child(6) {
  grid-column: 2 / 3; /* Occupe 1 colonne */
  min-height: 350px; /* Hauteur minimal pour desktop */
}

.service-card {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  opacity: 0;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  transform: translateY(20px);
  transition: all 0.4s cubic-bezier(0.2, 0.8, 0.4, 1);
  animation: fadeInUp 0.6s ease-out forwards;
  animation-duration: 0.8s; /* Ralentit l'animation */
}

.service-card:hover {
  box-shadow: 0 12px 25px rgba(52, 152, 219, 0.2); /* Ombre bleue */
  transform: translateY(-5px) scale(1.02);
}

.service-card:nth-child(1) {
  animation-delay: 0.1s;
}

.service-card:nth-child(2) {
  animation-delay: 0.2s;
}

.service-card:nth-child(3) {
  animation-delay: 0.3s;
}

.service-card:nth-child(4) {
  animation-delay: 0.4s;
}

.service-card:nth-child(5) {
  animation-delay: 0.5s;
}

.service-card:nth-child(6) {
  animation-delay: 0.6s;
}

.card-image {
  height: 200px;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.6s cubic-bezier(0.2, 0.8, 0.4, 1);
}

.service-card:hover .card-image img {
  transform: scale(1.08) rotate(1deg);
}

.card-content {
  padding: 25px;
}

.card-content h3 {
  color: #2c3e50;
  font-size: 2.4em;
  font-weight: 400;
  margin-bottom: 15px;
}

.card-content p {
  color: #555;
  font-size: 1.6em;
  line-height: 1.6;
  margin-bottom: 20px;
}

.list {
  padding: 0;
  margin-bottom: 20px;
}

.list li {
  display: flex;
  align-items: center;
  color: #666;
  font-size: 1.7em;
  opacity: 0.9;
  margin-bottom: 15px;
  transform: translateX(-10px);
  transition: all 0.3s ease;
  animation: fadeInLeft 0.4s ease-out forwards;
}

.list li:nth-child(1) {
  animation-delay: 0.7s;
}

.list li:nth-child(2) {
  animation-delay: 0.8s;
}

.list li:nth-child(3) {
  animation-delay: 0.9s;
}

.list i {
  color: #3498db;
  font-size: 1em;
  margin-right: 10px;
}

.card-link {
  display: inline-flex;
  align-items: center;
  background-color: #3498db;
  color: #fff;
  font-size: 1.8em;
  text-decoration: none;
  padding: 5px 10px;
  transition: background 0.3s ease;
}

.card-link:hover {
  background: #2980b9;
}

.card-link i {
  font-size: 1em;
  margin-left: 5px;
  padding-top: 2px;
}

/* Formulaire de contact */
.contact-section {
  background-color: #ecf0f1;
  padding: 50px 0;
}

.contact-flex {
  display: flex;
  align-items: stretch;
  gap: 50px;
}

.contact-form,
.contact-map {
  flex: 1 1 0;
  background-color: #fff;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.contact-form h2 {
  color: #2c3e50;
  font-size: 3.8em;
  font-weight: 500;
  text-align: center;
  margin-bottom: 25px;
}

.contact-form form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form-group label {
  color: #2c3e50;
  font-size: 1.8em;
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  width: 100%;
  font-size: 1.6em;
  border: 1px solid #ddd;
  padding: 10px;
  border-radius: 5px;
  outline: none;
  transition: all 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: #3498db;
}

.form-group textarea {
  min-height: 240px;
  resize: vertical;
}

.btn-submit {
  align-self: flex-start;
  background-color: #3498db;
  color: #fff;
  border: 0;
  font-size: 1.6em;
  padding: 10px 30px;
  margin-top: 10px;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.3s;
}

.btn-submit:hover {
  background: #2980b9;
}

.error {
  display: none;
  color: #e74c3c;
  font-size: 1.4em;
  margin-top: 5px;
}

.success-message {
  display: none;
  color: #00ff00;
  font-size: 1.4em;
  margin-top: 5px;
}

/* Carte Google Maps */

.contact-map {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.map-container {
  border: 0;
  border-radius: 10px;
  overflow: hidden;
}

.map-container iframe {
  display: block;
  width: 100% !important;
  height: 280px !important;
  border: 0 !important;
}

.map-info {
  background-color: #f8f9fa;
  padding: 20px;
  border-radius: 10px;
}

.map-info h3 {
  color: #2c3e50;
  font-size: 2.4em;
  font-weight: 300;
  text-align: center;
  margin-bottom: 15px;
}

.map-info p {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #555;
  font-size: 1.4em;
  margin-bottom: 10px;
}

.map-info i {
  width: 18px;
  text-align: center;
  color: #3498db;
}

.map-info p a {
  color: #555;
}

.map-info p a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Flèche retour en haut */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #3498db;
  color: #fff;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0.8;
  transition: all 0.3s;
}

.back-to-top:hover {
  opacity: 1;
  transform: translateY(-5px);
}

/* Footer */
footer {
  background-color: #2c3e50;
  font-family: "Open Sans", sans-serif;
  font-size: 1.7em;
  text-align: center;
  padding: 20px 0;
}

/* Tablette */
@media screen and (max-width: 1023px) and (min-width: 768px) {
  .hero {
    background:
      linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)),
      url("depannage_informatique.jpg") no-repeat center center/cover;
    height: 80vh;
  }

  .columns {
    flex: 0 0 calc(50% - 20px); /* 2 blocs par ligne sur tablette */
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  /* Cartes larges pour les sections sur Tablette */
  .service-card:nth-child(1),
  .service-card:nth-child(3),
  .service-card:nth-child(5),
  .service-card:nth-child(2),
  .service-card:nth-child(4),
  .service-card:nth-child(6) {
    grid-column: 1 / 3; /* Occupe 1 colonne */
    min-height: 300px;
  }

  .card-image {
    height: 220px;
  }

  .service-card {
    animation: fadeIn 0.5s ease-out forwards;
  }

  .contact-flex {
    flex-direction: column;
  }
}

/* Mobile */
@media screen and (max-width: 767px) {
  .container {
    width: 100%;
  }

  .header-site nav ul {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background-color: #2c3e50;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
    clip-path: circle(0px at 90% -10%);
    transition: all 0.5s ease-out;
    pointer-events: none;
  }

  .header-site nav ul.active {
    clip-path: circle(1000px at 90% -10%);
    pointer-events: all;
  }

  .header-site nav ul li {
    margin: 10px 0;
  }

  .mobile-menu {
    display: block;
  }

  /* Cache l'icône "bars" et affiche la croix quand le menu est ouvert */
  .mobile-menu.active .fa-bars {
    display: none;
  }

  .mobile-menu.active::after {
    content: "\f00d"; /* Code Font Awesome pour la croix (×) */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
  }

  .hero {
    height: 80vh;
  }

  .hero h1 {
    font-size: 3.2em;
  }

  .hero h2 {
    font-size: 2.2em;
  }

  .columns {
    flex: 0 0 100%; /* 1 bloc par ligne sur mobile */
    margin: 10px 0;
  }

  .content {
    flex-direction: column;
  }

  .text {
    padding-right: 0;
    margin-bottom: 30px;
    text-align: center;
  }

  .image {
    max-width: 100%;
  }

  .services {
    padding: 100px 0 75px 0;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  /* Cartes larges pour les sections sur Mobile */
  .service-card:nth-child(1),
  .service-card:nth-child(3),
  .service-card:nth-child(5),
  .service-card:nth-child(2),
  .service-card:nth-child(4),
  .service-card:nth-child(6) {
    grid-column: 1 / 3; /* Occupe 1 colonne */
    min-height: 280px;
    animation: fadeIn 0.5s ease-out forwards;
  }

  .card-image {
    height: 180px;
  }

  .list li {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .contact-flex {
    flex-direction: column;
    gap: 25px;
  }

  .contact-form h2 {
    font-size: 3.4em;
  }

  .map-container iframe {
    height: 360px !important;
  }
}

@media screen and (max-width: 400px) {
  .container {
    width: 100%;
  }
  .contact-form h2 {
    font-size: 3.2em;
  }

  .form-group label {
    font-size: 1.6em;
  }

  .form-group input,
  .form-group textarea {
    font-size: 1.4em;
  }

  .btn-submit {
    font-size: 1.4em;
  }

  .error,
  .success-message {
    font-size: 1.2em;
  }

  .map-info h3 {
    font-size: 1.8em;
  }

  .map-info p {
    font-size: 1.2em;
  }
}

/* Animations clés */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fade {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
