/* ===========================================
   VARIABLES CSS
   =========================================== */
:root {
  --color-primary: #2a466e;
  --color-primary-light: #3a5680;
  --color-secondary: #ffffff;
  --color-text: #333333;
  --color-text-light: #666666;
  --color-bg: #ffffff;
  --color-bg-dark: #1a1a1a;
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --max-width: 1200px;
  --transition: 0.3s ease;
}

/* ===========================================
   RESET CSS
   =========================================== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  user-select: none;
}

body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  user-select: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

ul, ol {
  list-style: none;
}

/* ===========================================
   UTILITAIRES
   =========================================== */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--spacing-sm);
}

/* ===========================================
   NAVBAR
   =========================================== */
.navbar {
  position: fixed;
  top: 1rem;
  left: 1rem;
  right: 1rem;
  z-index: 1000;
  background-color: var(--color-secondary);
  padding: var(--spacing-sm);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.navbar__container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 0 0.5rem;
}

.navbar__logo {
  height: 48px;
  width: auto;
}

.navbar__burger {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 24px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.navbar__burger span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--color-text);
  border-radius: 2px;
  transition: var(--transition);
}

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

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

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

.navbar__menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  right: 0;
  background-color: var(--color-secondary);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-md);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  transform: translateY(-1rem);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.navbar__menu.active {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.navbar__link {
  color: var(--color-text);
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: 4px;
  transition: var(--transition);
  font-size: 1.3rem;
  font-weight: 500;
}

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

/* ===========================================
   HERO SECTION
   =========================================== */
.hero {
  position: relative;
  height: 100vh;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero__background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("../soudage.png");
  background-size: cover;
  background-position: center;
  background-attachment: scroll;
  z-index: -2;
}

.hero__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(42, 70, 110, 0.85) 0%, rgba(26, 26, 26, 0.75) 100%);
  z-index: -1;
}

.hero__content {
  padding: var(--spacing-lg);
  max-width: 800px;
  animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero__title {
  color: var(--color-secondary);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: var(--spacing-sm);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero__subtitle {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1rem;
  margin-bottom: var(--spacing-lg);
  line-height: 1.8;
}

.hero__cta {
  display: inline-block;
  background-color: var(--color-secondary);
  color: var(--color-primary);
  padding: var(--spacing-sm) var(--spacing-lg);
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.hero__cta:hover {
  background-color: var(--color-primary);
  color: var(--color-secondary);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.hero__cta--secondary {
  background-color: transparent;
  color: var(--color-secondary);
  border: 2px solid var(--color-secondary);
  margin-top: var(--spacing-sm);
}

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

.hero__scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--color-secondary);
  font-size: 0.9rem;
  opacity: 0.8;
  animation: bounce 2s infinite;
}

.hero__scroll span {
  display: block;
  width: 24px;
  height: 24px;
  margin: 0.5rem auto 0;
  border-right: 2px solid var(--color-secondary);
  border-bottom: 2px solid var(--color-secondary);
  transform: rotate(45deg);
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
  40% { transform: translateX(-50%) translateY(-10px); }
  60% { transform: translateX(-50%) translateY(-5px); }
}

section {
  padding: var(--spacing-lg) 0;
}

/* ===========================================
   SECTION PRODUITS
   =========================================== */
.produits {
  background-color: #f8f9fa;
}

.produits__title {
  text-align: center;
  font-size: 2rem;
  color: var(--color-primary);
  margin-bottom: var(--spacing-xl);
}

.produits__category {
  margin-bottom: var(--spacing-xl);
}

.produits__category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
}

.produits__category-title {
  font-size: 1.3rem;
  color: var(--color-text);
  padding-bottom: var(--spacing-xs);
  border-bottom: 3px solid var(--color-primary);
}

.produits__voir-tout {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
  padding: 8px 16px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.produits__voir-tout:hover {
  background-color: var(--color-primary);
  color: var(--color-secondary);
}

.produits__voir-tout svg {
  transition: var(--transition);
}

.produits__voir-tout:hover svg {
  transform: translateX(3px);
}

/* ===========================================
   CAROUSEL
   =========================================== */
.carousel {
  position: relative;
  width: 100%;
}

.carousel__track-container {
  overflow: hidden;
  margin: 0 45px;
}

.carousel__track {
  display: flex;
  transition: transform 0.4s ease;
}

.carousel__slide {
  flex: 0 0 100%;
  padding: 0 5px;
}

.carousel__slide img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  object-position: center;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.carousel__slide img:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.carousel__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--color-primary);
  color: var(--color-secondary);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  z-index: 10;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.carousel__btn:hover {
  background-color: var(--color-primary-light);
  transform: translateY(-50%) scale(1.1);
}

.carousel__btn:active {
  transform: translateY(-50%) scale(0.95);
}

.carousel__btn--prev {
  left: 0;
}

.carousel__btn--next {
  right: 0;
}

.carousel__btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* ===========================================
   LIGHTBOX (image seule)
   =========================================== */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  z-index: 3000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-md);
}

.lightbox.active {
  display: flex;
}

.lightbox__close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: white;
  font-size: 3rem;
  cursor: pointer;
  line-height: 1;
  transition: var(--transition);
}

.lightbox__close:hover {
  transform: scale(1.2);
  color: #ccc;
}

.lightbox__img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  border-radius: 8px;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

/* ===========================================
   MODAL GALERIE (toutes les images)
   =========================================== */
.gallery-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  z-index: 2000;
  display: none;
  flex-direction: column;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-modal.active {
  display: flex;
  opacity: 1;
}

.gallery-modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-md) var(--spacing-lg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.gallery-modal__title {
  color: var(--color-secondary);
  font-size: 1.5rem;
  font-weight: 600;
}

.gallery-modal__close {
  background: none;
  border: none;
  color: white;
  font-size: 2.5rem;
  cursor: pointer;
  line-height: 1;
  transition: var(--transition);
  padding: 0;
}

.gallery-modal__close:hover {
  transform: scale(1.2);
  color: #ccc;
}

.gallery-modal__content {
  flex: 1;
  overflow-y: auto;
  padding: var(--spacing-lg);
}

.gallery-modal__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-sm);
}

.gallery-modal__item {
  aspect-ratio: 3/4;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
}

.gallery-modal__item:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.gallery-modal__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ===========================================
   FOOTER
   =========================================== */
footer {
  background-color: var(--color-bg-dark);
  color: var(--color-secondary);
  padding: var(--spacing-lg);
  text-align: center;
}

.footer__link {
  display: inline-block;
  margin-top: var(--spacing-sm);
  color: #999;
  font-size: 0.9rem;
  transition: var(--transition);
}

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

/* ===========================================
   PAGES LÉGALES
   =========================================== */
.legal {
  padding: 120px 0 60px;
  min-height: 100vh;
}

.legal__title {
  font-size: 2rem;
  color: var(--color-primary);
  margin-bottom: var(--spacing-lg);
}

.legal__date {
  color: var(--color-text-light);
  font-style: italic;
  margin-bottom: var(--spacing-xl);
}

.legal__section {
  margin-bottom: var(--spacing-xl);
}

.legal__section h2 {
  font-size: 1.3rem;
  color: var(--color-primary);
  margin-bottom: var(--spacing-sm);
}

.legal__section p,
.legal__section li {
  color: var(--color-text);
  line-height: 1.8;
  margin-bottom: var(--spacing-xs);
}

.legal__section ul {
  list-style: disc;
  padding-left: var(--spacing-lg);
  margin-top: var(--spacing-sm);
}

.legal__back {
  display: inline-block;
  margin-top: var(--spacing-lg);
  color: var(--color-primary);
  font-weight: 500;
}

.legal__back:hover {
  text-decoration: underline;
}

/* ===========================================
   MEDIA QUERIES - TABLETTE (>= 768px)
   =========================================== */
@media (min-width: 768px) {
  .navbar__logo {
    height: 64px;
  }

  .navbar__burger {
    display: none;
  }

  .navbar__menu {
    position: static;
    flex-direction: row;
    transform: none;
    opacity: 1;
    visibility: visible;
    padding: 0;
    background-color: transparent;
    box-shadow: none;
  }

  .navbar__link {
    font-size: 1.2rem;
  }

  .hero__title {
    font-size: 3rem;
  }

  .hero__subtitle {
    font-size: 1.2rem;
  }

  .hero__cta {
    font-size: 1.1rem;
    padding: var(--spacing-sm) var(--spacing-xl);
  }

  .hero__background {
    background-attachment: fixed;
  }

  .produits__title {
    font-size: 2.5rem;
  }

  .produits__category-title {
    font-size: 1.5rem;
  }

  section {
    padding: var(--spacing-xl) 0;
  }

  /* Carousel tablette : 2 images */
  .carousel__slide {
    flex: 0 0 50%;
  }

  .carousel__slide img {
    height: 350px;
  }

  .carousel__track-container {
    margin: 0 50px;
  }

  .carousel__btn {
    width: 44px;
    height: 44px;
  }

  /* Modal galerie tablette : 3 colonnes */
  .gallery-modal__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
  }

  .gallery-modal__title {
    font-size: 1.8rem;
  }

  /* Legal pages */
  .legal__title {
    font-size: 2.5rem;
  }

  .legal__section h2 {
    font-size: 1.5rem;
  }
}

/* ===========================================
   MEDIA QUERIES - DESKTOP (>= 1024px)
   =========================================== */
@media (min-width: 1024px) {
  .navbar {
    padding: var(--spacing-sm) var(--spacing-lg);
  }

  .navbar__logo {
    height: 80px;
  }

  .navbar__link {
    font-size: 1.3rem;
    padding: var(--spacing-sm) var(--spacing-md);
  }

  .hero__title {
    font-size: 4rem;
  }

  .hero__subtitle {
    font-size: 1.4rem;
  }

  /* Carousel desktop : 4 images */
  .carousel {
    padding: 0;
  }

  .carousel__slide {
    flex: 0 0 25%;
  }

  .carousel__slide img {
    height: 400px;
  }

  .carousel__track-container {
    margin: 0 60px;
  }

  .carousel__btn {
    width: 50px;
    height: 50px;
  }

  /* Modal galerie desktop : 4 colonnes */
  .gallery-modal__grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .gallery-modal__header {
    padding: var(--spacing-lg) var(--spacing-xl);
  }

  .gallery-modal__content {
    padding: var(--spacing-lg) var(--spacing-xl);
  }

  .gallery-modal__title {
    font-size: 2rem;
  }

  /* Legal pages */
  .legal {
    padding: 150px 0 80px;
  }

  .legal__title {
    font-size: 3rem;
  }
}
