/* ==========================================================================
   R-RHE ASBL – Réseau de Réflexion des Hommes Engagés
   Main Stylesheet
   ========================================================================== */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Poppins:wght@300;400;500;600;700;800;900&display=swap');

/* ==========================================================================
   1. CSS Custom Properties
   ========================================================================== */
:root {
  /* Brand colours */
  --rose: #da1a6f;
  --rose-dark: #b8155d;
  --rose-light: #f0448a;
  --bleu: #3555a2;
  --bleu-dark: #2a4483;
  --bleu-light: #4a6dbf;
  --noir: #000000;

  /* Neutrals */
  --white: #ffffff;
  --gray-50: #f8f9fa;
  --gray-100: #f1f3f5;
  --gray-200: #e9ecef;
  --gray-300: #dee2e6;
  --gray-500: #adb5bd;
  --gray-700: #495057;
  --gray-800: #343a40;
  --gray-900: #212529;

  /* Typography */
  --font-heading: 'Poppins', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Spacing */
  --section-py: 6rem;
  --section-px: 1.5rem;

  /* Transitions */
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.16);

  /* Border radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 50%;
}

/* ==========================================================================
   2. Global Reset & Base
   ========================================================================== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--gray-800);
  background-color: var(--white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.3;
  color: var(--gray-900);
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-base);
}

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

/* ==========================================================================
   3. Utility Classes
   ========================================================================== */
.section-padding {
  padding: var(--section-py) 0;
}

.section-bg-light {
  background-color: var(--gray-50);
}

.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 0.75rem;
  position: relative;
}

.section-title span {
  color: var(--rose);
}

.section-subtitle {
  text-align: center;
  color: var(--gray-700);
  font-size: 1.1rem;
  max-width: 640px;
  margin: 0 auto 3.5rem;
}

.section-divider {
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--rose), var(--bleu));
  border-radius: 2px;
  margin: 0 auto 1rem;
}

/* Buttons */
.btn-rose {
  background-color: var(--rose);
  color: var(--white);
  border: 2px solid var(--rose);
  padding: 0.75rem 2rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: all var(--transition-base);
  font-size: 1rem;
  letter-spacing: 0.02em;
}

.btn-rose:hover,
.btn-rose:focus {
  background-color: var(--rose-dark);
  border-color: var(--rose-dark);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(218, 26, 111, 0.35);
}

.btn-bleu {
  background-color: var(--bleu);
  color: var(--white);
  border: 2px solid var(--bleu);
  padding: 0.75rem 2rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: all var(--transition-base);
  font-size: 1rem;
  letter-spacing: 0.02em;
}

.btn-bleu:hover,
.btn-bleu:focus {
  background-color: var(--bleu-dark);
  border-color: var(--bleu-dark);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(53, 85, 162, 0.35);
}

.btn-outline-white {
  background-color: transparent;
  color: var(--white);
  border: 2px solid var(--white);
  padding: 0.75rem 2rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: all var(--transition-base);
  font-size: 1rem;
}

.btn-outline-white:hover,
.btn-outline-white:focus {
  background-color: var(--white);
  color: var(--rose);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.25);
}

/* ==========================================================================
   4. Navbar
   ========================================================================== */
.navbar {
  padding: 1rem 0;
  transition: all var(--transition-base);
  z-index: 1050;
}

.navbar.scrolled {
  background-color: var(--white) !important;
  box-shadow: var(--shadow-md);
  padding: 0.5rem 0;
}

.navbar-brand img {
  height: 50px;
  transition: height var(--transition-base);
}

.navbar.scrolled .navbar-brand img {
  height: 42px;
}

.navbar .nav-link {
  color: var(--white) !important;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.5rem 1rem !important;
  position: relative;
  transition: color var(--transition-base);
}

.navbar.scrolled .nav-link {
  color: var(--gray-800) !important;
}

.navbar .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background-color: var(--rose);
  transition: width var(--transition-base);
}

.navbar .nav-link:hover::after,
.navbar .nav-link.active::after {
  width: 60%;
}

.navbar .nav-link:hover {
  color: var(--rose) !important;
}

.navbar.scrolled .nav-link:hover {
  color: var(--rose) !important;
}

.navbar-toggler {
  border: none;
  padding: 0.25rem 0.5rem;
}

.navbar-toggler:focus {
  box-shadow: none;
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar.scrolled .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(33, 37, 41, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ==========================================================================
   5. Hero Section
   ========================================================================== */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: url('../images/photo_ex.jpeg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.75) 0%,
    rgba(53, 85, 162, 0.6) 50%,
    rgba(218, 26, 111, 0.5) 100%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 850px;
  padding: 2rem;
}

.hero-content h1 {
  font-size: 3.2rem;
  font-weight: 900;
  color: var(--white);
  margin-bottom: 1.25rem;
  line-height: 1.2;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-content p {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 2.5rem;
  font-weight: 300;
}

.hero-buttons .btn {
  margin: 0.5rem;
  padding: 0.85rem 2.2rem;
  font-size: 1.05rem;
}

/* ==========================================================================
   6. About Section
   ========================================================================== */
#a-propos .about-img {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  position: relative;
}

#a-propos .about-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

#a-propos .about-img:hover img {
  transform: scale(1.03);
}

.about-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--rose), var(--bleu));
  color: var(--white);
  padding: 0.35rem 1rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.about-text h2 {
  font-size: 2.2rem;
  margin-bottom: 1.25rem;
}

.about-text p {
  color: var(--gray-700);
  margin-bottom: 1rem;
}

.value-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.value-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--white);
}

.value-icon.rose {
  background-color: var(--rose);
}

.value-icon.bleu {
  background-color: var(--bleu);
}

.value-item h5 {
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
}

.value-item p {
  font-size: 0.93rem;
  color: var(--gray-700);
  margin-bottom: 0;
}

/* ==========================================================================
   7. Actions Section
   ========================================================================== */
.action-card {
  background: var(--white);
  border: none;
  border-radius: var(--radius-md);
  padding: 2.5rem 2rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
  height: 100%;
  position: relative;
  overflow: hidden;
}

.action-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--rose), var(--bleu));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-base);
}

.action-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
}

.action-card:hover::before {
  transform: scaleX(1);
}

.action-icon {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 2rem;
  transition: all var(--transition-base);
}

.action-icon.rose-bg {
  background-color: rgba(218, 26, 111, 0.1);
  color: var(--rose);
}

.action-icon.bleu-bg {
  background-color: rgba(53, 85, 162, 0.1);
  color: var(--bleu);
}

.action-card:hover .action-icon.rose-bg {
  background-color: var(--rose);
  color: var(--white);
}

.action-card:hover .action-icon.bleu-bg {
  background-color: var(--bleu);
  color: var(--white);
}

.action-card h4 {
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
}

.action-card p {
  font-size: 0.95rem;
  color: var(--gray-700);
  margin-bottom: 0;
}

/* ==========================================================================
   8. Programmes Section
   ========================================================================== */
.programme-item {
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
  margin-bottom: 2rem;
}

.programme-item:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.programme-img {
  overflow: hidden;
  height: 100%;
  min-height: 280px;
}

.programme-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.programme-item:hover .programme-img img {
  transform: scale(1.05);
}

.programme-text {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.programme-number {
  font-size: 3rem;
  font-weight: 900;
  color: rgba(218, 26, 111, 0.12);
  font-family: var(--font-heading);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.programme-text h4 {
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
}

.programme-text p {
  color: var(--gray-700);
  font-size: 0.95rem;
}

/* ==========================================================================
   9. Impact / Counter Section
   ========================================================================== */
.impact-section {
  background: linear-gradient(135deg, var(--bleu) 0%, var(--bleu-dark) 50%, var(--rose-dark) 100%);
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.impact-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../images/photo_ex\ \(5\).jpeg') center / cover no-repeat;
  opacity: 0.1;
}

.counter-box {
  text-align: center;
  padding: 2rem 1rem;
  position: relative;
  z-index: 2;
}

.counter-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: rgba(255, 255, 255, 0.85);
}

.counter-number {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 900;
  display: block;
  margin-bottom: 0.25rem;
}

.counter-label {
  font-size: 1rem;
  font-weight: 400;
  opacity: 0.85;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ==========================================================================
  10. News / Actualités Section
   ========================================================================== */
.news-card {
  border: none;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
  height: 100%;
}

.news-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.news-card .card-img-top {
  height: 220px;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.news-card:hover .card-img-top {
  transform: scale(1.05);
}

.news-card .card-img-wrapper {
  overflow: hidden;
}

.news-card .card-body {
  padding: 1.5rem;
}

.news-date {
  font-size: 0.85rem;
  color: var(--rose);
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.news-card .card-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.news-card .card-text {
  font-size: 0.93rem;
  color: var(--gray-700);
}

.news-card .btn-link {
  color: var(--bleu);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: color var(--transition-base);
}

.news-card .btn-link:hover {
  color: var(--rose);
}

/* ==========================================================================
  11. Engagement / CTA Section
   ========================================================================== */
.engagement-section {
  background: linear-gradient(135deg, var(--rose) 0%, var(--bleu) 100%);
  color: var(--white);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.engagement-section::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 300px;
  height: 300px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
}

.engagement-section::after {
  content: '';
  position: absolute;
  bottom: -100px;
  left: -100px;
  width: 400px;
  height: 400px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.04);
}

.engagement-section h2 {
  color: var(--white);
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.engagement-section p {
  font-size: 1.15rem;
  opacity: 0.9;
  max-width: 650px;
  margin: 0 auto 2.5rem;
}

.engagement-section .btn {
  margin: 0.5rem;
}

/* ==========================================================================
  12. Contact Section
   ========================================================================== */
.contact-form .form-control {
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.15rem;
  font-size: 0.95rem;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.contact-form .form-control:focus {
  border-color: var(--bleu);
  box-shadow: 0 0 0 0.2rem rgba(53, 85, 162, 0.15);
}

.contact-form label {
  font-weight: 600;
  font-size: 0.93rem;
  margin-bottom: 0.35rem;
  color: var(--gray-800);
}

.contact-info-card {
  background: linear-gradient(135deg, var(--bleu), var(--bleu-dark));
  color: var(--white);
  border-radius: var(--radius-md);
  padding: 2.5rem;
  height: 100%;
}

.contact-info-card h4 {
  color: var(--white);
  margin-bottom: 1.5rem;
  font-size: 1.4rem;
}

.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.contact-info-item i {
  font-size: 1.3rem;
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.8);
}

.contact-info-item h6 {
  color: var(--white);
  font-size: 0.95rem;
  margin-bottom: 0.15rem;
}

.contact-info-item p {
  margin-bottom: 0;
  font-size: 0.93rem;
  opacity: 0.85;
}

.contact-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.15);
  color: var(--white);
  font-size: 1.15rem;
  margin-right: 0.65rem;
  transition: all var(--transition-base);
}

.contact-social a:hover {
  background: var(--rose);
  transform: translateY(-3px);
}

/* ==========================================================================
  13. Footer
   ========================================================================== */
.site-footer {
  background-color: var(--gray-900);
  color: rgba(255, 255, 255, 0.75);
  padding-top: 4rem;
}

.footer-logo img {
  height: 55px;
  margin-bottom: 1.25rem;
}

.site-footer p {
  font-size: 0.93rem;
  line-height: 1.7;
}

.footer-title {
  color: var(--white);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  position: relative;
  padding-bottom: 0.75rem;
}

.footer-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 35px;
  height: 3px;
  background: var(--rose);
  border-radius: 2px;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.6rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.93rem;
  transition: all var(--transition-base);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.footer-links a:hover {
  color: var(--rose);
  padding-left: 5px;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
  font-size: 1rem;
  margin-right: 0.5rem;
  transition: all var(--transition-base);
}

.footer-social a:hover {
  background: var(--rose);
  color: var(--white);
  transform: translateY(-3px);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.25rem 0;
  margin-top: 3rem;
  text-align: center;
  font-size: 0.88rem;
}

/* ==========================================================================
  14. Scroll Reveal Animations
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered delays for children */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ==========================================================================
  15. Back to Top Button
   ========================================================================== */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: var(--rose);
  color: var(--white);
  border: none;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all var(--transition-base);
  cursor: pointer;
  z-index: 999;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--rose-dark);
  transform: translateY(-3px);
}

/* ==========================================================================
  16. Responsive
   ========================================================================== */
@media (max-width: 991.98px) {
  .hero-content h1 {
    font-size: 2.2rem;
  }

  .hero-content p {
    font-size: 1.05rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .navbar-collapse {
    background: var(--white);
    border-radius: var(--radius-sm);
    padding: 1rem;
    margin-top: 0.5rem;
    box-shadow: var(--shadow-md);
  }

  .navbar-collapse .nav-link {
    color: var(--gray-800) !important;
  }

  .programme-img {
    min-height: 220px;
  }

  .engagement-section h2 {
    font-size: 2rem;
  }
}

@media (max-width: 767.98px) {
  :root {
    --section-py: 4rem;
  }

  .hero-content h1 {
    font-size: 1.75rem;
  }

  .hero-buttons .btn {
    display: block;
    width: 100%;
    margin: 0.5rem 0;
  }

  .section-title {
    font-size: 1.75rem;
  }

  .counter-number {
    font-size: 2.25rem;
  }

  .about-text {
    margin-top: 2rem;
  }
}

@media (max-width: 575.98px) {
  .hero-content h1 {
    font-size: 1.5rem;
  }

  .contact-info-card {
    margin-top: 2rem;
  }
}
