/* General Styles */
body {
  margin: 0;
  font-family: 'Montserrat', sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f0f8f5;
}

.container {
  max-width: 1000px;
  margin: auto;
  padding: 0 1rem;
}

/* Header */
header {
  background: #d5e5ce;
  padding: 1rem 2rem;
  display: flex;
  flex-direction: column; /* Logo au-dessus, menu en dessous */
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* Logo centré et responsive */
header img {
  display: block;
  margin: 0 auto;
  width: 30%;
  max-width: 250px;
  height: auto;
}

/* Navigation */
nav {
  margin-top: 0.8rem;
}
nav a {
  color: #558B2F;
  margin: 0 1rem;
  text-decoration: none;
  font-weight: bold;
  font-size: 1rem;
}
nav a:hover {
  color: #3b5a1f;
}

/* Scroll to top button */
#scrollTopBtn {
  position: fixed;
  right: 20px;
  bottom: 80px;
  background: #558B2F;
  color: #fff;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  z-index: 1000;
  font-size: 24px;
  line-height: 50px;
  text-align: center;
  padding: 0;
}
#scrollTopBtn:hover {
  background: #3b5a1f;
}

/* Sections */
.section {
  padding: 80px 20px;
  text-align: center;
}

/* Home Section */
.section-home {
  position: relative;
  background: url('https://images.unsplash.com/photo-1523240795612-9a054b0db644?ixlib=rb-4.0.3&auto=format&fit=crop&w=1600&q=80') no-repeat center center/cover;
  color: #fff;
  text-align: center;
  padding: 120px 20px;
}
.section-home .overlay {
  position: absolute;
  top:0; left:0;
  width:100%; height:100%;
  background: rgba(0,0,0,0.4);
}
.section-home h2, .section-home p, .section-home a {
  position: relative;
  z-index: 1;
}
.home-container h2 { 
  font-size: 2.5rem; 
  color: #ffffff !important; /* titre blanc pour lisibilité */
  margin-bottom: 1rem; 
}
.home-container p { 
  font-size: 1.1rem; 
  margin-bottom: 1.5rem; 
}

/* Buttons */
.btn {
  display: inline-block;
  background: #8BC34A;
  color: white;
  padding: 0.8rem 1.4rem;
  text-decoration: none;
  border-radius: 5px;
  transition: background 0.3s ease;
}
.btn:hover { background: #558B2F; }

/* Why Choose Us */
.section-why {
  background-color: #f5f9f6; /* vert très clair pour démarquer */
  padding: 60px 20px;
  border-radius: 8px;
}
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px,1fr));
  gap: 20px;
  margin-top: 30px;
}
.why-card {
  background: #fff;
  padding: 20px;
  border-radius: 10px;
  box-shadow: none; /* plus d'ombre */
}
.why-card i {
  font-size: 2rem;
  color: #8BC34A;
  margin-bottom: 10px;
}
@media (min-width: 769px) {
  .section-why {
box-shadow: none; /* plus d'ombre */  
}
}

/* Testimonials */
.section-testimonials {
  background: #fff;
  text-align: center;
}
.testimonial {
  margin: 20px auto;
  max-width: 600px;
  font-style: italic;
}
.testimonial span {
  display: block;
  margin-top: 10px;
  font-weight: bold;
}

/* About Section */
.about-container {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}
.about-image img {
  width: 250px;
  height: 250px;
  object-fit: cover;
  border-radius: 50%;
  border: 5px solid #ffffff;
  margin-right: 2rem;
  margin-bottom: 1rem;
}
.about-text { max-width: 600px; text-align: left; }

/* Tutoring Tabs */
.tabs { margin-bottom: 20px; }
.tab-btn {
  background: #8BC34A;
  color: white;
  border: none;
  padding: 12px 22px;
  margin: 5px;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.3s;
  font-size: 1.1rem;
  font-weight: 700;
}
.tab-btn.active, .tab-btn:hover { background: #558B2F; }

.tab-content {
  display: none;
  background: #ffffff;
  padding: 20px;
  border-radius: 5px;
  margin-top: 10px;
  text-align: left;
}
.tab-content.active { display: block; }

/* Contact Section */
.contact-container form {
  display: flex;
  flex-direction: column;
  max-width: 600px;
  margin: 0 auto;
}
.contact-container input,
.contact-container textarea {
  padding: 12px;
  margin: 10px 0;
  font-size: 1rem;
  border-radius: 5px;
  border: 1px solid #ccc;
  width: 100%;
  box-sizing: border-box;
}
.contact-container button {
  margin: 10px auto 0 auto;
  display: block;
  width: 50%;
}
footer {
  background: #d5e5ce;
  color: #333;
  text-align: center;
  padding: 15px 0;
  font-size: 0.9rem;
}

/* Language selector */
.language-selector {
  position: absolute;
  top: 12px;
  right: 18px;
  z-index: 2000;
  font-family: inherit;
}
#lang-btn {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.06);
  padding: 4px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 3px 8px rgba(0,0,0,0.12);
  transition: transform .12s ease, box-shadow .12s ease;
}
#lang-btn:hover,
.language-selector.open #lang-btn {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.14);
}
#current-flag {
  display: block;
  width: 28px;
  height: 20px;
  object-fit: cover;
  border-radius: 3px;
  border: 1px solid rgba(0,0,0,0.06);
}
#lang-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
  overflow: hidden;
  min-width: 160px;
  padding: 6px 0;
  transition: opacity .12s ease, transform .12s ease;
  opacity: 0;
  pointer-events: none;
  z-index: 3000;
}
.language-selector:hover #lang-dropdown,
.language-selector:focus-within #lang-dropdown,
.language-selector.open #lang-dropdown {
  display: block;
  opacity: 1;
  pointer-events: auto;
}
#lang-dropdown .lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  cursor: pointer;
  color: #222;
  font-size: 0.95rem;
  transition: background .12s ease;
}
#lang-dropdown .lang-option:hover { background: #f5f6f7; }
#lang-dropdown .lang-option img {
  width: 22px;
  height: 15px;
  object-fit: cover;
  border-radius: 2px;
  border: 1px solid rgba(0,0,0,0.06);
}

#form-status {
  margin-top: 1rem;
  font-weight: 600;
  text-align: center;
}

input, textarea {
  width: 100%;
  margin-bottom: 1rem;
  padding: 0.8rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-family: inherit;
}

/* Bouton du formulaire */
button.btn {
  background-color: #8BC34A;
  color: white;
  padding: 0.8rem 1.5rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s;
  font-weight: 600;
  box-shadow: 0 3px 6px rgba(0,0,0,0.1);
}
button.btn:hover {
  background-color: #558B2F;
  box-shadow: 0 5px 10px rgba(0,0,0,0.15);
}

/* === Mobile adjustments === */
@media screen and (max-width: 768px) {
  .section-home { display: none; }

  header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
  }

  header nav {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
  }
  header nav a {
    font-size: 18px;
    padding: 10px 0;
  }
  header nav a[data-translate="nav_home"] { display: none; }

  /* Logo mobile agrandi */
  header img {
    width: 55%; /* prend 30% de l’écran */
    max-width: none; /* pas de limite max */
  }

  /* Ajustement boutons services */
  .tab-btn {
    font-size: 1.2rem;
    font-weight: 700;
    padding: 14px 24px;
  }

  .section-home .overlay {
    opacity: 0.5;
  }
}

/* Very small screens */
@media (max-width: 480px) {
  .language-selector { right: 10px; top: 8px; }
  #lang-btn { width: 40px; height: 40px; }
  #current-flag { width: 24px; height: 17px; }
  #lang-dropdown { min-width: 140px; }
}
