/* =====================================================================
   SUNU DJAM — style.css
   Design system inspiré d'Apple / Stripe / Google Material Design
   Palette : Vert, Blanc, Bleu clair, Gris clair
   Police : Poppins (Google Fonts)
   ===================================================================== */

/* ---------------------------------------------------------------------
   1. VARIABLES CSS (Design Tokens)
--------------------------------------------------------------------- */
:root {
  /* Couleurs principales */
  --color-green: #1E8A5F;
  --color-green-dark: #156A48;
  --color-green-light: #E6F4ED;
  --color-blue: #2BA9C2;
  --color-blue-light: #E8F2FA;
  --color-white: #FFFFFF;
  --color-gray-50: #F7F9F9;
  --color-gray-100: #F0F3F2;
  --color-gray-200: #E3E8E7;
  --color-gray-400: #9AA6A2;
  --color-text: #1F2A24;
  --color-text-light: #5B6B66;
  --color-danger: #D9534F;

  /* Ombres */
  --shadow-sm: 0 2px 8px rgba(20, 40, 30, 0.06);
  --shadow-md: 0 10px 30px rgba(20, 40, 30, 0.10);
  --shadow-lg: 0 20px 50px rgba(20, 40, 30, 0.14);

  /* Rayons */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 28px;
  --radius-full: 999px;

  /* Typographie */
  --font-main: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Transitions */
  --transition: all 0.3s ease;

  /* Largeur conteneur */
  --container-width: 1180px;
}

/* Variables pour le mode sombre, appliquées via la classe .dark-mode sur <body> */
body.dark-mode {
  --color-white: #11221A;
  --color-gray-50: #0E1C16;
  --color-gray-100: #16271F;
  --color-gray-200: #20342A;
  --color-gray-400: #3E5A4E;
  --color-text: #EAF3EE;
  --color-text-light: #B7C8C0;
  --color-green-light: #1A3328;
  --color-blue-light: #16313B;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.5);
}

/* ---------------------------------------------------------------------
   2. RESET & BASE
--------------------------------------------------------------------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  color: var(--color-text);
  background-color: var(--color-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.4s ease, color 0.4s ease;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input, textarea, select {
  font-family: inherit;
  font-size: 1rem;
}

h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.25;
  color: var(--color-text);
}

h2 {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
}

h3 {
  font-size: 1.25rem;
}

/* Lien d'accessibilité (skip-link) */
.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  background: var(--color-green);
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  z-index: 2000;
}
.skip-link:focus {
  left: 10px;
  top: 10px;
}

/* Focus clavier visible (accessibilité) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--color-blue);
  outline-offset: 2px;
}

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 90px 0;
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 56px;
}

.section-subtitle {
  color: var(--color-text-light);
  font-size: 1.05rem;
  margin-top: 12px;
}

.eyebrow {
  display: inline-block;
  background: var(--color-green-light);
  color: var(--color-green);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  margin-bottom: 16px;
}

.text-accent { color: var(--color-green); }
.text-accent-blue { color: var(--color-blue); }

/* ---------------------------------------------------------------------
   3. BOUTONS
--------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 13px 28px;
  border-radius: var(--radius-full);
  transition: var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--color-green);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  background: var(--color-green-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  color: var(--color-text);
  border: 1.5px solid var(--color-gray-200);
}
.btn-outline:hover {
  border-color: var(--color-green);
  color: var(--color-green);
  transform: translateY(-2px);
}

.btn-text {
  padding: 0;
  color: var(--color-green);
  font-weight: 600;
  border-radius: 0;
}
.btn-text:hover { color: var(--color-green-dark); }

.btn-lg {
  padding: 15px 34px;
  font-size: 1rem;
}

.btn-block {
  width: 100%;
  justify-content: center;
}

/* ---------------------------------------------------------------------
   4. HEADER
--------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-gray-200);
  transition: background-color 0.4s ease, border-color 0.4s ease;
}

body.dark-mode .site-header {
  background: rgba(17, 34, 26, 0.85);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.logo-img {
  height: 38px;
  width: auto;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-menu ul {
  display: flex;
  gap: 30px;
}

.nav-link {
  font-weight: 500;
  font-size: 0.96rem;
  color: var(--color-text);
  position: relative;
  padding: 6px 0;
  transition: var(--transition);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0%;
  height: 2px;
  background: var(--color-green);
  transition: width 0.3s ease;
}

.nav-link:hover,
.nav-link.active-link {
  color: var(--color-green);
}
.nav-link:hover::after,
.nav-link.active-link::after {
  width: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--color-gray-100);
  color: var(--color-text);
  transition: var(--transition);
}
.icon-btn:hover {
  background: var(--color-green-light);
  color: var(--color-green);
}

.icon-moon { display: none; }
body.dark-mode .icon-sun { display: none; }
body.dark-mode .icon-moon { display: block; }

/* Hamburger (caché en desktop, géré dans responsive.css) */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2.5px;
  background: var(--color-text);
  border-radius: 2px;
  transition: var(--transition);
  margin: 0 auto;
}
.hamburger.is-active span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.hamburger.is-active span:nth-child(2) { opacity: 0; }
.hamburger.is-active span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ---------------------------------------------------------------------
   5. HERO
--------------------------------------------------------------------- */
.hero {
  position: relative;
  padding: 70px 0 0;
  background: linear-gradient(180deg, var(--color-green-light) 0%, var(--color-white) 100%);
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 50px;
  padding-bottom: 90px;
}

.hero-title {
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  margin: 18px 0 20px;
}

.hero-subtitle {
  color: var(--color-text-light);
  font-size: 1.08rem;
  max-width: 520px;
  margin-bottom: 32px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  gap: 38px;
}

.hero-stat {
  display: flex;
  flex-direction: column;
}
.hero-stat strong {
  font-size: 1.5rem;
  color: var(--color-green);
}
.hero-stat span {
  font-size: 0.85rem;
  color: var(--color-text-light);
}

.hero-image {
  position: relative;
  display: flex;
  justify-content: center;
  animation: floatY 6s ease-in-out infinite;
}

.hero-image-blob {
  position: absolute;
  width: 90%;
  height: 90%;
  background: var(--color-blue-light);
  border-radius: 50%;
  filter: blur(10px);
  z-index: 0;
  opacity: 0.7;
}

.hero-illustration {
  position: relative;
  z-index: 1;
  max-width: 460px;
  width: 100%;
}

.floating-card {
  position: absolute;
  background: var(--color-white);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: floatY 5s ease-in-out infinite;
}

.floating-card-1 {
  top: 14%;
  left: -4%;
}
.floating-card-2 {
  bottom: 12%;
  right: -2%;
  animation-delay: 1.2s;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}
.dot-green { background: var(--color-green); }

@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.wave-divider {
  width: 100%;
  line-height: 0;
}
.wave-divider svg {
  width: 100%;
  height: 70px;
  display: block;
}
.wave-divider path {
  fill: var(--color-white);
}

/* ---------------------------------------------------------------------
   6. POURQUOI CHOISIR (WHY US)
--------------------------------------------------------------------- */
.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.why-card {
  background: var(--color-gray-50);
  padding: 32px 26px;
  border-radius: var(--radius-md);
  transition: var(--transition);
  border: 1px solid transparent;
}
.why-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-gray-200);
}

.why-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.why-card h3 {
  margin-bottom: 8px;
}
.why-card p {
  color: var(--color-text-light);
  font-size: 0.95rem;
}

/* ---------------------------------------------------------------------
   7. SERVICES
--------------------------------------------------------------------- */
.services {
  background: var(--color-gray-50);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.service-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.service-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.service-img {
  position: relative;
  height: 190px;
  overflow: hidden;
}
.service-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.service-card:hover .service-img img {
  transform: scale(1.08);
}

.service-icon {
  position: absolute;
  bottom: -22px;
  left: 22px;
  width: 48px;
  height: 48px;
  background: var(--color-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow: var(--shadow-sm);
}

.service-content {
  padding: 38px 24px 28px;
}
.service-content h3 {
  margin-bottom: 10px;
}
.service-content p {
  color: var(--color-text-light);
  font-size: 0.93rem;
  margin-bottom: 18px;
}

/* ---------------------------------------------------------------------
   8. ARTICLES
--------------------------------------------------------------------- */
.article-search {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 520px;
  margin: 0 auto 48px;
  background: var(--color-gray-50);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-full);
  padding: 12px 22px;
  color: var(--color-text-light);
  transition: var(--transition);
}
.article-search:focus-within {
  border-color: var(--color-green);
  box-shadow: 0 0 0 4px var(--color-green-light);
}
.article-search input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--color-text);
}

.no-results-msg {
  text-align: center;
  color: var(--color-text-light);
  margin-bottom: 30px;
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.article-card {
  background: var(--color-white);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
}
.article-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-6px);
}

.article-img {
  position: relative;
  height: 170px;
  overflow: hidden;
}
.article-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-tag {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(255,255,255,0.92);
  color: var(--color-green);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--radius-full);
}

.article-content {
  padding: 22px 22px 26px;
}
.article-content h3 {
  font-size: 1.08rem;
  margin-bottom: 8px;
}
.article-content p {
  color: var(--color-text-light);
  font-size: 0.92rem;
  margin-bottom: 14px;
}

.article-card.is-hidden {
  display: none;
}

/* ---------------------------------------------------------------------
   9. NUTRITION
--------------------------------------------------------------------- */
.nutrition-inner {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 60px;
  align-items: center;
}

.nutrition-image img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nutrition-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 30px 0 34px;
}

.nutrition-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.nutrition-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
}

.nutrition-item h4 {
  font-size: 1rem;
  margin-bottom: 4px;
}
.nutrition-item p {
  color: var(--color-text-light);
  font-size: 0.9rem;
}

/* ---------------------------------------------------------------------
   10. TÉMOIGNAGES (SLIDER)
--------------------------------------------------------------------- */
.testimonials {
  background: var(--color-green-light);
}

.testimonial-slider {
  display: flex;
  align-items: center;
  gap: 18px;
  max-width: 760px;
  margin: 0 auto;
}

.testimonial-track-wrapper {
  overflow: hidden;
  flex: 1;
  border-radius: var(--radius-lg);
}

.testimonial-track {
  display: flex;
  transition: transform 0.5s ease;
}

.testimonial-card {
  min-width: 100%;
  background: var(--color-white);
  padding: 44px;
  border-radius: var(--radius-lg);
  text-align: center;
  box-shadow: var(--shadow-md);
}

.testimonial-text {
  font-size: 1.1rem;
  font-style: italic;
  color: var(--color-text);
  margin-bottom: 26px;
}

.testimonial-author {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.testimonial-author img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
}
.testimonial-author div {
  text-align: left;
}
.testimonial-author strong {
  display: block;
  font-size: 0.95rem;
}
.testimonial-author span {
  font-size: 0.8rem;
  color: var(--color-text-light);
}

.slider-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-white);
  box-shadow: var(--shadow-sm);
  font-size: 1.6rem;
  color: var(--color-green);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition);
}
.slider-btn:hover {
  background: var(--color-green);
  color: #fff;
}

.slider-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 26px;
}
.slider-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--color-gray-200);
  transition: var(--transition);
}
.slider-dot.is-active {
  background: var(--color-green);
  width: 22px;
  border-radius: var(--radius-full);
}

/* ---------------------------------------------------------------------
   11. FAQ (ACCORDÉON)
--------------------------------------------------------------------- */
.faq-list {
  max-width: 760px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--color-gray-200);
}

.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  padding: 22px 4px;
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--color-text);
}

.faq-icon {
  font-size: 1.4rem;
  color: var(--color-green);
  transition: transform 0.3s ease;
  flex-shrink: 0;
  margin-left: 16px;
}

.faq-item.is-open .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
  padding: 0 4px;
}

.faq-answer p {
  color: var(--color-text-light);
  padding-bottom: 22px;
  font-size: 0.95rem;
}

.faq-item.is-open .faq-answer {
  max-height: 300px;
}

/* ---------------------------------------------------------------------
   12. CONTACT
--------------------------------------------------------------------- */
.contact-inner {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 60px;
}

.contact-details {
  margin-top: 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  color: var(--color-text-light);
  font-size: 0.95rem;
}

.contact-form {
  background: var(--color-gray-50);
  padding: 38px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-gray-200);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

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

.form-group label {
  display: block;
  font-weight: 500;
  font-size: 0.9rem;
  margin-bottom: 7px;
}

.required {
  color: var(--color-danger);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--color-gray-200);
  border-radius: var(--radius-sm);
  background: var(--color-white);
  color: var(--color-text);
  transition: var(--transition);
  resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--color-green);
  outline: none;
  box-shadow: 0 0 0 4px var(--color-green-light);
}

.form-group.has-error input,
.form-group.has-error select,
.form-group.has-error textarea {
  border-color: var(--color-danger);
}

.error-message {
  display: block;
  color: var(--color-danger);
  font-size: 0.8rem;
  margin-top: 5px;
  min-height: 14px;
}

.form-success {
  margin-top: 18px;
  text-align: center;
  color: var(--color-green);
  font-weight: 600;
  background: var(--color-green-light);
  padding: 14px;
  border-radius: var(--radius-sm);
}

/* ---------------------------------------------------------------------
   13. FOOTER
--------------------------------------------------------------------- */
.site-footer {
  background: #102018;
  color: #C9D8D1;
  padding: 70px 0 0;
}
body.dark-mode .site-footer {
  background: #081410;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 50px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer-logo {
  height: 36px;
  margin-bottom: 16px;
  filter: brightness(0) invert(1);
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.7;
  max-width: 280px;
  margin-bottom: 20px;
}

.footer-social {
  display: flex;
  gap: 12px;
}
.footer-social a {
  width: 38px;
  height: 38px;
  background: rgba(255,255,255,0.07);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.footer-social a:hover {
  background: var(--color-green);
}

.footer-links h4 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 18px;
}
.footer-links ul {
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.footer-links a {
  font-size: 0.9rem;
  color: #C9D8D1;
  transition: var(--transition);
}
.footer-links a:hover {
  color: var(--color-green);
  padding-left: 4px;
}
.footer-links li {
  font-size: 0.9rem;
}

.footer-bottom {
  text-align: center;
  padding: 24px 0;
  font-size: 0.85rem;
  color: #88998F;
}

/* ---------------------------------------------------------------------
   14. BOUTON RETOUR EN HAUT
--------------------------------------------------------------------- */
.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-green);
  color: #fff;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: var(--transition);
  z-index: 900;
}
.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-to-top:hover {
  background: var(--color-green-dark);
}

/* ---------------------------------------------------------------------
   15. ANIMATIONS D'APPARITION AU SCROLL
--------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Respect des préférences de mouvement réduit */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
