/* ========== RESET ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

html, body {
  min-height: 100%;
}

/* ===== GLOBAL RESPONSIVE FIXES ===== */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Force responsive text breaks */
h1, h2, h3, p, a {
  word-wrap: break-word;
}

/* Improve touch targets on mobile */
button, a {
  -webkit-tap-highlight-color: transparent;
}

/* Prevent horizontal scroll from overflowing elements */
body {
  background-color: #fff;
  color: #333;
  overflow-x: hidden;
}

/* ========== HEADER ========== */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 60px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
  z-index: 1000;
  transition: background 0.4s ease, padding 0.4s ease;
}

header.scrolled {
  background: #ff4b2b;
  padding: 10px 50px;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo img {
  width: 55px;
  height: auto;
  border-radius: 50%;
  display: block;
}

.logo h1 {
  font-size: 1.2rem;
  font-weight: 600;
  color: white;
  margin: 0;
}

/* Navbar */
.navbar {
  display: flex;
  align-items: center;
}

.navbar ul {
  list-style: none;
  display: flex;
  gap: 30px;
  margin: 0;
}

.navbar a {
  color: #fff;
  font-weight: 500;
  text-decoration: none;
  font-size: 1rem;
  transition: color 0.3s ease;
}

.navbar a:hover {
  color: #ffcc00;
}

/* === MENU BURGER MODERNE === */
.menu-toggle {
  display: none;
  cursor: pointer;
  width: 35px;
  height: 25px;
  position: relative;
  z-index: 1001;
}

.menu-toggle span {
  background: #fff;
  position: absolute;
  height: 3px;
  width: 100%;
  border-radius: 3px;
  left: 0;
  transition: all 0.4s ease;
}

.menu-toggle span:nth-child(1) {
  top: 0;
}

.menu-toggle span:nth-child(2) {
  top: 10px;
}

.menu-toggle span:nth-child(3) {
  top: 20px;
}

/* Animation burger -> croix */
.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg);
  top: 10px;
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg);
  top: 10px;
}

/* ========== HERO SECTION ========== */
.hero {
  height: 100vh;
  background: linear-gradient(to bottom right, rgba(255, 75, 43, 0.8), rgba(0, 200, 83, 0.7)),
              url('https://images.unsplash.com/photo-1509099836639-18ba1795216d?auto=format&fit=crop&w=1470&q=80') no-repeat center/cover;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 20px;
}

.hero h2 {
  font-size: 3rem;
  animation: fadeInDown 1s ease-in-out;
}

.hero p {
  font-size: 1.2rem;
  margin-top: 10px;
  animation: fadeInUp 1.5s ease-in-out;
}

.btn {
  margin-top: 25px;
  background: #fff;
  color: #ff4b2b;
  padding: 12px 25px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.3s ease, color 0.3s ease;
}

.btn:hover {
  background: #ff4b2b;
  color: white;
}

/* ========== À PROPOS ========== */
.about {
  padding: 100px 60px;
  text-align: justify;
}

.about h2 {
  color: #ff4b2b;
  margin-bottom: 15px;
  text-align: center;
}

.about p {
  max-width: 800px;
  margin: 0 auto;
  font-size: 1.1rem;
  line-height: 1.7;
  text-align: justify;
}

/* ========== ACTIONS ========== */
.actions {
  background: #f9f9f9;
  padding: 80px 60px;
  text-align: center;
  align-items: center;
}
.actions h2 {
  color: #00c853;
  margin-bottom: 40px;
}

.actions-container {
  display: flex;
  justify-content: center;
  gap: 30px;
  text-align: center;
}

/* Make action cards flexible and responsive */
.action {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  width: 100%;
  max-width: 300px; /* previously fixed width: 300px; now responsive */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.action img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.action h3 {
  margin: 15px 0;
  color: #ff4b2b;
} 

.action p {
  padding: 0 20px 20px;
  text-align: justify;
}

.action:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

/* ========== GALERIE ========== */
.galerie {
  padding: 80px 60px;
  text-align: center;
}

.galerie h2 {
  color: #ff4b2b;
  margin-bottom: 30px;
}

/* Make grid adapt to screen sizes */
.galerie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.galerie-grid img {
    width: 100%;
    height: auto;
    max-height: 200px;
    object-fit: cover;
    border-radius: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.galerie-grid img:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* ========== CONTACT ========== */
/* Keep original contact background wrapper */
.contact {
    background: linear-gradient(135deg, #00c853, #ff4b2b);
    color: white;
    text-align: center;
    padding: 100px 20px;
}

.contact h2 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.contact p {
    margin-bottom: 20px;
}

/* ===== Social icons block (NEW) ===== */
.socials {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 15px;
}

/* anchor wrapping icon */
.socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

/* medium icons as requested (45x45) */
.socials img {
  width: 45px;
  height: 45px;
  object-fit: contain;
  border-radius: 8px; /* optional visual tweak */
  transition: transform 0.2s ease;
  display: block;
}

.socials img:hover {
  transform: scale(1.08);
}

/* ========== FOOTER ========== */
footer {
    background: #222;
    color: #aaa;
    text-align: center;
    padding: 20px 0;
    font-size: 0.9rem;
}

/* ========== ANIMATIONS ========== */
@keyframes fadeInDown {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes fadeInUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* ========== RESPONSIVE ========== */
/* General mobile breakpoints adjustments */
@media (max-width: 1024px) {
  /* make hero text slightly smaller on medium screens */
  .hero h2 { font-size: 2.6rem; }
}

/* tablet / small laptop */
@media (max-width: 900px) {
  header { padding: 12px 30px; }
  .about { padding: 80px 40px; }
  .actions { padding: 60px 30px; }
  .galerie { padding: 60px 30px; }
}

/* mobile */
@media (max-width: 768px) {
    header {
        padding: 15px 25px;
    }

    .navbar {
        position: absolute;
        top: 70px;
        right: 0;
        background: rgba(0, 0, 0, 0.95);
        width: 230px;
        display: flex;
        flex-direction: column;
        align-items: center;
        border-radius: 8px;
        padding: 0;
        opacity: 0;
        transform: translateY(-20px);
        pointer-events: none;
        transition: all 0.4s ease;
        z-index: 9999;
    }

    .navbar.active {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
        padding: 20px 0;
    }

    .navbar ul {
        flex-direction: column;
        gap: 20px;
    }

    .menu-toggle {
        display: block;
    }

    .actions-container {
        flex-direction: column;
        align-items: center;
    }

    .hero h2 {
        font-size: 2.2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    /* actions cards become full width but keep max */
    .action {
      max-width: 420px;
      width: 100%;
    }

    /* gallery less columns */
    .galerie-grid {
      grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    }
}

/* small phones */
@media (max-width: 480px) {
    header {
      padding: 12px 18px;
    }

    .hero h2 {
      font-size: 1.9rem;
    }

    .hero p {
      font-size: 0.95rem;
    }

    /* smaller social icons on narrow devices to preserve layout */
    .socials img {
      width: 38px;
      height: 38px;
    }

    /* tighter spacing for actions */
    .actions-container {
      gap: 16px;
    }

    .about { padding: 40px 18px; }
    .galerie { padding: 40px 18px; }
    .actions { padding: 40px 18px; }
}

/* ====== PAGE GALERIE ====== */
.hero-gallery {
  background: linear-gradient(rgba(255,75,43,0.6), rgba(0,200,83,0.6)),
              url('https://images.unsplash.com/photo-1509099836639-18ba1795216d');
  background-size: cover;
  background-position: center;
  color: #fff;
  text-align: center;
  padding: 100px 20px;
}

.gallery-section {
  padding: 60px 20px;
  max-width: 1200px;
  margin: auto;
}

.gallery-section h2 {
  text-align: center;
  margin-bottom: 20px;
  color: #ff4b2b;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.gallery-grid img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
}

.gallery-grid img:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  z-index: 1000;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
  justify-content: center;
  align-items: center;
}

.lightbox-content {
  max-width: 80%;
  max-height: 80%;
  border-radius: 10px;
}

.lightbox .close {
  position: absolute;
  top: 20px;
  right: 40px;
  font-size: 40px;
  color: white;
  cursor: pointer;
}

/* CTA */
.cta {
  background: linear-gradient(45deg, #ff4b2b, #00c853);
  color: white;
  text-align: center;
  padding: 60px 20px;
}

.cta .btn {
  display: inline-block;
  background: white;
  color: #ff4b2b;
  padding: 12px 30px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: bold;
  margin-top: 15px;
  transition: all 0.3s;
}

.cta .btn:hover {
  background: #fff3e0;
}

/* ===== PAGE CONTACT ===== */
.hero-contact {
  background: linear-gradient(rgba(255,75,43,0.6), rgba(0,200,83,0.6)),
              url('https://images.unsplash.com/photo-1485217988980-11786ced9454');
  background-size: cover;
  background-position: center;
  color: white;
  text-align: center;
  padding: 100px 20px;
}

.contact-section {
  padding: 60px 20px;
  max-width: 1200px;
  margin: auto;
}

.contact-container {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  justify-content: center;
}

/* contact form and info boxes kept responsive */
.contact-form, .contact-info {
  flex: 1 1 400px;
  background: #fff;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.contact-form h2, .contact-info h2 {
  color: #ff4b2b;
  margin-bottom: 20px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px;
  margin-bottom: 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 15px;
  outline: none;
  transition: border 0.3s;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: #00c853;
}

.contact-form .btn {
  display: inline-block;
  background: linear-gradient(45deg, #ff4b2b, #00c853);
  color: white;
  padding: 12px 30px;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s;
}

.contact-form .btn:hover {
  opacity: 0.9;
}

/* Responsive: stack contact boxes on smaller screens */
@media (max-width: 768px) {
  .contact-container {
    flex-direction: column;
  }
}
