/*

 * Main stylesheet for Enfantine.ma

 *

 * The design draws inspiration from the "La Bulle" nursery website but uses

 * a pastel colour palette based on the Enfantine logo. Colours are defined as

 * CSS custom properties at the top of the document for easy tweaking. This

 * file styles the overall layout, navigation, hero sections and cards. It

 * includes responsive tweaks so the site looks good on mobile and desktop.

 */



:root {

  --primary-color: #8BBF92;      /* soft green from the logo leaves */

  --secondary-color: #A6D8B1;    /* lighter green for backgrounds */

  --accent-color: #F4C978;       /* warm yellow taken from the sun */

  --text-color: #3A3A3A;         /* dark grey for readability */

  --background-color: #FFF8EF;   /* very pale peach for page background */

  --heading-font: 'Quicksand', sans-serif;
}



/* Reset some default margins */

* {

  box-sizing: border-box;

}



body {

  margin: 0;

  font-family: var(--heading-font);

  color: var(--text-color);

  background-color: var(--background-color);

  line-height: 1.6;

}



a {

  color: inherit;

  text-decoration: none;

}



/* Navigation bar */

header {

  background-color: var(--primary-color);

  color: #fff;

  padding: 0.5rem 1rem;

  position: sticky;

  top: 0;

  z-index: 1000;

}



.brand-logo {
    top: 0px;
    position: absolute;
    height: 110px;
    background: white;
    border-radius: 80px;
    box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
}

.nav-container {

  display: flex;

  align-items: center;

  justify-content: space-between;

  max-width: 1200px;

  margin: 0 auto;
  padding: 20px 0px;

}



.brand {
  font-size: 1.5rem;
  letter-spacing: 1px;
  font-family: 'Pacifico', 'Quicksand', cursive, sans-serif;
}


nav ul {

  list-style: none;

  display: flex;

  gap: 1rem;

  margin: 0;

  padding: 0;

}



nav a {

  color: #ffffff;

  font-weight: 600;

  transition: color 0.3s ease;

}



nav a:hover {

  color: var(--accent-color);

}



nav a[aria-current="page"] {

  color: var(--accent-color);

}



.nav-container {

  position: relative;

}



.nav-actions {

  display: flex;

  align-items: center;

  gap: 0.75rem;

}



.lang-switch {

  display: inline-flex;

  border: 1px solid rgba(255, 255, 255, 0.4);

  border-radius: 999px;

  overflow: hidden;

}



.lang-btn {

  background: transparent;

  border: none;

  color: #ffffff;

  font-weight: 600;

  font-size: 0.85rem;

  padding: 0.3rem 0.8rem;

  cursor: pointer;

  transition: background-color 0.3s ease, color 0.3s ease;

}



.lang-btn.active {

  background-color: var(--accent-color);

  color: var(--text-color);

}



.lang-btn:focus-visible {

  outline: 2px solid var(--accent-color);

  outline-offset: 2px;

}



.menu-toggle {

  display: none;

  border: none;

  background: transparent;

  cursor: pointer;

  width: 44px;

  height: 44px;

  align-items: center;

  justify-content: center;

  flex-direction: column;

  gap: 6px;

  padding: 0;

  z-index: 1101;

}



.menu-toggle span {

  display: block;

  width: 26px;

  height: 2px;

  background: #ffffff;

  border-radius: 2px;

  transition: transform 0.3s ease, opacity 0.3s ease;

}



body.nav-open .menu-toggle span:nth-child(1) {

  transform: translateY(8px) rotate(45deg);

}



body.nav-open .menu-toggle span:nth-child(2) {

  opacity: 0;

}



body.nav-open .menu-toggle span:nth-child(3) {

  transform: translateY(-8px) rotate(-45deg);

}



.nav-backdrop {

  display: none;

}



body.nav-open {

  overflow: hidden;

}



body.nav-open .nav-backdrop {

  display: block;

  position: fixed;

  inset: 0;

  left: 80%;

  background: rgba(0, 0, 0, 0.15);

  z-index: 1000;

}



@media (max-width: 900px) {

  .menu-toggle {

    display: inline-flex;

  }



  .nav-container nav {

    position: fixed;

    top: 0;

    left: 0;

    width: 80%;

    max-width: 360px;

    height: 100vh;

    background-color: #ffffff;

    padding: 5rem 2rem 2rem;

    transform: translateX(-100%);

    transition: transform 0.3s ease;

    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.15);

    z-index: 1100;

  }



  body.nav-open .nav-container nav {

    transform: translateX(0);

  }



  .nav-container nav ul {

    flex-direction: column;

    gap: 1.5rem;

  }



  .nav-container nav a {

    color: var(--text-color);

    font-size: 1.1rem;

  }



  .nav-container nav a[aria-current="page"] {

    color: var(--primary-color);

  }



  .nav-container {

    justify-content: space-between;

  }



  .lang-switch {

    border-color: rgba(0, 0, 0, 0.2);

  }



  .lang-btn {

    color: var(--text-color);

  }



  .lang-btn.active {

    background-color: var(--primary-color);

    color: #ffffff;

  }

}



/* General section styling */

section {

  padding: 4rem 1rem;

}



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

/* Form elements */
form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

input[type="text"],
input[type="email"],
textarea {
  padding: 0.8rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
  font-family: var(--heading-font);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
  border-color: var(--primary-color);
  outline: none;
  box-shadow: 0 0 0 3px rgba(139, 191, 146, 0.3);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

button {
  padding: 0.8rem 1.2rem;
  background-color: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: background-color 0.3s ease;
}

button:hover {
  background-color: var(--secondary-color);
  color: var(--text-color);
}


/* Footer */

footer {

  background-color: var(--primary-color);

  color: #fff;

  text-align: center;

  padding: 1rem;

  margin-top: 3rem;

}



/* Responsive adjustments */

@media (max-width: 1024px) {
  section {
    padding: 3.5rem 1.5rem;
  }
}

@media (max-width: 768px) {
  section {
    padding: 2.5rem 1rem;
  }
  .brand {
    font-size: 1.2rem;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 0.95rem;
  }
  .section-title {
    font-size: 1.7rem;
  }
  button {
    width: 100%;
  }
}
