/********** GENERALITIES *********/
/********************************/
@font-face {
  font-family: "Poppins-regular";
  src: url("../assets/fonts/Poppins/Poppins-Regular.woff2") format("woff2"),
    url("../assets/fonts/Poppins/Poppins-Regular.woff") format("woff");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "Poppins-bold";
  src: url("../assets/fonts/Poppins/Poppins-Bold.woff2") format("woff2"),
    url("../assets/fonts/Poppins/Poppins-Bold.woff") format("woff");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "Poppins-SemiBold";
  src: url("../assets/fonts/Poppins/Poppins-SemiBold.woff2") format("woff2"),
    url("../assets/fonts/Poppins/Poppins-SemiBold.woff") format("woff");
  font-weight: normal;
  font-style: normal;
}

:root {
  --primary-color: #c32f27;
  --background-color-charcoal: #414a53;
  --background-color-charcoal-opacity: rgba(65, 74, 83, 0.5);
  --text-color-white: #ffffff;
  --background-color-black: #2c2c2c;
  --text-color-black: #333;
  /* --background-color-white: #f5f5f5; */
  --background-color-white: #ffffff;
  --card-background: rgba(255, 255, 255, 0.9);
  --gradient: linear-gradient(
    120deg,
    var(--background-color-charcoal),
    var(--primary-color)
  );
  --box-shadow-default: 0 5px 15px rgba(0, 0, 0, 0.05);
  --transition-default: all 0.3s ease;
}

html {
  font-size: 62.5%;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Poppins-regular", sans-serif;
  line-height: 1.6;
  background-color: var(--background-color-white);
  color: var(--text-color-black);
  font-size: 1.6rem;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}
img {
  object-fit: cover;
  width: 100%;
  height: 100%;
}

.title-h1 {
  color: var(--text-color-black);
  font-size: 3.5rem;
  line-height: 1.2;
}

h2 {
  margin-bottom: 1rem;
  color: var(--text-color-white);
}

a {
  text-decoration: none;
}
li {
  list-style-type: none;
}
input,
textarea {
  outline: none;
}

/* HEADER NAV */

.header {
  padding: 0 1rem;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  height: 100px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  background-color: var(--background-color-charcoal);
}
.header h2 {
  color: var(--primary-color);
}

.logoContainer {
  max-width: 290px;
  height: 100%;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
}

.nav ul {
  display: flex;
  list-style-type: none;
  transition: all 0.3s ease;
}

.nav ul li {
  margin-left: 20px;
}

.nav ul li a {
  color: var(--text-color-white);
  text-decoration: none;
  font-size: 1.8rem;
  transition: opacity 0.3s ease;
  transition: all 0.3s ease;
}

#nav-menu li a:hover {
  opacity: 0.7;
}
#nav-menu li a.active {
  opacity: 0.5;
}

.burger {
  display: none;
  cursor: pointer;
  width: 30px;
  height: 20px;
  position: relative;
}

.burger .line {
  width: 100%;
  height: 2.5px;
  position: absolute;
  background-color: var(--background-color-white);
  transition: transform 0.3s ease, opacity 0.3s ease; /* Augmenter la durée de transition */
  transform: translateZ(0);
  will-change: transform, opacity;
}

.burger .line:nth-child(1) {
  top: 0;
}

.burger .line:nth-child(2) {
  top: 50%;
  transform: translateY(-50%);
}

.burger .line:nth-child(3) {
  bottom: 0;
}

.burger.active .line:nth-child(1) {
  transform: translateY(9px) rotate(45deg); /* Utiliser translateY pour éviter les conflits */
}

.burger.active .line:nth-child(2) {
  opacity: 0;
}

.burger.active .line:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg); /* Utiliser translateY pour éviter les conflits */
}

main {
  margin-top: 100px;
}

.cta-button {
  all: unset;
  display: inline-block;
  background-color: var(--primary-color);
  color: var(--text-color-white);
  padding: 0.8rem 2rem;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  transition: all 0.3s ease;
  border: 2px solid var(--primary-color);
  margin: 2rem 0;
  text-align: center;
  cursor: pointer;
}

.cta-button:hover {
  opacity: 0.8;
}
.semi-bold {
  font-family: "Poppins-SemiBold";
}

footer {
  text-align: center;
  padding: 1.5rem 0;
  color: var(--text-color-white);
  font-size: 1.4rem;
  background-color: var(--background-color-charcoal);
}

footer .container {
  padding: 0;
}
footer p {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}
footer a {
  color: var(--text-color-white);
  padding-right: 0.3rem;
  display: flex;
  align-items: center;
}
.mentions-footer {
  margin-left: 0.5rem;
  margin-right: 0.5rem;
}
.mentions-footer:hover {
  text-decoration: underline;
}

footer img {
  height: 37px;
  width: 133px;
  margin-top: 0;
  vertical-align: middle;
}

/*************************************/
/***** HOME PAGE *****/
.body-home {
  overflow: hidden;
  position: relative;
}

.home-main {
  margin-top: 100px;
  background-image: url("../assets/img/img-service/utility-vehicle/utility-vehicle-1.jpg");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  width: 100vw;
  height: 100vh;
}

.home-main .hero {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 100;
  background-color: var(--background-color-charcoal-opacity);
  background-color: rgba(65, 74, 83, 0.6);
  border-radius: 5px;
  padding: 0;
}

.title-home {
  padding: 0;
  margin: 0;
  font-size: 5rem;
  color: var(--text-color-white);
  line-height: 1.3;
}

.hero p {
  font-size: 2rem;
  margin: 0 5px;
  color: var(--text-color-white);
}

/*************************************/
/***** SERVICES PAGE *****/
.services-main {
  margin-bottom: 5rem;
  padding-top: 2.8rem;
}

.services-grid-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  gap: 3rem;
  margin-top: 2rem;
  margin-bottom: 5rem;
}

.service-card {
  display: flex;
  flex: 1 1 250px;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  background-color: var(--card-background);
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  margin-top: 3rem;
  text-align: center;
  width: 100%;
}

.service-card:hover {
  transform: translateY(-7px);
}

.service-card h3 {
  color: var(--text-color-black);
  margin-bottom: 1rem;
  opacity: 1;
}
.flex-fa {
  display: flex;
  justify-content: center;
  gap: 2rem;
}

.service-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.section-service-article {
  padding: 0 2rem;
  margin-top: 2rem;
}

.service-article h2 {
  color: var(--text-color-black);
  margin-bottom: 15px;
}

/* Style de base pour l'article */
.service-article {
  background-color: rgba(65, 74, 83, 0.08);
  position: relative;
  z-index: 1;
  padding: 20px;
  margin-top: 4rem;
  margin-bottom: 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transform: translateY(20px);
  animation: fadeIn 0.8s ease-out forwards;
}

@keyframes fadeIn {
  to {
    transform: translateY(0);
  }
}

/* Mise en page en ligne pour grands écrans */
.service-description-carousel {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* Contenu textuel */
.description-article {
  flex: 1;
  font-size: 1em;
  transition: transform 0.3s ease, color 0.3s ease;
}
.margin-top-service-card {
  margin-top: 1rem;
}

.description-article:hover {
  transform: translateY(-5px);
}

/* law Hamon */

#info-light-vehicle-towing-service,
#info-description-utility-vehicle-towing-service {
  margin-top: 2rem;
}

.button-law-section {
  cursor: pointer;
  color: var(--primary-color);
  text-decoration: none;
}

/* Carrousel */
.carousel {
  flex: 1;
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 600px;
  max-height: 350px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.carousel-slide {
  display: flex;
  transition: transform 0.5s ease;
  width: 100%;
  height: 100%;
}

.carousel-slide img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  flex: 0 0 auto;
}

/* Boutons de navigation */
button.prev,
button.next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.5);
  color: var(--text-color-white);
  border: none;
  padding: 10px;
  cursor: pointer;
  font-size: 1.5em;
  border-radius: 50%;
  transition: background-color 0.3s ease;
}

button.prev:hover,
button.next:hover {
  background-color: rgba(0, 0, 0, 0.7);
}

button.prev {
  left: 10px;
}

button.next {
  right: 10px;
}

.carousel {
  flex: 1;
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 600px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.carousel-slide {
  display: flex;
  transition: transform 0.5s ease;
  width: 100%;
}

.carousel-slide img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  flex: 0 0 auto;
  object-fit: cover;
}

/* Boutons de navigation */
button.prev,
button.next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.5);
  color: var(--text-color-white);
  border: none;
  width: 30px;
  height: 30px;
  padding: 0.5rem;
  cursor: pointer;
  font-size: 1.2em;
  border-radius: 50%;
  transition: background-color 0.3s ease;
}

button.prev:hover,
button.next:hover {
  background-color: rgba(0, 0, 0, 0.7);
}

button.prev {
  left: 10px;
}

button.next {
  right: 10px;
}

.section-service-article a {
  display: block;
  margin: 0 auto;
  margin-top: 2.5rem;
  width: 200px;
  text-align: center;
  padding: 0.75rem 1rem;
}

.scrollToTop {
  all: unset;
  position: fixed;
  z-index: 10;
  bottom: 55px;
  right: 20px;
  /* display: none; */
  visibility: hidden;
  opacity: 0;
  width: 40px;
  height: 40px;
  background-color: var(--primary-color);
  border-radius: 50%;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  transition: opacity 0.3s ease, background 0.3s ease;
}

.scrollToTop a {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  color: var(--text-color-white);
  font-size: 24px;
  text-decoration: none;
}

.scrollToTop:hover {
  opacity: 0.8;
}

.show {
  visibility: visible;
  opacity: 1;
}

/*************************************/
/***** CONTACT PAGE *****/

.contact-main {
  background-size: cover;
  background-position: center;
  padding-bottom: 3rem;
  padding-top: 0.8rem;
}
.banner-contact h1 {
  margin-top: 4rem;
  margin-bottom: 2rem;
}

.banner-contact h1,
.banner-contact p {
  text-align: center;
  color: var(--text-color-black);
}
.banner-contact p {
  text-align: center;
  font-size: 2rem;
  padding: 0 0.7rem;
}
.contact-grid {
  padding-left: 0.7rem;
  padding-right: 0.7rem;
}

.contact-info,
.contact-form {
  background-color: rgba(65, 74, 83, 0.8);
  margin: 4rem auto;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  max-width: 600px;
  width: 100%;
}
.contact-info {
  margin-top: 5rem;
  color: var(--text-color-white);
}

.contact-info ul {
  list-style-type: none;
}

.contact-info li {
  margin-bottom: 1rem;
}

.contact-info li a {
  color: var(--text-color-white);
  text-decoration: none;
}

#contact-form article {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}
#contact-form article div {
  width: 47%;
}

#contact-form label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
  color: var(--text-color-white);
}

#contact-form label.required::after,
.terms label::after {
  content: "*";
  color: red;
}

#contact-form input,
#contact-form textarea,
#contact-form select,
#contact-form .cta-button {
  width: 100%;
  padding: 10px;
  margin-bottom: 15px;
  border-radius: 4px;
  box-sizing: border-box;
  border: 1px solid transparent;
  background-color: var(--background-color-white);
  background-clip: padding-box;
  transition: background-color 0.3s;
  cursor: pointer;
}
#contact-form .cta-button {
  background-color: var(--primary-color);
}

#contact-form input:hover,
#contact-form textarea:hover,
#contact-form select:hover {
  opacity: 0.7;
}
#contact-form input:focus,
#contact-form textarea:focus,
#contact-form select:focus {
  opacity: 1;
}

#contact-form select {
  outline: none;
  padding: 7px;
  text-align: center;
  color: var(--text-color-black);
}
.explanation {
  font-style: italic;
  font-size: 1.5rem;
  text-align: left;
  margin-bottom: 2rem;
  color: #000000;
}

.explanation span {
  color: var(--primary-color);
  font-size: 22px;
}

#contact-form .terms {
  display: flex;
  align-items: center;
  margin-bottom: 2rem;
  margin-top: 1rem;
}

#contact-form .terms input {
  display: none;
}

#contact-form .terms label {
  position: relative;
  padding-left: 30px;
  cursor: pointer;
}
#contact-form .terms label a {
  color: red;
}

/* Style de la case à cocher personnalisée */
#contact-form .terms label::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  border-radius: 3px;
  background-color: var(--background-color-white);
  box-sizing: border-box;
}

/* Style pour la case cochée */
#contact-form .terms input:checked + label::before {
  background-color: var(--primary-color);
}

/* Afficher le symbole de coche */
#contact-form .terms input:checked + label::after {
  content: "✓";
  position: absolute;
  left: 4px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-color-white);
  font-weight: bold;
  font-size: 16px;
}

.error-messages p::before {
  content: "*";
  color: red;
  padding-right: 0.5rem;
}

/* Styles pour l'indicateur de chargement */
#loading-indicator {
  position: fixed;
  top: 15rem;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.spinner {
  border: 8px solid #f3f3f3;
  border-top: 8px solid var(--background-color-charcoal);
  border-radius: 50%;
  width: 45px;
  height: 45px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/*************************************/
/***** ABOUT PAGE *****/
.about-body {
  --background-color-white: #f5f5f5;
}

.about-banner {
  position: relative;
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--background-color-charcoal-opacity);
  overflow: hidden;
}

.about-banner::before {
  content: "";
  position: absolute;
  width: 150%;
  height: 150%;
  background: var(--gradient);
  opacity: 0.8;
  animation: rotate 15s linear infinite;
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.about-banner-content {
  z-index: 1;
  text-align: center;
  padding: 0 2rem;
}

.phone-element {
  position: absolute;
  right: 4rem;
  bottom: 9rem;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  color: var(--text-color-white);
}

.phone-element a {
  margin-left: 0.5rem;
  color: var(--text-color-white);
  font-weight: bold;
}

.phone-element a[href^="tel:"] {
  padding: 5px 10px;
  background-color: var(--primary-color);
  color: var(--text-color-white);
  margin: 0 auto;
}

.title-about {
  font-size: 4rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-color-white);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.about-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem 0 2rem;
  transform: translateY(-80px);
}

.about-section {
  background: white;
  border-radius: 15px;
  padding: 3rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  margin: 0 2rem;
}

.about-section-first {
  margin-bottom: 4rem;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 3rem;
  margin-top: 4rem;
}
.about-grid strong {
  font-weight: bold;
  color: var(--primary-color);
}

.about-service-card {
  background-color: var(--card-background);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: var(--box-shadow-default);
  transition: var(--transition-default);
  position: relative;
  overflow: hidden;
}

.about-service-card::before,
.about-service-card::after {
  content: "";
  position: absolute;
  background: var(--gradient);
}

.about-service-card::before {
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.about-service-card::after {
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
}

.about-service-card:hover {
  transform: translateY(-5px);
}

.about-service-card:hover::before {
  transform: scaleX(1);
}

.icon-about {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
  transition: var(--transition-default);
}

.about-service-card:hover .icon-about {
  color: var(--text-color-white);
  background-color: var(--primary-color);
  border-radius: 50%;
  padding: 0.5rem;
}

.about-container h2 {
  margin-bottom: 3rem;
  color: var(--text-color-black);
  position: relative;
  display: inline-block;
}

.about-container h2::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 60%;
  height: 4px;
  background: var(--gradient);
  border-radius: 2px;
}

.about-container h3 {
  margin-bottom: 1rem;
  color: var(--text-color-black);
}

.about-container p {
  color: var(--text-color-black);
}

.cta-button-about {
  margin-top: 2rem;
}

/* #scrollToTop {
  position: fixed;
  right: 4.5rem;
  bottom: 4rem;
} */

.animate-in {
  opacity: 0;
  transform: translateY(50px);
  animation: slideIn 0.8s ease forwards;
}

@keyframes slideIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/*************************************/
/***** MENTIONS PAGE *****/
.main-mentions {
  margin: 13rem 2rem 2rem 2rem;
  padding: 2rem;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
}
.main-mentions .container {
  padding: 1rem;
  background-color: var(--card-background);
}

.main-mentions h2 {
  font-size: 2em;
  color: #333;
  margin-bottom: 2rem;
  line-height: 1.2;
}

.main-mentions h3 {
  font-size: 1.5em;
  margin-top: 20px;
  margin-bottom: 0;
  padding: 0;
  line-height: 1.2;
}

.main-mentions p {
  font-size: 1em;
  margin-top: 0.5rem;
  margin-bottom: 15px;
}

.main-mentions a {
  color: var(--text-color-black);
  text-decoration: none;
}

.main-mentions a:hover {
  text-decoration: underline;
}
.mentions-contact a {
  color: var(--text-color-black);
}
