/* Reset & Global */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

/* Global image settings */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* HEADER */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
}

header nav ul {
  list-style: none;
  display: flex;
  margin: 0;
  padding: 0;
}

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

header nav ul li a {
  text-decoration: none;
  color: #fff;
  font-weight: bold;
}

/* Logo dans le header */
.logo-md {
  max-width: 50px;
  height: auto;
}

/* HERO */
#hero {
  position: relative;
  text-align: center;
  overflow: hidden;
  height: 100vh;
  background: url('images/accueil.webp') no-repeat center center;
  background-size: cover;
}

.hero-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  z-index: 2;
}

/* Décalage pour éviter que le header fixe ne cache le contenu */
section:not(#hero) {
  margin-top: 80px;
}

/* Pour éviter que le header fixe ne recouvre la galerie */
#gallery, #about, #contact {
  scroll-margin-top: 80px;
}

#gallery::before {
  content: "";
  display: block;
  height: 80px;
  margin-top: -80px;
}

/* Conteneur commun */
.content-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* CAROUSEL & Galerie */
.carousel-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.carousel-slide {
  display: none;
}

.carousel-slide.active {
  display: block;
}

.gallery-grid {
  display: grid;
  gap: 15px;
  grid-template-columns: repeat(5, 1fr);
}

@media (max-width: 1199px) and (min-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}

@media (max-width: 767px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }
}

.gallery-item {
  position: relative;
  overflow: hidden;
}

.gallery-item img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.gallery-item.span-2 {
  grid-column: span 2;
}

.carousel-controls {
  text-align: center;
  margin-top: 20px;
}

.carousel-controls button {
  background: transparent;
  border: none;
  padding: 0;
  margin: 0 10px;
  cursor: pointer;
}

.carousel-controls svg,
.carousel-controls i {
  width: 24px;
  height: 24px;
  display: block;
}

/* Titre "Galerie" centré */
#gallery h2 {
  text-align: center;
  margin-bottom: 20px;
  font-size: 2em;
  color: #333;
}

/* Présentation "Notre Atelier" */
.presentation-text {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 20px;
  text-align: center;
  background: #eaeaea;
  border-radius: 8px;
}

.presentation-text h2 {
  font-size: 2em;
  margin-bottom: 20px;
  color: #333;
  font-weight: bold;
}

.presentation-text p {
  font-size: 1.1em;
  line-height: 1.6;
  color: #555;
  text-align: justify;
}

.presentation-text strong {
  color: #000;
  font-weight: bold;
}

.presentation-text h3 {
  font-size: 1.3em;
  text-align: left;
  margin-bottom: 10px;
  color: #333;
  font-weight: bold;
}

.services-list {
  list-style-type: disc;
  padding-left: 20px;
  text-align: left;
  max-width: 400px;
  margin: 20px 0;
}

.services-list li {
  font-size: 1.1em;
  margin: 10px 0;
  color: #555;
}

.creation-info {
  font-size: 0.8em;
  color: #999;
  margin-top: 20px;
}

/* SECTION ABOUT */
#about {
  padding: 50px 20px;
}

/* SECTION CONTACT */
#contact {
  padding: 50px 20px;
  background: #eaeaea;
}

#contact h2 {
  text-align: center;
  margin-bottom: 20px;
  font-size: 2em;
  color: #333;
}

#contact form {
  width: 80%;
  margin: 0 auto;
  display: grid;
  gap: 10px;
}

.form-group {
  margin-bottom: 10px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-size: 1em;
  color: #333;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1em;
  transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: #999;
  outline: none;
}

.form-group textarea {
  min-height: 120px;
}

#contact button {
  width: auto;
  padding: 5px 10px;
  background: #333;
  border: none;
  color: #fff;
  font-size: 0.9em;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
  display: inline-block;
  justify-self: start;
}

#contact button:hover {
  background-color: #555;
}

/* FOOTER – fond gris foncé + texte blanc */
footer {
  background: #222;
  color: #fff;
}

/* Conteneur horizontal : logo à gauche + contact à côté + icônes à droite */
.footer-container {
  display: flex;
  justify-content: space-between;
  align-items: center;  /* centre verticalement le contenu */
  padding: 20px 5%;     /* espacement horizontal */
}

/* Zone gauche : logo + contact */
.footer-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.footer-logo {
  max-width: 150px;
  height: auto;
}

.footer-contact {
  text-align: left;
}

.footer-contact p {
  margin: 2px 0;
  line-height: 1.4;
  font-size: 0.9em;
}

/* Zone droite : icônes sociales */
.footer-right {
  display: flex;
  align-items: center;
  gap: 15px;            /* espacement régulier */
}

.footer-right .social-icon {
  color: #fff;
  font-size: 1.8em;
  text-decoration: none;
}

/* Mentions légales centrées en dessous */
.footer-legal {
  background: #222;
  color: #fff;
  text-align: center;
  padding-bottom: 10px;
  font-size: 0.85em;
}

/* === Lightbox === */
#lightbox {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

#lightbox.hidden {
  display: none;
}

#lightbox-img {
  max-width: 90%;
  max-height: 90%;
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

#lightbox-close {
  position: absolute;
  top: 20px; right: 30px;
  font-size: 2.5rem;
  color: #fff;
  cursor: pointer;
  background:transparent;
}

.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
}

#lightbox-prev { left: 30px; }
#lightbox-next { right: 30px; }

/* === Nouveau responsive pour cacher le menu sur mobile === */
@media (max-width: 767px) {
  header nav ul {
    display: none !important;
  }
  /* Centrage du layout sur mobile */
  #hero,
  .carousel-container,
  .presentation-text,
  #contact form {
    margin-left: auto;
    margin-right: auto;
    padding-left: 10px;
    padding-right: 10px;
    text-align: center;
  }
  /* Galerie full width but contents centered */
  .gallery-grid {
    justify-items: center;
  }
  /* Footer centré en colonne */
  .footer-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 15px;
  }
  .footer-left,
  .footer-right {
    justify-content: center;
    width: 100%;
  }
  /* Aligne les labels du formulaire à gauche */
  #contact form .form-group label {
    text-align: left;
  }

  /* === OVERRIDES POUR CAROUSEL MOBILE (1 IMAGE À LA FOIS) === */
  .gallery-grid {
    display: flex !important;              /* flexbox horizontal */
    overflow-x: auto !important;           /* scroll horizontal */
    scroll-snap-type: x mandatory;          /* snap automatique */
    -webkit-overflow-scrolling: touch;      /* inertie iOS */
    padding: 0 20px;                        /* même padding latéral */
    margin: 0 -20px;                        /* compense le padding pour plein écran */
  }

  .gallery-item {
    flex: 0 0 100% !important;             /* largeur complète */
    max-width: 100% !important;
    scroll-snap-align: center;             /* snap au centre */
    margin-right: 15px;                    /* gap identique desktop */
  }
  .gallery-item:last-child {
    margin-right: 0;
  }

  .gallery-item img {
    width: 100% !important;
    height: 150px !important;
    object-fit: cover !important;
  }

  .carousel-controls {
    display: flex !important;
    justify-content: space-between;
    position: absolute;
    bottom: 10px;
    left: 20px;
    width: calc(100% - 40px);
    pointer-events: auto;
  }
  .carousel-controls svg,
  .carousel-controls i {
    fill: #fff;
  }
}

@media (max-width: 767px) {
  /* Réinitialise la position des flèches pour qu’elles soient statiques et centrées */
  .carousel-controls {
    position: static !important;
    bottom: auto !important;
    left: auto !important;
    width: 100% !important;
    justify-content: center !important;
    margin: 20px 0 !important;
  }
}

/* Logo dans la section Hero */
.hero-text .hero-logo {
  max-width: 300px;       /* tu peux ajuster cette valeur */
  width: 80%;             /* s’adapte en responsive */
  height: auto;
  display: block;
  margin: 0 auto 20px;    /* centre + espace sous le logo */
}

/* Fond semi-transparent derrière le logo et le texte du Hero */
.hero-text {
  background: rgba(0, 0, 0, 0.7);  /* même opacité que la navbar */
  display: inline-block;           /* s’adapte à la taille du contenu */
  padding: 10px 20px;              /* espace autour du logo et du texte */
  border-radius: 4px;              /* arrondi léger */
  text-align: center;              /* centre le paragraphe */
}

/* Si tu veux que le logo ait un peu d’espace sous lui déjà prévu */
.hero-text .hero-logo {
  margin-bottom: 10px;
}

/* Tagline sous le logo en gras et plus large */
.hero-text p {
  font-weight: bold;
  font-size: 1.5em; /* ajuste si tu veux un peu plus ou moins */
  line-height: 1.3; /* pour garder une lecture agréable */
}

/* Redimensionne la slide active en hauteur sur mobile */
@media (max-width: 767px) {
  .carousel-slide.active img {
    height: 60vh !important;    /* 60% de la hauteur de la fenêtre, ajuste à ta convenance */
    object-fit: cover !important;
  }
}

html, body {
  overflow-x: hidden !important;
}

.mentions-studio-chax {
    display: flex;
    justify-content: flex-end;
    padding-inline: 1%;
    color: #fff;
}

footer a {
  color: #fff;
}