@import "./components.css";

:root {
  --primary-color: #a60f2b;
  --white: #ffffff;
  --black: #000000;

  --gray-light: #f6f6f6;
  --text-color: #333;
}

/* GLOBAL */

body {
  margin: 0;
  padding-top: 60px; /* Ajoute un espace pour éviter que le contenu soit caché sous le header */
  font-family: "Segoe UI", "Roboto", "Helvetica", sans-serif;
  color: var(--text-color);
  background: var(--white);
}

.container {
  max-width: 1000px;
  margin: auto;
  padding: 20px 20px;
}

.align-center {
  text-align: center;
}

/* HEADER */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: var(--white);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.nav-container {
  max-width: 1100px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
}

/* LOGO */

.logo a {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--primary-color);
  font-weight: bold;
}

.logo img {
  height: 36px;
}

/* MENU DESKTOP */

.nav-menu {
  display: flex;
  gap: 25px;
}

.nav-menu a {
  text-decoration: none;
  color: var(--primary-color);
  font-weight: 600;
  position: relative;
}

.nav-menu a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: width 0.3s;
}

.nav-menu a:hover::after {
  width: 100%;
}

/* HAMBURGER */

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 26px;
  height: 18px;
  cursor: pointer;
}

.hamburger span {
  height: 3px;
  width: 100%;
  background: var(--primary-color);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* ANIMATION CROIX */

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* OVERLAY */

.menu-overlay {
  z-index: 1;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  transition: 0.3s;
}

.menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* HERO */

.hero-accueil {
  background-image: url("/images/accueil.jpg");
}

/* CARDS */

.features {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

/* MOBILE */

@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: 0;
    right: -260px;
    width: 260px;
    height: 100vh;
    background: white;
    display: flex;
    flex-direction: column;
    padding-top: 80px;
    transition: 0.3s;
    box-shadow: -3px 0 10px rgba(0, 0, 0, 0.15);
    gap: 10px;
  }

  .nav-menu.open {
    right: 0;
  }

  .nav-menu a {
    padding: 15px 25px;
    border-bottom: 1px solid #eee;
  }

  .hamburger {
    display: flex;
  }

  .features {
    flex-direction: column;
  }

  .menu-logo {
    text-align: center;
    padding: 40px 0;
  }

  .menu-logo img {
    height: 100px;
  }
}

@media (min-width: 768px) {
  .menu-logo {
    display: none;
  }
}
