/* =========================================================
   Kumbaa-SN — Styles globaux (refactor + responsive)
   ========================================================= */

/* ------------------------------
   0) Base & reset léger
---------------------------------*/
:root{
  --brand: #3f51b5;
  --brand-dark: #2f3f95;
  --ink: #2e2e2e;
  --muted: #555;
  --surface: #fff;
  --bg-grad: linear-gradient(135deg, #f5f7fa, #e8ecf1);
  --shadow-soft: 0 2px 10px rgba(0,0,0,0.1);
  --shadow-card: 0 3px 10px rgba(0,0,0,0.05);
}

*,
*::before,
*::after { box-sizing: border-box; }

html, body { overflow-x: hidden; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-grad);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

main {
  flex-grow: 1;
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
}

p { font-size: 1.1rem; color: #333; }

h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--brand);
  border-bottom: 2px solid #7e57c2;
  padding-bottom: .3rem;
  max-width: max-content;
  margin-inline: auto;
  text-align: center;
}

/* ------------------------------
   1) Header & Navigation
---------------------------------*/
.top-strip {
  height: 4px;
  background: linear-gradient(90deg, #0a8f3a 33%, #f4c000 33% 66%, #d10f1b 66%);
}

.site-header {
  background: #ffffff;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: .8rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-weight: 700;
  color: #1d2130;
  text-decoration: none;
  letter-spacing: .2px;
}

.brand img { width: 180px; height: 130px; }

.logo-circle {
  width: 28px; height: 28px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #0a8f3a, #f4c000 60%, #d10f1b);
}

.nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav a {
  color: var(--ink);
  text-decoration: none;
  padding: .4rem .6rem;
  border-radius: .5rem;
}
.nav a:hover { background: #f4f6fb; }

.nav-item.active { color: var(--brand); }

.btn-contact {
  background: var(--brand);
  color: #fff !important;
  padding: .5rem .9rem;
  border-radius: .6rem;
  text-decoration: none;
  display: inline-block;
  font-weight: 600;
  transition: background .25s ease;
}
.btn-contact:hover, .btn-contact.secondary:hover  { background: var(--brand-dark); }
.btn-contact.secondary { background:#bcc8f1; color:#2e2e2e; }

/* Hamburger */
.nav-toggle {
  display: none;             /* visible en mobile seulement */
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: transparent;
  border: 0;
  padding: .4rem;
  width: 40px; height: 40px;
  cursor: pointer;
  position: relative;
  z-index: 1001;
}
.nav-toggle span{
  display:block; width:22px; height:2px;
  background:#1d2130; border-radius:2px;
  transition: all .3s ease; transform-origin:center;
}

/* Animation en croix quand .open est sur le bouton (JS existant) */
.nav-toggle.open span:nth-child(1){ transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.open span:nth-child(2){ opacity: 0; }
.nav-toggle.open span:nth-child(3){ transform: rotate(-45deg) translate(6px, -6px); }

#inscription{
  display: flex; justify-content: center; align-items: center;
  padding: 4rem 1rem;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  margin-bottom: 4rem;
}

/* Mobile nav (fermée par défaut) */
@media (max-width: 900px){
  .nav-toggle{ display:flex; }
  .nav{
    position:absolute; inset:64px 0 auto 0;
    background:#fff; border-top:1px solid #eceff5;
    display:none; flex-direction:column; gap:.2rem; padding:.6rem 1rem;
    transform:translateY(-10px); opacity:0; pointer-events:none;
    box-shadow:0 8px 24px rgba(0,0,0,.08); transition:.2s ease;
  }
  .nav.open{
    display:grid; transform:translateY(0); opacity:1; pointer-events:auto;
  }
}
/* Desktop nav */
@media (min-width: 901px){
  .nav{ position:static; display:flex !important; transform:none; opacity:1; pointer-events:auto; box-shadow:none; }
  .nav-toggle{ display:none !important; }
}

/* ------------------------------
   2) Carousel (hero visuel)
---------------------------------*/
.carousel{
  position: relative;
  width: 100%;
  height: calc(100vh - 100px);
  overflow: hidden;
  background: transparent;
}
.slides{ display: flex; height: 100%; transition: transform .8s ease-in-out; }
.slide{ position: relative; flex: 0 0 100%; height: 100%; overflow: hidden; }
.slide img{ width: 100%; height: 100%; object-fit: cover; filter: brightness(.6); }
.slide-text{
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; color: #fff; padding: 1rem; z-index: 1; max-width: 90vw; margin: 0 auto;
}
.slide-text h2{
  font-size: 2.5rem; margin-bottom: 1rem;
  text-shadow: 1px 1px 4px rgba(0,0,0,0.5); color: #f0f0f0;
}
.slide-text p{
  font-size: 1.2rem; color: #f0f0f0;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.4); margin-bottom: 0;
}
.dots{
  position: absolute; bottom: 15px; width: 100%; text-align: center; z-index: 2;
}
.dot{
  height: 12px; width: 12px; margin: 0 6px; display: inline-block; border-radius: 50%;
  background-color: rgba(255 255 255 / .5); cursor: pointer; transition: background-color .3s;
}
.dot.active, .dot:hover{ background:#7e57c2; }

/* Mobile: hauteur moins agressive que 100vh */
@media (max-width: 700px){
  .carousel{ height: clamp(340px, 62vh, 560px); }
  .slide-text h2{ font-size: clamp(1.35rem, 4.8vw + .6rem, 1.9rem); }
  .slide-text p { font-size: clamp(1rem,   2.8vw + .4rem, 1.15rem); }
}

/* ------------------------------
   3) Sections CTA & Services
---------------------------------*/
/* CTA group */
.cta-section{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  padding: 3rem 1rem;
  background: #f9fafc;
  border-radius: 12px;
  text-align: center;
  margin: 2.5rem auto;
  max-width: 1100px;
}
.cta-section .cta{
  background: #fff;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: var(--shadow-card);
  transition: transform .2s ease, box-shadow .2s ease;
}
.cta-section .cta:hover{
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}
.cta-section h2{ font-size: 1.3rem; margin-bottom: 1rem; color: #2e2e2e; }

/* Services grid */
.services-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  justify-items: center;
  max-width: 1200px;
  margin: 0 auto 3rem auto;
}
.service-card{
  width: 100%;
  max-width: 320px;
  background: #f5f7fa;
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
  padding: 1rem;
  transition: transform .3s ease, box-shadow .3s ease;
  cursor: default;
}
.service-card:hover{
  transform: translateY(-6px);
  box-shadow: 0 8px 20px rgba(126, 87, 194, 0.3);
}
.service-card img{
  width: 100%;
  height: 160px;            /* desktop: vignettes homogènes */
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: .8rem;
}
.service-card h3{ color: var(--brand); margin-bottom: .5rem; }


/* Section générale */
.section-collab {
  background: #f9fafb;
  padding: 50px 20px;
}

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

/* Titre principal */
.section-collab .title {
  text-align: center;
  font-size: 28px;
  font-weight: bold;
  margin-bottom: 40px;
  color: #333;
}

/* Grille responsive */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 768px) {
  .grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Cartes */
.card {
  background: #fff;
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.card-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 20px;
  color: #555;
}

/* Chiffres */
.number {
  font-size: 42px;
  font-weight: bold;
  color: #222;
  margin: 0;
  opacity: 0;
  transform: scale(0.8);
  transition: transform 0.6s ease, opacity 0.6s ease, color 0.6s ease;
}

/* Quand l'animation démarre */
.number.active {
  opacity: 1;
  transform: scale(1.4); /* zoom plus fort au départ */
  color: #2563eb; /* bleu dynamique pendant l'animation */
}

.label {
  font-size: 14px;
  color: #777;
  margin-top: 8px;
}

/* Mobile : empiler et libérer les images */
@media (max-width: 600px){
  .cta-section,
  .services-grid{ grid-template-columns: 1fr !important; gap: 1rem; padding-inline: 1rem; }
  .service-card{ max-width: none; width: 100%; }
  .service-card img{ height: auto; } /* évite rognage en mobile */
}

/* ------------------------------
   4) Sections informatives
---------------------------------*/
section h2 { text-align: center; margin: 2rem auto 1rem; }

#why-us p{
  text-align: justify;
  margin: 2rem auto 1rem;
  width: 700px;            /* desktop */
  color: #333;
  text-align:left;
}
@media (max-width: 700px){
  #why-us p{ width: auto; max-width: 65ch; padding: 0 1rem; }
}

/* Hero text block (si utilisé ailleurs) */
.hero-section{
  text-align: center;
  padding: 3rem 1rem;
  background: var(--bg-grad);
  border-radius: 12px;
  margin: 2rem auto;
  max-width: 1100px;
}
.hero-section h2{ font-size: 2rem; color: var(--brand); margin-bottom: 1rem; }
.hero-section p{ font-size: 1.1rem; color: var(--muted); max-width: 800px; margin: 0 auto 1.5rem; text-align:left;
 hyphens:auto; overflow-wrap: break-word;

}

/* About band */
.about-section{
  background: var(--brand); color: #fff; width: 100%;
  height: 150px; display: flex; justify-content: center; align-items: center;
}
@media (max-width: 480px){
  .about-section{ height: auto; min-height: 120px; padding: 1rem; }
}

/* ------------------------------
   5) Contact / Formulaires
---------------------------------*/
section#contact{
  display: flex; justify-content: center; align-items: center;
  padding: 4rem 1rem;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  margin-bottom: 4rem;
}
form{
  display: flex; flex-direction: column; gap: 1rem;
  max-width: 500px; width: 100%;
}
label{ font-weight: 600; color: var(--brand); }
input, textarea{
  padding: .75rem; border-radius: 6px; border: 1px solid #ccc;
  font-size: 1rem; background: #fafafa; color: var(--ink);
  transition: border-color .3s ease;
}
input:focus, textarea:focus{ border-color: #7e57c2; outline: none; }
button{
  background: var(--brand); color: #fff; border: none; border-radius: 6px;
  padding: .75rem 1.5rem; font-size: 1.1rem; cursor: pointer;
  transition: background-color .25s ease;
}
button:hover{ background: #303f9f; }

/* ------------------------------
   6) Accordéon (details/summary)
---------------------------------*/
.accordion{
  background: #fff; border: 1px solid #e6e9ef; border-radius: 10px;
  padding: .6rem .9rem; margin: .6rem 0 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,.03);
}
.accordion > summary{
  cursor: pointer; list-style: none; font-weight: 600; color: var(--brand);
  display: flex; align-items: center; gap: .5rem;
}
.accordion > summary::-webkit-details-marker{ display: none; }
.accordion > summary::after{
  content: "›"; transform: rotate(90deg); transition: transform .2s ease;
  font-size: 1.1rem; margin-left: auto; color:#7e57c2;
}
.accordion[open] > summary::after{ transform: rotate(-90deg); }
.accordion .bullet{ margin: .6rem 0 0 0; padding-left: 1rem; color: #444; }
.accordion .bullet li{ margin: .35rem 0; }

/* ------------------------------
   7) Footer
---------------------------------*/
footer{
  text-align: center;
  padding: 1rem;
  background: #e8ecf1;
  color: #555;
  font-size: .9rem;
}

/* ------------------------------
   8) Typo responsive douce
---------------------------------*/
@media (max-width: 670px){
  h2, .hero-section h2, section-collab .title{ font-size: 24px; }
  h1, .service-card h3{ font-size: 22px; }
  p , .hero-section p{ font-size: 1rem; }
}
@media (min-width: 768px) and (max-width: 1024px){
  body { font-size: 1rem; }
  h2 , .hero-section h2, .service-card h3  { font-size: 1.8rem; }
  .service-card img { height: 180px; }
}
@media (min-width: 1200px){
  h2, .hero-section h2 { font-size: 2.2rem; }
  .service-card img { height: 200px; }
}