/*

 * 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;

}

body.modal-open {
  overflow: hidden;
  touch-action: none;
}



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;

  }

  .nav-container--landing .site-back-link {
    color: var(--text-color);
    border-color: rgba(58, 58, 58, 0.12);
    background: rgba(255, 255, 255, 0.88);
  }

}



/* 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%;
  }

  .nav-container--landing .brand-logo {
    height: 72px;
  }

  .nav-container--landing .nav-actions {
    gap: 0.55rem;
  }

  .site-back-link {
    padding-inline: 0.95rem;
  }
}

/* Public admin entry */
.site-admin-login {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 12px 24px rgba(48, 68, 51, 0.14);
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.site-parent-link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 12px 24px rgba(48, 68, 51, 0.14);
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.site-admin-login:hover,
.site-admin-toggle:hover,
.site-parent-link:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.18);
}

.site-admin-menu {
  position: relative;
}

.site-admin-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  padding: 0.4rem 0.8rem 0.4rem 0.45rem;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.site-admin-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent-color), #f0b84c);
  color: #5f430f;
  font-weight: 700;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.28);
}

.site-admin-label {
  display: grid;
  text-align: left;
  line-height: 1.1;
}

.site-admin-label strong {
  font-size: 0.88rem;
}

.site-admin-label small {
  font-size: 0.72rem;
  opacity: 0.82;
}

.site-admin-dropdown {
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  min-width: 250px;
  padding: 0.75rem;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 40px rgba(41, 54, 44, 0.18);
  border: 1px solid rgba(139, 191, 146, 0.18);
  color: var(--text-color);
  z-index: 1200;
}

.site-admin-dropdown-head {
  display: grid;
  gap: 0.2rem;
  padding: 0.6rem 0.75rem 0.9rem;
  border-bottom: 1px solid rgba(139, 191, 146, 0.16);
  margin-bottom: 0.5rem;
}

.site-admin-dropdown-head small {
  color: rgba(58, 58, 58, 0.7);
}

.site-admin-dropdown a {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.8rem 0.85rem;
  border-radius: 16px;
  color: var(--text-color);
  font-weight: 600;
}

.site-admin-dropdown a:hover {
  background: rgba(139, 191, 146, 0.12);
  color: var(--primary-color);
}

@media (max-width: 900px) {
  .site-admin-login span,
  .site-parent-link span,
  .site-admin-label {
    display: none;
  }

  .site-admin-login,
  .site-parent-link,
  .site-admin-toggle {
    width: 44px;
    height: 44px;
    padding: 0;
    justify-content: center;
  }

  .site-admin-dropdown {
    min-width: 220px;
  }
}

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.9rem;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  background: rgba(139, 191, 146, 0.12);
  color: #6d8c70;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0.85rem 1.4rem;
  border: none;
  border-radius: 999px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.cta-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(58, 58, 58, 0.12);
}

.cta-button--primary {
  background: linear-gradient(135deg, #8bbf92, #78aa7f);
  color: #ffffff;
}

.cta-button--visit {
  background: linear-gradient(135deg, #f2d07f, #dfb253);
  color: #5d4317;
}

.site-enroll-link,
.site-parent-link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 46px;
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  font-weight: 700;
}

.site-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 46px;
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  font-weight: 700;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
}

.site-back-link:hover {
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(58, 58, 58, 0.12);
}

.site-enroll-link {
  background: linear-gradient(135deg, #f5c96a, #efb94d);
  color: #594016;
  box-shadow: 0 12px 24px rgba(239, 185, 77, 0.22);
}

.site-enroll-link:hover {
  color: #594016;
}

.nav-container--landing {
  max-width: 1080px;
}

.nav-container--landing .brand {
  display: inline-flex;
  align-items: center;
}

.nav-container--landing .brand-logo {
  position: static;
  height: 82px;
}

.nav-container--landing .nav-actions {
  margin-left: auto;
}

.lead-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(1rem, env(safe-area-inset-top)) 1.25rem max(1rem, env(safe-area-inset-bottom));
  z-index: 1400;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  overflow-y: auto;
  overscroll-behavior: contain;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.lead-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.lead-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 26, 21, 0.52);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.22s ease;
}

.lead-modal.is-open .lead-modal__backdrop {
  opacity: 1;
}

.lead-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 580px);
  max-height: min(calc(100dvh - 2rem), 860px);
  border-radius: 28px;
  background: linear-gradient(180deg, #fffdf9 0%, #fff8ef 100%);
  box-shadow: 0 24px 60px rgba(37, 46, 37, 0.22);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: translateY(16px) scale(0.98);
  opacity: 0;
  transition: transform 0.24s ease, opacity 0.24s ease;
}

.lead-modal.is-open .lead-modal__dialog {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.lead-modal__content {
  padding: clamp(1.4rem, 4vw, 2.1rem);
  overflow-y: auto;
}

.lead-modal__kicker {
  margin: 0 0 0.75rem;
  color: #7ba17b;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.lead-modal__title {
  margin: 0;
  color: #2d4134;
  font-size: clamp(1.55rem, 4.5vw, 2rem);
  line-height: 1.15;
  max-width: 14ch;
}

.lead-modal__text {
  margin: 0.8rem 0 1.4rem;
  color: #66756a;
  max-width: 34rem;
}

.lead-modal__close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  background: rgba(139, 191, 146, 0.12);
  color: #547456;
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
}

.lead-form {
  display: grid;
  gap: 1rem;
}

.lead-honeypot {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.lead-form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.lead-field {
  display: grid;
  gap: 0.45rem;
  color: #506254;
  font-weight: 600;
  margin: 0;
}

.lead-field input,
.lead-field select,
.lead-field textarea {
  width: 100%;
  min-height: 56px;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(123, 161, 123, 0.22);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.95);
  color: #334739;
  font: inherit;
}

.lead-field textarea {
  min-height: 140px;
  resize: vertical;
}

.lead-field input:focus,
.lead-field select:focus,
.lead-field textarea:focus {
  outline: none;
  border-color: rgba(139, 191, 146, 0.72);
  box-shadow: 0 0 0 4px rgba(139, 191, 146, 0.15);
}

.lead-form__status {
  min-height: 1.4rem;
  color: #526252;
  font-size: 0.95rem;
}

.lead-form .cta-button {
  width: 100%;
  margin-top: 0.25rem;
  min-height: 56px;
  box-shadow: 0 14px 26px rgba(93, 67, 23, 0.12);
}

.lead-form__status.error {
  color: #b14d4d;
}

.lead-form__status.success {
  color: #5e8a64;
}

.lead-success {
  display: grid;
  gap: 1rem;
  text-align: center;
  padding-block: 0.5rem;
}

.lead-success h2 {
  margin: 0;
  color: #2d4134;
}

@media (max-width: 900px) {
  .site-enroll-link span,
  .site-parent-link span,
  .site-admin-label {
    display: none;
  }

  .site-enroll-link,
  .site-parent-link,
  .site-admin-toggle {
    width: 46px;
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
  }
}

@media (max-width: 700px) {
  .lead-modal {
    align-items: flex-start;
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }

  .lead-modal__dialog {
    margin: auto 0;
    width: min(100%, 100%);
    max-height: calc(100dvh - 1.25rem);
    border-radius: 24px;
  }

  .lead-form__grid {
    grid-template-columns: 1fr;
  }
}
