 :root {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --accent-primary: #1b978d;
  --accent-secondary: #d35400;
  --border-color: rgba(0,0,0,0.08);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
  --glass-bg: rgba(255,255,255,0.8);
  --glass-border: rgba(255,255,255,0.3);
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
}

/* Dark Mode Variables */
[data-theme="dark"] {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-card: #1e293b;
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --border-color: rgba(255,255,255,0.1);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.5);
  --glass-bg: rgba(30,41,59,0.9);
  --glass-border: rgba(255,255,255,0.1);
}

/* === ÉTOILES GLOBALES EN MODE DARK === */
.global-stars {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  pointer-events: none;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

[data-theme="dark"] .global-stars {
  opacity: 1;
  visibility: visible;
}

.global-star {
  position: absolute;
  background: radial-gradient(circle, rgba(251,191,36,0.9) 0%, transparent 70%);
  border-radius: 50%;
  animation: global-twinkle var(--duration, 4s) ease-in-out infinite;
  opacity: 0;
}

.global-star.teal {
  background: radial-gradient(circle, rgba(27,151,141,0.9) 0%, transparent 70%);
}

.global-star.white {
  background: radial-gradient(circle, rgba(255,255,255,0.95) 0%, transparent 70%);
}

@keyframes global-twinkle {
  0%, 100% {
    opacity: 0;
    transform: scale(0.5);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.2);
  }
}

[data-theme="dark"] .bg-light,
[data-theme="dark"] .bg-white {
  background: #1e293b !important;
}

[data-theme="dark"] .text-muted {
  color: #94a3b8 !important;
}

[data-theme="dark"] .text-dark {
  color: #f1f5f9 !important;
}

/* === DARK MODE NAVBAR === */
[data-theme="dark"] .navbar {
  background: linear-gradient(45deg, #0f172a, #1e293b) !important;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 4px 20px rgba(0,0,0,0.4) !important;
}

[data-theme="dark"] .navbar.scrolled {
  background: linear-gradient(45deg, #0f172a, #1e293b) !important;
}

[data-theme="dark"] .navbar .nav-link {
  color: #e2e8f0 !important;
}

[data-theme="dark"] .navbar .nav-link:hover {
  color: #fbbf24 !important;
}

[data-theme="dark"] .navbar .nav-link::after {
  background: #fbbf24;
}

[data-theme="dark"] .btn-connexion {
  background: linear-gradient(45deg, #1b978d, #d35400) !important;
  color: white !important;
}

/* === DARK MODE HERO === */
[data-theme="dark"] .hero-section {
  background: linear-gradient(120deg, #1e293b, #0f172a) !important;
}

/* === DARK MODE SECTIONS === */
[data-theme="dark"] #actualite,
[data-theme="dark"] #about,
[data-theme="dark"] #services,
[data-theme="dark"] #choisir,
[data-theme="dark"] #temoignages,
[data-theme="dark"] #realisations,
[data-theme="dark"] #faq,
[data-theme="dark"] #histoire,
[data-theme="dark"] #cta {
  background: #0f172a !important;
}

[data-theme="dark"] section h2 {
  color: #1b978d !important;
}

/* === DARK MODE CARDS === */
[data-theme="dark"] .card,
[data-theme="dark"] .service-box,
[data-theme="dark"] .info-card,
[data-theme="dark"] .ags-timeline-card,
[data-theme="dark"] .timeline-content,
[data-theme="dark"] .choisir-item,
[data-theme="dark"] .actualite-content,
[data-theme="dark"] .hover-raise {
  background: #1e293b !important;
  border-color: rgba(255,255,255,0.1) !important;
  color: #f1f5f9 !important;
}

[data-theme="dark"] .card-body,
[data-theme="dark"] .card-text {
  color: #cbd5e1 !important;
}

[data-theme="dark"] .border-start {
  border-color: #1b978d !important;
}

/* === DARK MODE ACCORDION/FAQ === */
[data-theme="dark"] .accordion-item {
  background: #1e293b !important;
  border-color: rgba(255,255,255,0.1) !important;
}

[data-theme="dark"] .accordion-button {
  background: #1e293b !important;
  color: #f1f5f9 !important;
}

[data-theme="dark"] .accordion-button:not(.collapsed) {
  background: #334155 !important;
  color: #1b978d !important;
}

[data-theme="dark"] .accordion-button::after {
  filter: invert(1);
}

[data-theme="dark"] .accordion-body {
  background: #1e293b !important;
  color: #cbd5e1 !important;
  border-left-color: #1b978d !important;
}

/* === DARK MODE CONTACT FORM === */
[data-theme="dark"] #contact {
  background: linear-gradient(45deg, #0f172a, #1e293b) !important;
}

[data-theme="dark"] .contact-form {
  background: #1e293b !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
}

[data-theme="dark"] .contact-form .form-control {
  background: #334155 !important;
  border-color: rgba(255,255,255,0.1) !important;
  color: #f1f5f9 !important;
}

[data-theme="dark"] .contact-form .form-control::placeholder {
  color: #94a3b8 !important;
}

[data-theme="dark"] .contact-form .form-control:focus {
  background: #475569 !important;
  border-color: #1b978d !important;
}

[data-theme="dark"] .contact-form .form-label {
  color: #1b978d !important;
}

/* === DARK MODE FOOTER === */
[data-theme="dark"] .footer {
  background: linear-gradient(135deg, #0f172a, #1e293b) !important;
  border-top: 1px solid rgba(255,255,255,0.1);
}

[data-theme="dark"] .footer-title {
  color: #1b978d !important;
}

[data-theme="dark"] .footer-link {
  color: #cbd5e1 !important;
}

[data-theme="dark"] .footer-link:hover {
  color: #fbbf24 !important;
}

[data-theme="dark"] .footer-separator {
  border-color: rgba(255,255,255,0.1) !important;
}

/* === DARK MODE TIMELINE === */
[data-theme="dark"] .timeline::before {
  background: linear-gradient(180deg, #1b978d, #d35400) !important;
}

[data-theme="dark"] .timeline-icon {
  box-shadow: 0 4px 15px rgba(0,0,0,0.4) !important;
}

[data-theme="dark"] #histoire .ags-timeline-item::before {
  background: linear-gradient(45deg, #1b978d, #d35400) !important;
}

[data-theme="dark"] #histoire .ags-timeline-item::after {
  background: rgba(255,255,255,0.1) !important;
}

/* === DARK MODE MODALS === */
[data-theme="dark"] .modal-content {
  background: #1e293b !important;
  color: #f1f5f9 !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
}

[data-theme="dark"] .modal-header,
[data-theme="dark"] .modal-footer {
  border-color: rgba(255,255,255,0.1) !important;
}

[data-theme="dark"] .btn-close {
  filter: invert(1);
}

/* === DARK MODE BUTTONS === */
[data-theme="dark"] .btn-outline-primary {
  color: #1b978d !important;
  border-color: #1b978d !important;
}

[data-theme="dark"] .btn-outline-primary:hover {
  background: #1b978d !important;
  color: #fff !important;
}

/* === DARK MODE HEADINGS === */
[data-theme="dark"] h1, [data-theme="dark"] h2, 
[data-theme="dark"] h3, [data-theme="dark"] h4, 
[data-theme="dark"] h5, [data-theme="dark"] h6 {
  color: #f1f5f9 !important;
}

[data-theme="dark"] p {
  color: #cbd5e1;
}

/* === DARK MODE CTA SECTION === */
[data-theme="dark"] #cta {
  background: linear-gradient(135deg, #1e293b, #0f172a) !important;
}

[data-theme="dark"] #cta .btn-primary {
  background: linear-gradient(45deg, #1b978d, #d35400) !important;
}

/* === DARK MODE CAROUSEL === */
[data-theme="dark"] #testimonialCarousel .card {
  background: #1e293b !important;
}

[data-theme="dark"] #testimonialCarousel .card-title {
  color: #f1f5f9 !important;
}

[data-theme="dark"] #testimonialCarousel .carousel-control-prev-icon,
[data-theme="dark"] #testimonialCarousel .carousel-control-next-icon {
  background-color: rgba(255,255,255,0.3) !important;
}

/* === DARK MODE SCROLL TO TOP === */
[data-theme="dark"] #scrollToTop {
  background: #1b978d !important;
  box-shadow: 0 4px 15px rgba(27,151,141,0.4) !important;
}

 body {
      font-family: 'Poppins', sans-serif;
      background: var(--bg-primary);
      margin: 0; padding: 0;
      color: var(--text-primary);
      padding-top: 70px;
      transition: background var(--transition-normal), color var(--transition-normal);
    }
    /* --- Anti overflow horizontal global --- */
html, body {
  max-width: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

/* Sécurise tous les blocs responsives */
img, iframe, video, .embed-responsive, .ratio > * {
  max-width: 100%;
  height: auto;
}

/* Image optimization */
img {
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

/* Optimized image loading - fast display without blur */
img {
  content-visibility: auto;
  display: block;
}

img[loading="lazy"] {
  opacity: 1;
  background: linear-gradient(135deg, #e2e8f0 0%, #f1f5f9 50%, #e2e8f0 100%);
  background-size: 200% 200%;
  animation: img-placeholder 1.5s ease infinite;
}

img[loading="lazy"].loaded {
  animation: none;
  background: transparent;
}

@keyframes img-placeholder {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Prevent layout shift with aspect-ratio */
.card-img-top {
  aspect-ratio: 16/10;
  object-fit: cover;
}

.service-image img {
  aspect-ratio: 16/9;
}

.mockup-img {
  aspect-ratio: auto;
}

/* Skeleton Loading */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 8px;
}

[data-theme="dark"] .skeleton {
  background: linear-gradient(90deg, #2d3748 25%, #4a5568 50%, #2d3748 75%);
  background-size: 200% 100%;
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Image skeleton placeholder */
.img-skeleton {
  position: relative;
  overflow: hidden;
  background: #e2e8f0;
}

.img-skeleton::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Dark Mode Toggle Button */
.dark-mode-toggle {
  position: fixed;
  bottom: 90px;
  right: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: white;
  font-size: 1.3rem;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(27,151,141,0.4);
  z-index: 1000;
  transition: all var(--transition-normal);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.dark-mode-toggle:hover {
  transform: scale(1.1) rotate(15deg);
  box-shadow: 0 6px 25px rgba(27,151,141,0.5);
}

.dark-mode-toggle:active {
  transform: scale(0.95);
}

.dark-mode-toggle i {
  transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.dark-mode-toggle:hover i {
  transform: rotate(360deg);
}

[data-theme="dark"] .dark-mode-toggle {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  box-shadow: 0 4px 15px rgba(251,191,36,0.4);
}

[data-theme="dark"] .dark-mode-toggle:hover {
  box-shadow: 0 6px 25px rgba(251,191,36,0.5);
}

/* Pour les éléments animés AOS qui sortent parfois du flux
   (optionnel : n'applique que sur mobile) */
@media (max-width: 575.98px) {
  [data-aos] {
    overflow: visible;
    transform-origin: center;
  }
}

/* Réduction des animations sur mobile pour performance */
@media (max-width: 768px) {
  [data-aos] {
    transition-duration: 0.4s !important;
  }
  
  [data-aos][data-aos-delay] {
    transition-delay: 0s !important;
  }
}

/* Préférence utilisateur: réduction des mouvements */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  [data-aos] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  
  img[loading="lazy"] {
    filter: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
}

    .navbar {
      background: linear-gradient(45deg, #1b978d, #d35400);
      padding: 0.3rem 0;
      box-shadow: 0 2px 10px rgba(0,0,0,0.1);
      transition: all 0.4s ease;
      position: fixed !important;
      top: 0;
      left: 0;
      right: 0;
      z-index: 1030;
    }
    
    .navbar.scrolled {
      padding: 0.15rem 0;
      background: linear-gradient(45deg, #1b978d, #d35400);
      box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    }
    
    .navbar-brand img {
      height: 45px;
      border-radius: 50%;
      margin-right: 10px;
      transition: height 0.4s ease;
    }
    
    .navbar.scrolled .navbar-brand img {
      height: 35px;
    }
    
    .navbar .nav-link {
      font-size: 14px;
      font-weight: 500;
      padding: 0.4rem 0.8rem !important;
      transition: color 0.3s ease;
      position: relative;
      white-space: nowrap;
    }
    
    .navbar .nav-link::after {
      content: '';
      position: absolute;
      bottom: 0;
      left: 50%;
      transform: translateX(-50%);
      width: 0;
      height: 2px;
      background: #fffaa3;
      transition: width 0.3s ease;
    }
    
    .navbar .nav-link:hover {
      color: #fffaa3 !important;
    }
    
    .navbar .nav-link:hover::after {
      width: 80%;
    }
    
    .navbar-toggler {
      border: none;
      padding: 0.25rem 0.5rem;
      background: rgba(255,255,255,0.1);
      border-radius: 5px;
    }
    
    .navbar-toggler:hover {
      background: rgba(255,255,255,0.2);
    }
    
    .navbar-toggler .navbar-toggler-icon {
      background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='white' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
    }
    
    .navbar-toggler:focus {
      box-shadow: none;
    }
    
    .navbar-collapse {
      transition: all 0.3s ease;
    }
    
    .btn-connexion {
      background: linear-gradient(45deg, #1b978d, #d35400);
      color: white;
      border: none;
      border-radius: 30px;
      padding: 0.5rem 1.25rem;
      transition: background 0.3s ease, transform 0.2s ease;
    }

    .btn-connexion:hover {
      background: linear-gradient(45deg, #d35400, #1b978d);
      transform: scale(1.05);
      color: white;
    }
    
    /* Mobile specific styles */
    @media (max-width: 991.98px) {
      .navbar {
        padding: 0.75rem 0;
      }
      
      .navbar-brand img {
        height: 45px;
      }
      
      .navbar-nav {
        background: linear-gradient(45deg, #1b978d, #d35400);
        border-radius: 10px;
        padding: 1rem;
        margin-top: 1rem;
        box-shadow: 0 5px 15px rgba(0,0,0,0.2);
      }
      
      .navbar .nav-link {
        color: white !important;
        font-size: 13px;
        padding: 0.6rem 0.7rem !important;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        margin: 0.2rem 0;
        border-radius: 5px;
        transition: all 0.3s ease;
        white-space: nowrap;
      }
      
      .navbar .nav-link:hover {
        background: rgba(255,255,255,0.2);
        color: white !important;
        transform: translateX(5px);
      }
      
      .navbar .nav-link:last-child {
        border-bottom: none;
      }
      
      .btn-connexion {
        margin: 1rem auto 0;
        display: block;
        width: fit-content;
        background: rgba(255,255,255,0.2);
        border: 1px solid rgba(255,255,255,0.3);
      }
      
      .btn-connexion:hover {
        background: rgba(255,255,255,0.3);
        transform: scale(1.05);
      }
    }
    
    /* Desktop specific styles */
    @media (min-width: 992px) {
      .navbar {
        padding: 0.5rem 0;
      }
      
      .navbar.scrolled {
        padding: 0.2rem 0;
      }
      
      .navbar-brand img {
        height: 55px;
      }
      
      .navbar.scrolled .navbar-brand img {
        height: 40px;
      }
      
      .navbar .nav-link {
        margin: 0 0.25rem;
        font-size: 14px;
        padding: 0.3rem 0.7rem !important;
      }
      
      .navbar.scrolled .nav-link {
        font-size: 13px;
        padding: 0.2rem 0.5rem !important;
      }
      
      .btn-connexion {
        margin-left: 1rem;
        font-size: 13px;
        padding: 0.4rem 1rem;
      }
      
      .navbar.scrolled .btn-connexion {
        font-size: 12px;
        padding: 0.3rem 0.8rem;
      }
    }
    
    /* Small mobile adjustments */
    @media (max-width: 576px) {
      body {
        padding-top: 65px;
      }
      
      .navbar-brand img {
        height: 40px;
      }
      
      .navbar .nav-link {
        font-size: 13px;
        padding: 0.5rem 0.6rem !important;
      }
      
      .btn-connexion {
        font-size: 13px;
        padding: 0.4rem 0.8rem;
      }
    }

    /* HERO */
    .hero-section {
      background: linear-gradient(135deg, #1a1a2e 0%, #16213e 25%, #0f3460 50%, #d35400 75%, #e94560 100%);
      padding: 6rem 0;
      color: #fff;
      position: relative;
      overflow: hidden;
      min-height: 85vh;
      display: flex;
      align-items: center;
    }

    /* Overlay sombre pour atténuer */
    .hero-section::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: linear-gradient(
        180deg,
        rgba(15, 23, 42, 0.7) 0%,
        rgba(30, 41, 59, 0.5) 30%,
        rgba(211, 84, 0, 0.3) 70%,
        rgba(211, 84, 0, 0.5) 100%
      );
      z-index: 1;
    }

    .hero-section > .container {
      position: relative;
      z-index: 3;
    }

    /* Vagues en bas du hero */
    .hero-section::after {
      content: '';
      position: absolute;
      bottom: 0;
      left: 0;
      right: 0;
      height: 150px;
      background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='%23f8fafc' fill-opacity='0.1' d='M0,160L48,176C96,192,192,224,288,213.3C384,203,480,149,576,144C672,139,768,181,864,197.3C960,213,1056,203,1152,176C1248,149,1344,107,1392,85.3L1440,64L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z'%3E%3C/path%3E%3C/svg%3E") no-repeat bottom;
      background-size: cover;
      z-index: 2;
      pointer-events: none;
    }

    /* Container des étoiles */
    .stars-container {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      z-index: 2;
      overflow: hidden;
      pointer-events: none;
    }

    /* Étoiles animées */
    .star {
      position: absolute;
      background: white;
      border-radius: 50%;
      animation: twinkle var(--duration, 3s) ease-in-out infinite;
      opacity: 0;
    }

    .star::before {
      content: '';
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      width: 200%;
      height: 200%;
      background: radial-gradient(circle, rgba(255,255,255,0.8) 0%, transparent 70%);
      border-radius: 50%;
    }

    @keyframes twinkle {
      0%, 100% {
        opacity: 0;
        transform: scale(0.5);
      }
      50% {
        opacity: 1;
        transform: scale(1);
      }
    }

    /* Particules flottantes */
    .particle {
      position: absolute;
      background: radial-gradient(circle, rgba(251, 191, 36, 0.8) 0%, transparent 70%);
      border-radius: 50%;
      animation: float var(--float-duration, 8s) ease-in-out infinite;
      pointer-events: none;
    }

    @keyframes float {
      0%, 100% {
        transform: translateY(0) translateX(0);
        opacity: 0.3;
      }
      25% {
        transform: translateY(-20px) translateX(10px);
        opacity: 0.8;
      }
      50% {
        transform: translateY(-40px) translateX(-10px);
        opacity: 0.5;
      }
      75% {
        transform: translateY(-20px) translateX(15px);
        opacity: 0.7;
      }
    }

    /* Lueur ambiante */
    .glow-orb {
      position: absolute;
      border-radius: 50%;
      filter: blur(60px);
      opacity: 0.4;
      animation: pulse-glow 6s ease-in-out infinite;
      pointer-events: none;
    }

    @keyframes pulse-glow {
      0%, 100% {
        transform: scale(1);
        opacity: 0.3;
      }
      50% {
        transform: scale(1.2);
        opacity: 0.5;
      }
    }

    .hero-text h1 {
      font-size: 2.5rem;
      font-weight: 700;
      text-shadow: 0 4px 20px rgba(0,0,0,0.3);
      margin-bottom: 1rem;
      white-space: nowrap;
    }

    .hero-text h1 .brand-name {
      display: inline;
    }

    @media (max-width: 576px) {
      .hero-text h1 {
        font-size: 1.6rem;
        white-space: normal;
        text-align: center;
      }
      .hero-text h1 .brand-name {
        display: block;
        font-size: 2rem;
        margin-top: 0.3rem;
      }
    }

    .hero-text p {
      font-size: 1.3rem;
      text-shadow: 0 2px 10px rgba(0,0,0,0.2);
      opacity: 0.95;
    }
    .hero-text .btn {
      background: linear-gradient(45deg, #1b978d, #0d9488);
      border: none;
      border-radius: 30px;
      padding: .85rem 2rem;
      transition: all .3s ease;
      color: white;
      font-weight: 500;
      box-shadow: 0 4px 15px rgba(27, 151, 141, 0.4);
    }
    .hero-text .btn:hover {
      background: linear-gradient(45deg, #0d9488, #1b978d);
      transform: translateY(-3px);
      box-shadow: 0 8px 25px rgba(27, 151, 141, 0.5);
    }
    .hero-text .btn-primary {
      background: rgba(255,255,255,0.15);
      backdrop-filter: blur(10px);
      border: 1px solid rgba(255,255,255,0.3);
    }
    .hero-text .btn-primary:hover {
      background: rgba(255,255,255,0.25);
      border-color: rgba(255,255,255,0.5);
    }
    .mockup-img {
      max-width: 100%;
      height: auto;
      max-height: 450px;
      display: block;
      margin: 0 auto;
      border-radius: 0;
      box-shadow: none;
      background: transparent;
      animation: float-mockup 6s ease-in-out infinite;
      filter: drop-shadow(0 20px 40px rgba(0,0,0,0.3));
    }

    @keyframes float-mockup {
      0%, 100% {
        transform: translateY(0);
      }
      50% {
        transform: translateY(-15px);
      }
    }

    /* Responsive hero */
    @media (max-width: 768px) {
      .hero-section {
        min-height: auto;
        padding: 4rem 0 6rem;
      }
      .hero-text h1 {
        font-size: 2.2rem;
      }
      .hero-text p {
        font-size: 1.1rem;
      }
      .mockup-img {
        max-height: 300px;
        margin-top: 2rem;
      }
    }

    /* Dark mode hero */
    [data-theme="dark"] .hero-section {
      background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%) !important;
    }
    
    [data-theme="dark"] .hero-section::before {
      background: linear-gradient(
        180deg,
        rgba(15, 23, 42, 0.8) 0%,
        rgba(30, 41, 59, 0.6) 50%,
        rgba(51, 65, 85, 0.4) 100%
      ) !important;
    }

    /* SECTIONS */
    section {
      padding: 3rem 0;
    }
    h2 {
      margin-bottom: 1.5rem;
      font-weight: 600;
    }

    /* Actualités */
    #actualite {
      background: linear-gradient(135deg, #faf8f5 0%, #f5f0e8 50%, #efe8dd 100%);
      position: relative;
      overflow: hidden;
    }
    #actualite::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: radial-gradient(ellipse at 20% 30%, rgba(211,84,0,0.03) 0%, transparent 50%),
                  radial-gradient(ellipse at 80% 70%, rgba(27,151,141,0.03) 0%, transparent 50%);
      z-index: 0;
      pointer-events: none;
    }

    #actualite > .container {
      position: relative;
      z-index: 1;
    }
    #actualite h2 {
      color: #d35400;
      text-align: center;
    }
    .actualite-content {
      max-width: 800px;
      margin: auto;
      background: #fff;
      padding: 1.5rem;
      border: none;
      border-radius: 10px;
      transition: transform .3s, box-shadow .3s;
      box-shadow: 0 10px 20px rgba(0,0,0,.1);
      text-align: justify;
    }

    /* === SECTION À PROPOS === */
    .about-section {
      background: linear-gradient(135deg, #faf8f5 0%, #f5f0e8 50%, #efe8dd 100%);
      position: relative;
      overflow: hidden;
    }

    .about-stars {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      z-index: 1;
      pointer-events: none;
    }

    .about-star {
      position: absolute;
      background: radial-gradient(circle, rgba(27,151,141,0.8) 0%, transparent 70%);
      border-radius: 50%;
      animation: about-twinkle var(--duration, 4s) ease-in-out infinite;
      opacity: 0;
    }

    .about-star.gold {
      background: radial-gradient(circle, rgba(211,84,0,0.6) 0%, transparent 70%);
    }

    @keyframes about-twinkle {
      0%, 100% { opacity: 0; transform: scale(0.3); }
      50% { opacity: 0.7; transform: scale(1); }
    }

    #about h2 {
      color: #1b978d !important;
      font-size: 2.2rem;
    }

    #about h2::after {
      content: '';
      display: block;
      width: 80px;
      height: 4px;
      background: linear-gradient(90deg, #1b978d, #d35400);
      margin: 1rem auto 0;
      border-radius: 2px;
    }

    .about-section .bg-white {
      background: rgba(255,255,255,0.98) !important;
      border-radius: 20px;
      border: 1px solid rgba(27,151,141,0.1);
      box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    }

    .about-section .info-card {
      background: rgba(255,255,255,0.95) !important;
      border: 1px solid rgba(27,151,141,0.08);
      border-radius: 16px !important;
      transition: all 0.3s ease;
    }

    .about-section .info-card:hover {
      transform: translateY(-5px);
      box-shadow: 0 10px 30px rgba(27,151,141,0.15) !important;
    }

    [data-theme="dark"] .about-section {
      background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important;
    }

    [data-theme="dark"] .about-section .bg-white {
      background: rgba(30,41,59,0.95) !important;
      border-color: rgba(255,255,255,0.1) !important;
    }

    /* Nos Services */
    #services {
      background: var(--bg-primary);
    }

    .service-card {
      border: none;
      border-radius: 10px;
      transition: transform .3s, box-shadow .3s;
    }

    .service-card:hover {
      transform: translateY(-5px);
      box-shadow: 0 8px 16px rgba(0,0,0,.1);
    }
    .service-card i {
      font-size: 2.5rem;
      color: #1b978d;
      margin-bottom: .75rem;
    }
    .service-card h5 {
      color: #d35400;
      margin-bottom: .5rem;
    }
    .service-card p {
      font-size: .95rem;
      color: #555;
    }

    /* Modern Service Box Styles */
    .service-box {
      background: var(--bg-card);
      border: 1px solid var(--border-color);
      transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
      position: relative;
      overflow: hidden;
    }

    .service-box::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 4px;
      background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
      transform: scaleX(0);
      transition: transform 0.4s ease;
    }

    .service-box:hover::before {
      transform: scaleX(1);
    }

    .service-box:hover {
      transform: translateY(-8px);
      box-shadow: var(--shadow-lg);
    }

    .service-box .service-image {
      height: 200px;
      overflow: hidden;
    }

    .service-box .service-image img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      transition: transform 0.5s ease;
    }

    .service-box:hover .service-image img {
      transform: scale(1.08);
    }

    .service-box h5 {
      color: var(--text-primary);
      transition: color 0.3s ease;
    }

    .service-box:hover h5 {
      color: var(--accent-primary);
    }

    .service-box .btn-primary {
      background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
      border: none;
      border-radius: 25px;
      padding: 0.6rem 1.5rem;
      font-weight: 500;
      transition: all 0.3s ease;
    }

    .service-box .btn-primary:hover {
      transform: translateY(-2px);
      box-shadow: 0 5px 20px rgba(27,151,141,0.4);
    }

    /* Pourquoi nous choisir */
    #choisir {
      background: linear-gradient(135deg, #faf8f5 0%, #f5f0e8 50%, #efe8dd 100%);
      position: relative;
      overflow: hidden;
    }
    #choisir h2 {
      color: #1b978d !important;
      text-align: center !important;
    }
    .choisir-item {
      background: #f4f4f4;
      margin: .5rem 0;
      padding: 1rem 1.5rem;
      border-radius: 5px;
      cursor: pointer;
      transition: background .3s;
    }
    .choisir-item:hover {
      background: #eaeaea;
    }
    .choisir-item h3 {
      display: flex;
      justify-content: space-between;
      margin: 0;
      color: #d35400;
    }
    .choisir-item p {
      display: none;
      margin-top: .75rem;
      font-size: .95rem;
      color: #555;
    }
    .choisir-item.active p {
      display: block;
    }
    .choisir-item .toggle-arrow {
      transition: transform .3s;
    }
    .choisir-item.active .toggle-arrow {
      transform: rotate(180deg);
    }

    /* Témoignages */
    #temoignages {
      background: linear-gradient(135deg, #faf8f5 0%, #f5f0e8 50%, #efe8dd 100%);
      text-align: center;
      position: relative;
      overflow: hidden;
    }
    #temoignages h2 {
      color: #1b978d;
      text-align: center;
    }
    /* Contrôles du carrousel de témoignages : on garde le positionnement Bootstrap, on stylise juste l’icône */
    #testimonialCarousel .carousel-control-prev-icon,
    #testimonialCarousel .carousel-control-next-icon {
      background-color: rgba(0, 0, 0, 0.7);
      border-radius: 50%;
    }

    .carousel-caption p {
      font-size: 1rem;
      color: #333;
    }
    .carousel-caption h5 {
      margin-top: .75rem;
      font-weight: 600;
    }

    /* Réalisations */
    #realisations {
      background: linear-gradient(135deg, #faf8f5 0%, #f5f0e8 50%, #efe8dd 100%);
      text-align: center;
      position: relative;
      overflow: hidden;
    }
    #realisations h2 {
      color: #1b978d;
      text-align: center;
    }
    .card {
      border: none;
      border-radius: 10px;
      transition: transform .3s;
    }
    .card:hover {
      transform: translateY(-5px);
    }
    .card-img-top {
      border-top-left-radius: 10px;
      border-top-right-radius: 10px;
      object-fit: cover;
      max-height: 160px;
    }

    /* Contact - Style comme le header avec étoiles */
    #contact {
      background: linear-gradient(135deg, #1a1a2e 0%, #16213e 30%, #0f3460 60%, #1b978d 100%);
      color: #fff;
      position: relative;
      overflow: hidden;
    }

    #contact::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: linear-gradient(
        180deg,
        rgba(15, 23, 42, 0.6) 0%,
        rgba(27, 151, 141, 0.3) 50%,
        rgba(27, 151, 141, 0.5) 100%
      );
      z-index: 1;
      pointer-events: none;
    }

    #contact > .container,
    #contact > .contact-form {
      position: relative;
      z-index: 3;
    }

    /* Container étoiles pour Contact */
    .contact-stars {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      z-index: 2;
      overflow: hidden;
      pointer-events: none;
    }

    #contact h2 {
      color: #fff;
      text-align: center;
      text-shadow: 0 2px 10px rgba(0,0,0,0.3);
    }
    .contact-form {
      max-width: 700px;
      margin: 2rem auto;
      padding: 2.5rem;
      background: rgba(255,255,255,0.95);
      border-radius: 20px;
      box-shadow: 0 15px 35px rgba(0,0,0,0.1);
      backdrop-filter: blur(10px);
      border: 1px solid rgba(255,255,255,0.2);
    }
    
    .contact-form h2 {
      color: #1b978d !important;
      text-align: center !important;
      margin-bottom: 2rem;
    }
    
    .contact-form .form-label {
      font-weight: 600;
      color: #1b978d;
      margin-bottom: 0.5rem;
      font-size: 0.95rem;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }
    
    .contact-form .form-control {
      border: 2px solid transparent;
      border-radius: 12px;
      padding: 1rem 1.25rem;
      font-size: 1rem;
      background: rgba(255,255,255,0.8);
      transition: all 0.3s ease;
      box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    }
    
    .contact-form .form-control:focus {
      border-color: #1b978d;
      background: white;
      box-shadow: 0 8px 25px rgba(27,151,141,0.15);
      transform: translateY(-2px);
    }
    
    .contact-form .form-control::placeholder {
      color: #999;
      font-style: italic;
    }
    
    .contact-form textarea.form-control {
      resize: vertical;
      min-height: 120px;
    }
    
    .contact-form button {
      background: linear-gradient(45deg, #1b978d, #d35400);
      border: none;
      border-radius: 30px;
      padding: 1rem 2.5rem;
      font-weight: 600;
      font-size: 1rem;
      color: white;
      text-transform: uppercase;
      letter-spacing: 1px;
      transition: all 0.3s ease;
      box-shadow: 0 8px 25px rgba(27,151,141,0.3);
      position: relative;
      overflow: hidden;
    }
    
    .contact-form button::before {
      content: '';
      position: absolute;
      top: 0;
      left: -100%;
      width: 100%;
      height: 100%;
      background: linear-gradient(45deg, #d35400, #1b978d);
      transition: left 0.3s ease;
      z-index: -1;
    }
    
    .contact-form button:hover {
      transform: translateY(-3px);
      box-shadow: 0 12px 35px rgba(27,151,141,0.4);
      color: white;
    }
    
    .contact-form button:hover::before {
      left: 0;
    }
    
    .contact-form button:active {
      transform: translateY(-1px);
    }
    
    .contact-form .mb-3 {
      margin-bottom: 1.5rem;
    }
    
    /* Animation for form fields */
    .contact-form .mb-3 {
      opacity: 0;
      animation: fadeInUp 0.6s ease forwards;
    }
    
    .contact-form .mb-3:nth-child(1) { animation-delay: 0.1s; }
    .contact-form .mb-3:nth-child(2) { animation-delay: 0.2s; }
    .contact-form .mb-3:nth-child(3) { animation-delay: 0.3s; }
    
    @keyframes fadeInUp {
      from {
        opacity: 0;
        transform: translateY(20px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }
    
    /* Mobile responsive for contact form */
    @media (max-width: 768px) {
      .contact-form {
        margin: 1.5rem 1rem;
        padding: 2rem 1.5rem;
      }
      
      .contact-form .form-control {
        padding: 0.875rem 1rem;
        font-size: 0.95rem;
      }
      
      .contact-form button {
        padding: 0.875rem 2rem;
        font-size: 0.9rem;
        width: 100%;
      }
    }
    
    @media (max-width: 576px) {
      .contact-form {
        margin: 1rem 0.5rem;
        padding: 1.5rem 1rem;
      }
      
      .contact-form .form-label {
        font-size: 0.9rem;
      }
      
      .contact-form .form-control {
        padding: 0.75rem 0.875rem;
        font-size: 0.9rem;
      }
      
      .contact-form textarea.form-control {
        min-height: 100px;
      }
    }

    /* Footer - Style comme le header avec étoiles */
    .footer {
      background: linear-gradient(135deg, #1a1a2e 0%, #16213e 30%, #0f3460 70%, #1b978d 100%);
      color: #f8f9fa;
      font-size: 0.95rem;
      font-weight: 700;
      font-size: 0.9rem;
      color: #fff;
    }

    .footer p {
      margin-bottom: 0.45rem;
    }

    .footer-link {
      color: #f8f9fa;
      text-decoration: none;
      font-weight: 500;
      transition: color 0.2s ease, text-decoration-color 0.2s ease;
    }

    .footer-link:hover {
      color: #ffd27f;
      text-decoration: underline;
      text-decoration-color: #ffd27f;
    }

    .footer-separator {
      border-color: rgba(255, 255, 255, 0.15);
    }

    @media (max-width: 767.98px) {
      .footer {
        text-align: center;
      }
      .footer .text-md-start,
      .footer .text-md-end {
        text-align: center !important;
      }
    }

    /* Scroll to top */
    #scrollToTop {
      position: fixed;
      bottom: 20px;
      right: 20px;
      background: #d35400;
      color: #fff;
      border: none;
      border-radius: 50%;
      padding: 10px;
      font-size: 1.5rem;
      display: none;
      transition: .3s;
    }
    /* Bulles de choix verticales et au-dessus du bouton */
    .choice-bubbles {
      position: absolute;
      bottom: auto;
      top: 45%;
      left: 50%;
      transform: translate(-50%, -100%);
      display: flex;
      flex-direction: column;
      gap: 0.5rem;
      z-index: 10;
    }
    .choice-bubbles .bubble {
      background: #0d6efd;
      color: #fff;
      padding: 0.5rem 1rem;
      border-radius: 20px;
      font-size: 0.9rem;
      cursor: pointer;
      transition: background 0.2s;
      text-align: center;
      white-space: nowrap;
    }
    .choice-bubbles .bubble:hover {
      background: #0b5ed7;
    }
    #scrollToTop:hover {
      background: #1b978d;
      transform: scale(1.1);
    }
      .timeline {
      position: relative;
      margin: 0 auto;
      padding: 1rem 0;
      max-width: 800px;
    }
    .timeline::before {
      content: '';
      position: absolute;
      left: 40px;
      top: 0;
      bottom: 0;
      width: 4px;
      background: linear-gradient(180deg,
        #0d6efd,   /* bleu */
        #198754,   /* vert */
        #ffc107,   /* jaune */
        #fd7e14,   /* orange */
        #6f42c1,   /* violet */
        #20c997,   /* turquoise */
        #dc3545    /* rouge */
      );
      border-radius: 2px;
    }
    .timeline-item {
      position: relative;
      margin-bottom: 4rem;
      padding-left: 90px;
    }
    .timeline-icon {
      position: absolute;
      left: 15px;
      top: 0;
      width: 55px;
      height: 55px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 22px;
      color: #fff;
      transition: transform 0.3s ease;
    }
    .timeline-content {
      background-color: #fff;
      padding: 0.5rem 1rem;
      border-radius: 0.5rem;
      transition: transform 0.3s ease;
    }
    .hover-effect:hover {
      transform: translateY(-5px);
    }
    .timeline-icon.shadow {
      box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    }

    /* Gradients pour icônes existantes */
    .gradient-primary {
      background: linear-gradient(135deg, #0d6efd, #66b2ff);
    }
    .gradient-success {
      background: linear-gradient(135deg, #198754, #7cd992);
    }
    .gradient-warning {
      background: linear-gradient(135deg, #ffc107, #ffd966);
      color: #333;
    }

    /* Nouveaux gradients */
    .gradient-orange {
      background: linear-gradient(135deg, #fd7e14, #ffb366);
    }
    .gradient-purple {
      background: linear-gradient(135deg, #6f42c1, #b085e0);
    }
    .gradient-teal {
      background: linear-gradient(135deg, #20c997, #64e2d2);
    }
    .gradient-danger {
      background: linear-gradient(135deg, #dc3545, #e66773);
    }

    @media (max-width: 576px) {
      .timeline::before { left: 30px; }
      .timeline-item { padding-left: 80px; }
      .timeline-icon { left: 5px; width: 45px; height: 45px; font-size: 18px; }
    }
        /* === SECTION FAQ AMÉLIORÉE === */
    #faq {
      background: linear-gradient(135deg, #faf8f5 0%, #f5f0e8 50%, #efe8dd 100%);
      position: relative;
      overflow: hidden;
    }

    #faq::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: radial-gradient(ellipse at 20% 80%, rgba(27,151,141,0.05) 0%, transparent 50%),
                  radial-gradient(ellipse at 80% 20%, rgba(211,84,0,0.05) 0%, transparent 50%);
      z-index: 0;
      pointer-events: none;
    }

    #faq > .container {
      position: relative;
      z-index: 1;
    }

    #faq h2 {
      color: #1b978d !important;
      text-align: center !important;
      font-size: 2.2rem;
      margin-bottom: 2rem;
    }

    #faq h2::after {
      content: '';
      display: block;
      width: 80px;
      height: 4px;
      background: linear-gradient(90deg, #1b978d, #d35400);
      margin: 1rem auto 0;
      border-radius: 2px;
    }

    #faq .accordion {
      max-width: 900px;
      margin: 0 auto;
    }

    #faq .accordion-item {
      background: rgba(255,255,255,0.95);
      border: none;
      border-radius: 16px !important;
      margin-bottom: 1rem;
      box-shadow: 0 4px 20px rgba(0,0,0,0.06);
      overflow: hidden;
      transition: all 0.3s ease;
    }

    #faq .accordion-item:hover {
      transform: translateY(-3px);
      box-shadow: 0 8px 30px rgba(27,151,141,0.12);
    }

    #faq .accordion-button {
      font-weight: 600;
      color: #1e293b;
      background: transparent;
      padding: 1.25rem 1.5rem;
      font-size: 1.05rem;
      border-radius: 16px !important;
      transition: all 0.3s ease;
    }

    #faq .accordion-button::before {
      content: '❓';
      margin-right: 12px;
      font-size: 1.1rem;
    }

    #faq .accordion-button:not(.collapsed) {
      background: linear-gradient(135deg, rgba(27,151,141,0.1), rgba(211,84,0,0.05));
      color: #1b978d;
      box-shadow: none;
    }

    #faq .accordion-button:not(.collapsed)::before {
      content: '✅';
    }

    #faq .accordion-button::after {
      background-size: 16px;
      transition: transform 0.3s ease;
    }

    #faq .accordion-button:focus {
      box-shadow: none;
      border-color: transparent;
    }

    #faq .accordion-body {
      background: rgba(255,255,255,0.8);
      color: #475569;
      padding: 1.25rem 1.5rem 1.5rem;
      font-size: 1rem;
      line-height: 1.7;
      border-left: 4px solid #1b978d;
      margin: 0 1rem 1rem;
      border-radius: 0 0 12px 12px;
    }

    #faq .accordion-body strong {
      color: #1b978d;
    }

    #cta h2 {
      color: #1b978d;
      text-align: center;
    }

    /* Dark mode FAQ */
    [data-theme="dark"] #faq {
      background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important;
    }

    [data-theme="dark"] #faq::before {
      background: radial-gradient(ellipse at 20% 80%, rgba(27,151,141,0.1) 0%, transparent 50%),
                  radial-gradient(ellipse at 80% 20%, rgba(211,84,0,0.1) 0%, transparent 50%);
    }

    [data-theme="dark"] #faq .accordion-item {
      background: rgba(30,41,59,0.95) !important;
      box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    }

    [data-theme="dark"] #faq .accordion-button {
      color: #f1f5f9 !important;
    }

    [data-theme="dark"] #faq .accordion-button:not(.collapsed) {
      background: linear-gradient(135deg, rgba(27,151,141,0.2), rgba(211,84,0,0.1)) !important;
      color: #1b978d !important;
    }

    [data-theme="dark"] #faq .accordion-body {
      background: rgba(51,65,85,0.5) !important;
      color: #cbd5e1 !important;
    }

    /* Mobile adjustments */
    @media (max-width: 576px) {
      #faq h2 {
        font-size: 1.75rem;
      }
      #faq .accordion-button {
        font-size: 0.95rem;
        padding: 1rem 1.25rem;
      }
      #faq .accordion-button::before {
        display: none;
      }
      #faq .accordion-body {
        padding: 1rem;
        margin: 0 0.5rem 0.5rem;
      }
    }
     section h2 {
    font-size: 2rem;
    position: relative;
    display: block;
    text-align: center !important;
    color: #1b978d !important;
  }
  .border-start {
    border-color: #0d6efd !important; /* couleur primaire Bootstrap */
  }
  /* Bulles “Bientôt disponible” */
.soon-bubble {
  position: absolute;
  top: -1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: #ffc107;
  color: #333;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  font-size: 0.8rem;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}
   #about p { line-height: 1.7; }
    #about .fw-semibold { font-weight: 600; }
    .info-card i { display: block; }
    .info-card h6 { font-size: 1rem; }
    .info-card small { font-size: 0.85rem; }

    /* Signature style */
    .signature {
      font-size: 1.25rem;
      color: #0d6efd;
      margin-top: 1rem;
    }

    
    /* AOS animations */
    [data-aos] {
      opacity: 0;
      transition-property: transform, opacity;
      transition-duration: 0.8s;
      will-change: transform, opacity;
      visibility: hidden;
    }
    [data-aos].aos-animate {
      opacity: 1;
      visibility: visible;
    }
/* Utilitaires */
  .max-w-600{max-width:600px;}
  .hover-raise{transition:transform .18s ease, box-shadow .18s ease;}
  .hover-raise:hover{transform:translateY(-4px);box-shadow:0 .5rem 1rem rgba(0,0,0,.10)!important;}
  .line-clamp-3{
  display:-webkit-box;
  -webkit-line-clamp:3;
  -webkit-box-orient:vertical;
  overflow:hidden;
  line-clamp:3;
}

  /* Timeline wrapper */
  .ags-timeline-wrapper{--gap:2rem;position:relative;width:100%;overflow-x:auto;overflow-y:visible;padding-block:1rem;padding-inline:calc(var(--gap)/2);}
  .ags-timeline-wrapper::-webkit-scrollbar{height:8px;}
  .ags-timeline-wrapper::-webkit-scrollbar-track{background:rgba(0,0,0,.05);border-radius:4px;}
  .ags-timeline-wrapper::-webkit-scrollbar-thumb{background:rgba(0,0,0,.25);border-radius:4px;}

  /* Timeline list */
  .ags-timeline{list-style:none;display:flex;align-items:stretch;gap:var(--gap);margin:0;padding:0;scroll-snap-type:x mandatory;}
  .ags-timeline-item{scroll-snap-align:start;flex:0 0 320px;position:relative;padding-top:2rem;}

  /* Year label above the card */
  .ags-timeline-item::before{content:attr(data-year);position:absolute;top:0;left:0;font-size:.85rem;font-weight:600;color:var(--bs-primary,#0d6efd);}

  /* Connecting line */
  .ags-timeline-item::after{content:"";position:absolute;top:1.25rem;left:calc(-1 * var(--gap)/2);width:calc(100% + var(--gap));height:2px;background:rgba(0,0,0,.1);z-index:-1;}
  .ags-timeline-item:first-child::after{left:50%;width:50%;}
  .ags-timeline-item:last-child::after{width:50%;}

  /* Card */
  .ags-timeline-card{background:#fff;padding:1.5rem;}
  .ags-timeline-media-placeholder{font-size:.75rem;color:#999;width:100%;height:100%;border:1px dashed rgba(0,0,0,.15);border-radius:.5rem;}

  /* Ratio helper (Bootstrap 5 style fallback) */
  .ratio{position:relative;width:100%;}
  .ratio::before{display:block;padding-top:56.25%;content:"";}/* 16:9 */
  .ratio>*{position:absolute;top:0;left:0;width:100%;height:100%;object-fit:cover;}

  /* Timeline optimization for PC */
  @media (min-width: 992px) {
    .ags-timeline-card h5 {
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      font-size: 0.95rem;
      line-height: 1.2;
    }
    
    .ags-timeline-card p {
      display: -webkit-box;
      display: -moz-box;
      display: box;
      -webkit-line-clamp: 2;
      -moz-line-clamp: 2;
      line-clamp: 2;
      -webkit-box-orient: vertical;
      -moz-box-orient: vertical;
      box-orient: vertical;
      overflow: hidden;
      text-overflow: ellipsis;
      line-height: 1.4;
      max-height: 2.8em;
      position: relative;
    }
    
    .ags-timeline-card p.expanded {
      -webkit-line-clamp: unset;
      max-height: none;
    }
    
    .timeline-read-more {
      color: #1b978d;
      font-weight: 600;
      cursor: pointer;
      text-decoration: none;
      font-size: 0.85rem;
      margin-top: 0.5rem;
      display: inline-block;
      transition: color 0.3s ease;
    }
    
    .timeline-read-more:hover {
      color: #d35400;
      text-decoration: underline;
    }
  }
  @media (max-width:575.98px){
    .ags-timeline-wrapper{--gap:1.25rem;padding-inline:1rem;}
    .ags-timeline-item{flex:0 0 85%;max-width:85%;}
    .ags-timeline-item::before{font-size:.75rem;}
    .ags-timeline-card{padding:1.25rem;}
  }
/* ====== TIMELINE DATES VISIBLES AU-DESSUS ====== */

/* Donner de la place au-dessus pour les badges */
#histoire .ags-timeline-wrapper {
  padding-top: 3.5rem !important; /* espace pour les dates */
  position: relative;
}

/* Neutralise la ligne top globale si tu la gardes ailleurs */
#histoire .ags-timeline::before {
  display: none !important;
}

/* Connecteurs horizontaux (facultatif, garde ou retire) */
#histoire .ags-timeline-item::after {
  content: "";
  position: absolute;
  top: -1.25rem; /* ligne sous les badges */
  left: calc(-1 * var(--gap,2rem) / 2);
  width: calc(100% + var(--gap,2rem));
  height: 2px;
  background: rgba(0,0,0,.08);
  z-index: 1;
}
#histoire .ags-timeline-item:first-child::after {
  left: 50%;
  width: calc(50% + var(--gap,2rem) / 2);
}
#histoire .ags-timeline-item:last-child::after {
  width: 50%;
}

/* BADGE DATE */
#histoire .ags-timeline-item::before {
  content: attr(data-year) !important;
  position: absolute;
  top: -3rem;               /* remonte le badge au-dessus de la ligne */
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  padding: 0.25rem 1.25rem;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  background: linear-gradient(45deg, #1b978d, #d35400);
  color: #fff;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}

/* Ajustements desktop larges : badge un peu plus discret si tu veux */
@media (min-width: 992px) {
  #histoire .ags-timeline-item::before {
    font-size: 0.95rem;
    padding: 0.2rem 1rem;
  }
}

/* Mobile : rapprocher les badges des cartes pour éviter qu'ils sortent du cadre */
@media (max-width: 575.98px) {
  #histoire .ags-timeline-wrapper {
    padding-top: 2.75rem !important;
  }
  #histoire .ags-timeline-item::before {
    top: -2.25rem;
    font-size: 0.9rem;
    padding: 0.15rem 0.9rem;
  }
  #histoire .ags-timeline-item::after {
    top: -0.75rem;
  }
}
 /* Fond modal */
  .modal {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 2000;
    overflow-y: auto;
    padding: 2rem 1rem;
  }
  .modal[aria-hidden="false"] {
    display: block;
  }

  /* Contenu */
  .modal-content {
    background: white;
    max-width: 600px;
    margin: 2rem auto;
    border-radius: 8px;
    padding: 1.5rem 2rem;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  }
  .modal-content h2 {
    margin-top: 0;
  }

  /* Bouton fermer */
  .modal-close {
    position: absolute;
    top: 0.5rem; right: 0.75rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: #555;
  }
  .modal-close:hover {
    color: #000;
  }