/* ===== ASSIS — Association pour les personnes malades =====
   Style : Moderne / Minimaliste + glassmorphism + animations fluides */

:root {
  --primary: #5b8def;
  --primary-dark: #3a6fd8;
  --accent: #7fb5ff;
  --bg: #f4f7fc;
  --bg-alt: #ffffff;
  --text: #1c2b3a;
  --text-light: #5c6b7c;
  --glass: rgba(255, 255, 255, 0.62);
  --glass-border: rgba(255, 255, 255, 0.45);
  --shadow: 0 12px 40px rgba(30, 60, 110, 0.12);
  --radius: 20px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

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

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

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

/* ===== NAVBAR TRANSPARENTE ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: background 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
  padding: 18px 0;
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 4px 24px rgba(30, 60, 110, 0.1);
  padding: 10px 0;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  transition: color 0.4s ease;
}

.navbar.scrolled .logo {
  color: var(--primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  list-style: none;
}

.nav-links a {
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  position: relative;
  transition: color 0.3s ease;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.navbar.scrolled .nav-links a {
  color: var(--text);
}

.navbar.scrolled .nav-links a:hover {
  color: var(--primary);
}

.btn-nav {
  display: inline-block;
  padding: 10px 22px;
  border-radius: 50px;
  background: #fff;
  color: var(--primary) !important;
  font-weight: 700;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-nav::after { display: none; }

.btn-nav:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.navbar.scrolled .btn-nav {
  background: var(--primary);
  color: #fff !important;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
}

.hamburger span {
  width: 26px;
  height: 2.5px;
  background: #fff;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.navbar.scrolled .hamburger span {
  background: var(--text);
}

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  color: #fff;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(20, 40, 80, 0.72), rgba(58, 111, 216, 0.45));
  z-index: 1;
}

.hero .container {
  position: relative;
  z-index: 2;
  padding-top: 120px;
  padding-bottom: 80px;
}

.hero-badge {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.35);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 24px;
  letter-spacing: 0.5px;
}

.hero h1 {
  font-size: clamp(2.4rem, 5.5vw, 4.2rem);
  max-width: 720px;
  margin-bottom: 22px;
}

.hero p {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  max-width: 620px;
  margin-bottom: 34px;
  opacity: 0.95;
}

.hero-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 30px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.95rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
  cursor: pointer;
}

.btn-primary {
  background: #fff;
  color: var(--primary);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: translateY(-3px);
}

/* ===== SECTIONS GÉNÉRALES ===== */
.section {
  padding: 90px 0;
}

.section-alt {
  background: var(--bg-alt);
}

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

.section-tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 12px;
}

.section-header h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  margin-bottom: 16px;
}

.section-header p {
  color: var(--text-light);
}

/* ===== RÉVÉLATION AU SCROLL ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  animation: revealFallback 0.8s ease 0.3s forwards;
}

.reveal.visible {
  animation: none;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

@keyframes revealFallback {
  to { opacity: 1; transform: translateY(0); }
}

/* ===== CARTES SERVICES (hover 3D) ===== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.service-card {
  position: relative;
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 36px 30px;
  box-shadow: var(--shadow);
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.4s ease;
  transform-style: preserve-3d;
  perspective: 900px;
}

.service-card:hover {
  transform: translateY(-10px) rotateX(4deg) rotateY(-3deg) scale(1.02);
  box-shadow: 0 28px 60px rgba(30, 60, 110, 0.22);
}

.service-icon {
  width: 62px;
  height: 62px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
  box-shadow: 0 8px 20px rgba(91, 141, 239, 0.35);
}

.service-icon svg {
  stroke: #fff;
}

.service-card h3 {
  font-size: 1.25rem;
  margin-bottom: 12px;
}

.service-card p {
  color: var(--text-light);
  font-size: 0.95rem;
}

/* ===== APERÇU / ABOUT ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-img {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.about-img img {
  height: 100%;
  object-fit: cover;
}

.about-content h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  margin-bottom: 20px;
}

.about-content p {
  color: var(--text-light);
  margin-bottom: 16px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 30px;
}

.stat {
  text-align: center;
  padding: 22px 10px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
}

.stat strong {
  display: block;
  font-size: 1.8rem;
  color: var(--primary);
}

.stat span {
  font-size: 0.85rem;
  color: var(--text-light);
}

/* ===== TÉMOIGNAGES ===== */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.testimonial-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.testimonial-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 22px 50px rgba(30, 60, 110, 0.18);
}

.testimonial-card .quote {
  font-size: 1rem;
  color: var(--text-light);
  margin-bottom: 20px;
  font-style: italic;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 14px;
}

.testimonial-author .avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.testimonial-author strong {
  display: block;
  font-size: 0.95rem;
}

.testimonial-author span {
  font-size: 0.8rem;
  color: var(--text-light);
}

/* ===== GALERIE ===== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.gallery-item {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4/3;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-item:hover img {
  transform: scale(1.08);
}

.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(20, 40, 80, 0.55), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.gallery-item:hover::after {
  opacity: 1;
}

.gallery-item figcaption {
  position: absolute;
  bottom: 16px;
  left: 16px;
  color: #fff;
  font-weight: 600;
  z-index: 2;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.4s ease;
}

.gallery-item:hover figcaption {
  opacity: 1;
  transform: translateY(0);
}

/* ===== CTA ===== */
.cta {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff;
  text-align: center;
  border-radius: var(--radius);
  padding: 60px 40px;
}

.cta h2 {
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  margin-bottom: 16px;
}

.cta p {
  max-width: 520px;
  margin: 0 auto 28px;
  opacity: 0.9;
}

.cta .btn {
  background: #fff;
  color: var(--primary);
}

/* ===== CONTACT ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
}

.contact-info-item {
  display: flex;
  gap: 16px;
  margin-bottom: 26px;
}

.contact-info-item .ci-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-info-item .ci-icon svg {
  stroke: #fff;
}

.contact-info-item h4 {
  margin-bottom: 4px;
}

.contact-info-item p {
  color: var(--text-light);
}

.contact-form {
  background: #fff;
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: var(--shadow);
}

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

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

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #dfe6ef;
  border-radius: 12px;
  font-size: 0.95rem;
  font-family: inherit;
  transition: border 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(91, 141, 239, 0.15);
}

.form-group textarea {
  resize: vertical;
  min-height: 140px;
}

.form-success {
  display: none;
  padding: 16px;
  border-radius: 12px;
  background: #e8f7ee;
  color: #1e8e4a;
  font-weight: 600;
  margin-bottom: 16px;
}

.map-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-top: 50px;
}

.map-wrap iframe {
  width: 100%;
  height: 360px;
  border: 0;
}

/* ===== FOOTER ===== */
.footer {
  background: #142338;
  color: #cdd7e4;
  padding: 60px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer h4 {
  color: #fff;
  margin-bottom: 18px;
  font-size: 1.05rem;
}

.footer p,
.footer a {
  color: #cdd7e4;
  font-size: 0.9rem;
}

.footer a:hover {
  color: var(--accent);
}

.footer ul {
  list-style: none;
}

.footer ul li {
  margin-bottom: 10px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 24px;
  text-align: center;
  font-size: 0.85rem;
  color: #8fa0b5;
}

/* ===== LIGHTBOX ===== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lightbox.active {
  opacity: 1;
}

.lightbox img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  border-radius: 8px;
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 24px;
  color: #fff;
  font-size: 40px;
  cursor: pointer;
  line-height: 1;
}

/* ===== PAGE HEADER (pages intérieures) ===== */
.page-header {
  position: relative;
  min-height: 46vh;
  display: flex;
  align-items: center;
  color: #fff;
  overflow: hidden;
}

.page-header .hero-bg { background-position: center 30%; }

.page-header .container {
  position: relative;
  z-index: 2;
  padding-top: 120px;
  padding-bottom: 60px;
}

.page-header h1 {
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  margin-bottom: 12px;
}

.page-header p {
  max-width: 560px;
  opacity: 0.92;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
  .services-grid,
  .testimonials-grid,
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .section {
    padding: 60px 0;
  }

  .hamburger {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 78%;
    max-width: 320px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    gap: 28px;
    transition: right 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.15);
  }

  .nav-links.open {
    right: 0;
  }

  .nav-links a {
    color: var(--text) !important;
    font-size: 1.15rem;
  }

  .nav-links .btn-nav {
    background: var(--primary);
    color: #fff !important;
    text-align: center;
  }

  .services-grid,
  .testimonials-grid,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .stats {
    grid-template-columns: 1fr 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .hero-cta {
    flex-direction: column;
  }

  .hero-cta .btn {
    justify-content: center;
  }

  .contact-form {
    padding: 24px;
  }
}
