/* ----------------------------------
 * Base & Utilities
 * -----------------------------------*/
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html {
    scroll-behavior: smooth;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #ffffff;
    background-color: rgb(16, 16, 16);
    overflow-x: hidden;
    cursor: none;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ----------------------------------
 * Typography
 * -----------------------------------*/
.section-title {
    font-size: 2.5rem;
    color: #ffffff;
    margin-bottom: 24px;
    font-weight: 700;
    text-align: center;
    letter-spacing: -0.01em;
}

.section-title-small {
    font-size: 2rem;
    color: #ffffff;
    margin-bottom: 8px;
    font-weight: 700;
    text-align: center;
    letter-spacing: -0.01em;
}

.section-subtitle {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 60px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.pixel-font {
    font-family: 'somybmp01_7', sans-serif;
    font-size: 0.9rem;
    color: white;
}

.hero-title {
    font-family: 'somybmp01_7', sans-serif;
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 900;
    margin-bottom: 15px;
    letter-spacing: -0.02em;
    display: inline-block;
    position: relative;
    color: #d81d1d; /* couleur de base du texte */
    overflow: hidden;

    /* gradient de base pour le texte */
    background: #d81d1d;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-title::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    /* Faisceau blanc fin qui traverse le texte */
    background: linear-gradient(90deg, transparent, #d86161, transparent);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;

    animation: shine 2s linear infinite;
}

@keyframes shine {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

.hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 40px;
    line-height: 1.6;
    max-width: 700px;
    margin-right: auto;
    margin-left: auto;
}

.content-title {
    font-size: 1.3rem;
    color: #ffffff;
    font-weight: 700;
    text-align: center;
}

.content-subtitle {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 8px;
    padding-left: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.stats-title {
    font-size: 2.8rem;
    color: #f63b3b;
    font-weight: 700;
    margin-bottom: 8px;
}

.stats-subtitle {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 8px;
    padding-left: 0;
    text-align: center;
    gap: 10px;
}

.about-title {
    font-size: 2.5rem;
    color: #f63b3b;
    font-weight: 700;
    margin-bottom: 8px;
    text-align: center;
}

.about-subtitle {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 8px;
    padding-left: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.module-subtitle {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 20px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.module-section p.value {
    font-size: 1.125rem;
    color: #f63b3b;
    margin-bottom: 20px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

/* ----------------------------------
 * Buttons & Interactive Elements
 * -----------------------------------*/
.btn-header,
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    border-radius: 12px;
    cursor: none;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-header::after,
.btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    transition: left 0.6s ease;
    z-index: 2;
}

.btn-header {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 12px 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Centrer le texte contenu dans le span à l'intérieur du bouton */
.btn-header {
    justify-content: center; /* centre horizontalement le contenu flex */
}

.btn-header > span {
    display: block;
    width: 100%;
    text-align: center;
}

.btn-primary {
    background-color: rgba(246, 59, 59, 0.2);
    color: white;
    padding: 16px 32px;
    border: 1px solid #f63b3b;
    font-size: 1.25rem;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(246, 59, 59, 0.3);
}

.arrow-svg-wrapper {
    display: inline-flex;
    align-items: center;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-header:hover .arrow-svg-wrapper,
.btn-primary:hover .arrow-svg-wrapper {
    transform: translateX(4px);
}

.btn-header:hover::after,
.btn-primary:hover::after {
    left: 100%;
}

.btn-header:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(246, 59, 59, 0.4);
    background-color: rgba(246, 59, 59, 0.4);
}

.hero-link {
    color: #f63b3b;
    transition: color 0.3s ease;
    font-weight: 500;
}

.hero-link:hover {
    color: #d81d1d;
}

.digital-circle {
    color: #f63b3b;
    text-decoration: none;
    cursor: none;
}

/* ----------------------------------
 * Header & Footer
 * -----------------------------------*/
.header {
    background: rgba(16, 16, 16, 0.90);
    backdrop-filter: blur(20px);
    padding: 20px 0;
    position: sticky;
    top: 0;
    /* Ensure header stays above regular scrollable content but below the lightbox (z-index:2000) */
    z-index: 1100;
    /* Promote to its own layer to prevent other transformed elements from overlapping */
    transform: translate3d(0,0,0);
    will-change: transform, opacity;
    isolation: isolate;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.container a {
    text-decoration: none;
    color: inherit; 
    cursor: none;
}

.logo {
    display: flex;
    align-items: center;
    gap: 14px;
}

.footer {
    background: rgb(16, 16, 16);
    padding: 60px 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.copyright {
    max-width: 1200px;
    margin: auto;
    padding: 1rem;
    color: #fff;
    font-size: 0.8rem;
    text-align: center;
}

.ressources {
    max-width: 1200px;
    margin: auto;
    padding: 0.2rem;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    text-align: center;
}

/* ----------------------------------
 * Sections & Layouts
 * -----------------------------------*/
.hero {
    padding-top: 50px;
    padding-bottom: 100px;
    background: linear-gradient(135deg, rgb(16, 16, 16) 0%, rgb(24, 24, 24) 100%);
}

.hero-content {
    align-items: center;
    text-align: center;
    margin: 0 auto;
}

.hero .container {
    align-items: center;
}

.hero-buttons {
    align-items: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.about-image {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 565px;
    margin-bottom: 60px;
    margin-left: auto;
    margin-right: auto;
}

/* Lightbox performance & interaction improvements */
.lightbox-image {
    /* Hint the browser that transform will change frequently */
    will-change: transform;
    /* Use 3D transform to promote to its own layer for smoother animations */
    -webkit-transform: translate3d(0,0,0);
    transform: translate3d(0,0,0);
    /* Disable user selection while interacting */
    user-select: none;
    -webkit-user-drag: none;
    /* Ensure pointer events behave consistently */
    touch-action: none; /* we'll manage touch gestures in JS */
    cursor: grab;
    transition: transform 120ms ease-out; /* subtle smoothing when not dragging */
}

.lightbox-image.dragging {
    cursor: grabbing;
    transition: none; /* immediate transform during drag for best responsiveness */
}

/* When lightbox is not active, keep default touch-action to allow scroll */
#lightbox:not(.active) .lightbox-image {
    touch-action: auto;
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
}

.stats-grid  {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 32px;
}

.stats {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.stats:hover {
    transform: scale(1.05);
    border-color: rgba(246, 59, 59, 0.3);
    box-shadow: 0 10px 60px rgba(246, 59, 59, 0.1);
}

.stats-texte {
    padding: 32px;
}

.about-grid  {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 32px;
}

.about {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.about:hover {
    transform: scale(1.05);
    border-color: rgba(246, 59, 59, 0.3);
    box-shadow: 0 10px 60px rgba(246, 59, 59, 0.1);
}

.about-texte {
    padding: 32px;
}

.content-section {
    padding: 100px 0;
}

.content-grid  {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.content {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.content:hover {
    transform: scale(1.05);
    border-color: rgba(246, 59, 59, 0.3);
    box-shadow: 0 10px 60px rgba(246, 59, 59, 0.1);
}

.content-texte {
    padding: 32px;
}

.content-combined {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.content-emoji {
    font-size: 2rem;
    text-align: center;
    background-color: rgba(246, 59, 59, 0.2);
    border: 1px solid #f63b3b;
    border-radius: 16px;
    padding: 4px 6px;
}

.ai-section,
.about-section,
.testimonials,
.module-section {
    padding: 100px 0;
}

.ai-section {
    background: rgb(20, 20, 20);
}

.video-section {
    background: rgb(16, 16, 16);
    text-align: center;
}

.testimonials {
    background: rgb(16, 16, 16);
    text-align: center;
}

.testimonial-header {
    margin-bottom: 60px;
}

.module-section {
    background: rgb(20, 20, 20);
}

.module-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 60px;
}

.module-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.module-card:hover {
    transform: scale(1.05);
    border-color: rgba(246, 59, 59, 0.3);
    box-shadow: 0 10px 60px rgba(246, 59, 59, 0.1);
}

.module-image {
    width: 100%;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.module-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.module-image img:hover {
    transform: scale(1.1);
}

.module-text {
    padding: 25px;
    color: #ffffff;
    font-size: 1.125rem;
    font-weight: 600;
    text-align: center;
}

.module-card a {
    text-decoration: none;
    color: inherit;
    cursor: none;
}

/* ----------------------------------
 * FAQ & Map
 * -----------------------------------*/
.faq-section {
  background: rgb(16, 16, 16);
  padding: 100px 0;
}

.faq-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  margin-top: 60px;
  width: 100%;
}

.faq-item {
  background: rgba(255, 255, 255, 0.03);
  padding: 32px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: border-color 0.3s, transform 0.3s;
  overflow: hidden;
  cursor: none;
  max-width: 800px;
  width: 100%;
}

.faq-item:hover {
  transform: translateY(-4px);
  border-color: rgba(246, 59, 59, 0.3);
}

.faq-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-item h3 {
  color: #ffffff;
  font-size: 1.125rem;
  font-weight: 600;
}

.icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  transition: transform 0.3s ease;
  color: #fff;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.35s ease, opacity 0.25s ease;
}

.faq-item.active .faq-answer {
  max-height: 500px;
  opacity: 1;
}

.faq-item p {
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
  margin-top: 16px;
}

.faq-item.active .icon {
  transform: rotate(45deg);
}

.map-section {
    padding: 100px 0;
    background: rgb(20, 20, 20);
    text-align: center;
}

.map-image-container {
    max-width: 900px;
    margin: 0 auto;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 0 150px rgba(246, 59, 59, 0.2);
    border: 2px solid rgba(246, 59, 59, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.map-image-container:hover {
    border-color: rgba(246, 59, 59, 0.6);
}

.map-image {
    width: 100%;
    height: auto;
    transition: transform 0.4s ease;
}

.map-image-container:hover .map-image {
    transform: scale(1.1);
}

/* ----------------------------------
 * Grids & Cards
 * -----------------------------------*/
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
    margin: 60px 0;
}

.feature-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 32px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-item:hover {
    transform: scale(1.05);
    border-color: rgba(246, 59, 59, 0.3);
}

.feature-item h3 {
    color: #f63b3b;
    font-size: 1.25rem;
    margin-bottom: 12px;
    font-weight: 600;
}

.feature-item p {
    color: rgba(255, 255, 255, 0.7);
}

.ai-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 32px;
    margin-top: 60px;
}

.ai-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.ai-card:hover {
    transform: scale(1.05);
    border-color: rgba(246, 59, 59, 0.3);
    box-shadow: 0 10px 60px rgba(246, 59, 59, 0.1);
}

.ai-image {
    width: 100%;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.ai-image img {
    width: 100%;
    height: auto;
}

.ai-text {
    padding: 32px;
}

.ai-card a {
    text-decoration: none;
    color: inherit;
    cursor: none;
}

.ai-features li {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 8px;
    padding-left: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ai-features li svg {
    flex-shrink: 0;
    color: #f63b3b;
}

.testimonial-carousel {
    position: relative;
    margin-bottom: 60px;
    width: 100%;
}

.testimonial-slider-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    scrollbar-width: none;
    scroll-snap-type: x mandatory;
    border-radius: 20px;
}

.testimonial-slider-wrapper::-webkit-scrollbar {
    display: none;
}

.testimonial-slider {
    display: flex;
    gap: 14px;
}

.testimonial-card {
    flex: 0 0 auto;
    width: 300px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: none;
    z-index: 1;
    overflow: hidden;
    position: relative;
    scroll-snap-align: start;
}

.testimonial-card:hover {
    border-color: rgba(246, 59, 59, 0.3);
}

.testimonial-card:hover .testimonial-screenshot {
    transform: scale(1.1);
    transition: transform 0.3s ease-in-out;
}

.testimonial-screenshot {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 20px;
    object-fit: cover;
    cursor: none;
    object-position: left center;
    transition: transform 0.3s ease-in-out;
}

.carousel-nav {
    display: none;
}

.carousel-nav button {
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: none;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.carousel-nav button:hover {
    background-color: rgba(246, 59, 59, 0.2);
    border-color: #f63b3b;
}

.carousel-nav svg {
    width: 20px;
    height: 20px;
}

/* ----------------------------------
 * Video Components
 * -----------------------------------*/
.video-container {
    margin: 0 auto 60px;
    position: relative;
    padding-bottom: 48.5%;
    height: 0;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 0 300px rgba(246, 59, 59, 0.2);
    border: 2px solid rgba(246, 59, 59, 0.3);
    cursor: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.video-container:hover {
    border-color: rgba(246, 59, 59, 0.6);
}

.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#soundButton {
    position: absolute;
    top: 20px;
    left: 20px;
    background-color: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 12px 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 90;
    cursor: none;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    text-decoration: none;
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 600;
}

#soundButton:hover {
    transform: translateY(-2px);
    background-color: rgba(246, 59, 59, 0.2);
    border-color: #f63b3b;
}

/* ----------------------------------
 * Social Links
 * -----------------------------------*/
.social-links-container {
    display: flex;
    justify-content: center;
    gap: 16px;
    padding-top: 20px;
}

.social-links-container a {
    text-decoration: none;
    cursor: none;
}

.social-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Ensure inline SVGs used as icons render in white. 
   Use fill and stroke properties; prefer currentColor so icons can inherit color if needed. */
.social-icon {
    display: inline-block;
    vertical-align: middle;
    /* Default color for icons */
    color: #fff; /* used by stroke: currentColor */
}

/* Force SVG fills to white unless overridden; allow strokes to follow currentColor */
.social-icon path,
.social-icon circle,
.social-icon rect,
.social-icon polygon,
.social-icon polyline {
    fill: #fff;
    stroke: none; /* clear stroke unless SVG uses stroke explicitly */
}

/* If an inline SVG uses stroke (e.g., line icons), make stroke white by inheriting currentColor */
.social-icon [stroke] {
    stroke: currentColor;
    stroke-width: 1.2;
}

.social-icon-wrapper:hover {
    background: linear-gradient(135deg, #f63b3b, #d81d1d);
    transform: scale(1.1);
    border-color: #f63b3b;
}

/* ----------------------------------
 * Lightbox
 * -----------------------------------*/
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: none; /* Original line */
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.lightbox-image {
    max-width: 100%;
    max-height: 100%;
    display: block;
    border-radius: 12px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2001;
    cursor: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.lightbox-close svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    color: #fff;
}

.lightbox-close:hover {
    background-color: rgba(246, 59, 59, 0.2);
    border-color: #f63b3b;
    transform: scale(1.1);
}

/* Zoom/pan states for the lightbox image */
.lightbox.active {
    display: flex;
}

.lightbox-content {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    border-radius: 12px;
}

.lightbox-image {
    max-width: 100%;
    max-height: 100%;
    transform-origin: center center;
    transition: transform 0.2s ease;
    will-change: transform;
    user-select: none;
    -webkit-user-drag: none;
    touch-action: none; /* we'll handle touch gestures in JS */
    cursor: none;
    /* prevent image from being highlighted while interacting */
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.lightbox-image.dragging {
    cursor: none;
}

/* ----------------------------------
 * Animations & Effects
 * -----------------------------------*/
.custom-cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.2s ease, background-color 0.2s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.ripple {
    position: absolute;
    border-radius: 50%;
    transform: scale(0);
    animation: ripple-animation 0.6s linear;
    background-color: rgba(255, 255, 255, 0.7);
    z-index: 1;
}

@keyframes ripple-animation {
    to {
        transform: scale(2.5);
        opacity: 0;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes sectionFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-title,
.section-title {
    animation: fadeInUp 0.8s ease-out;
}

.section-visible {
    animation: sectionFadeIn 0.8s ease-out;
}

/* ----------------------------------
 * Scroll-down Button
 * -----------------------------------*/
.scroll-arrow {
  position: fixed;
  bottom: 30px;
  left: 48.5%;
  transform: translateX(-50%);
  transition: opacity 0.5s ease;
  z-index: 90;
  display: block;
}

.scroll-arrow.hidden {
  opacity: 0;
  pointer-events: none;
  display: none;
}

.scroll-style {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 50px;
  height: 50px;
  background-color: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(20px);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  cursor: none;
  text-decoration: none;
  transition: all 0.3s ease;
}

.scroll-style:hover {
  background-color: rgba(246, 59, 59, 0.2);
  border-color: #f63b3b;
  transform: translateY(-5px);
}

.scroll-style svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
}

.bounce {
  display: inline-block;
  animation: bounce 2s infinite;
  will-change: transform;
}

/* Header navigation styles */
.header-nav {
    display: flex;
    align-items: center;
}

.header-nav-list {
    display: flex;
    gap: 16px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.header-nav-link {
    padding: 10px 18px;
    font-size: 1rem;
    border-radius: 10px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.13);
    color: #fff;
    transition: background 0.2s, border 0.2s, color 0.2s;
    font-weight: 500;
    cursor: pointer;
}

.header-nav-link:hover {
    background: linear-gradient(135deg, #f63b3b50, #d81d1d50);
    border: 1px solid #f63b3b50;
    color: #fff;
    text-decoration: none;
    outline: none;
}

/* Burger menu styles */
.burger-menu {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 52px;
    height: 52px;
    background: none;
    border: none;
    cursor: none;
    z-index: 130;
    margin: 0;
    padding: 0;
    position: absolute;
    right: 5%;
    top: 50%;
    transform: translateY(-50%);
    overflow: visible;
    /* Use a stable transition on the burger container to avoid layout flashes */
    transition: transform 180ms ease;
}

.burger-menu .bar {
    position: absolute;
    left: 12px;
    right: 12px;
    height: 3px;
    background: #fff;
    border-radius: 2px;
    /* Only transition transform and opacity for smoother, flicker-free animations */
    transition: transform 260ms cubic-bezier(0.4,0,0.2,1), opacity 200ms linear;
    /* Promote to its own layer and avoid backface flicker */
    will-change: transform, opacity;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform-origin: center;
}

.burger-menu .bar:nth-child(1) {
    top: 16px;
}
.burger-menu .bar:nth-child(2) {
    top: 24px;
}
.burger-menu .bar:nth-child(3) {
    top: 32px;
}

.burger-menu.open .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg) scale3d(1,1,1);
}
.burger-menu.open .bar:nth-child(2) {
    opacity: 0;
}
.burger-menu.open .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg) scale3d(1,1,1);
}

.fixed-join-btn {
    position: fixed;
    right: 16px;
    bottom: -60px; /* commence sous l'écran */
    z-index: 90;
    opacity: 0;
    pointer-events: none;
    transform: translateY(120px); /* bien en dehors de l'écran */
    transition: 
        opacity 0.4s cubic-bezier(0.4,0,0.2,1), 
        transform 0.5s cubic-bezier(0.4,0,0.2,1), 
        bottom 0.5s cubic-bezier(0.4,0,0.2,1);
}

.fixed-join-btn.visible {
    opacity: 1;
    pointer-events: auto;
    bottom: 16px; /* remonte à sa place */
    transform: translateY(0);
    text-decoration: none;
}

.btn-join {
    position: relative;
    overflow: hidden;
    background-color: rgba(246, 59, 59, 0.2);
    backdrop-filter: blur(20px);
    color: #fff;
    border: 1px solid #f63b3b;
    border-radius: 16px;
    padding: 16px 32px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    font-size: 1.25rem;
    font-weight: 600;
    cursor: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-join:hover {
    background-color: rgba(246, 59, 59, 0.4);
    box-shadow: 0 4px 15px rgba(246, 59, 59, 0.4);
    transform: translateY(-2px);
}

.btn-join .ripple {
    position: absolute;
    border-radius: 50%;
    transform: scale(0);
    animation: ripple-animation 0.6s linear;
    background-color: rgba(255,255,255,0.4);
    pointer-events: none;
    z-index: 1;
}

.arrow-svg-wrapper {
    display: flex;
    align-items: center;
    margin-left: 6px; /* Optionnel : espace entre texte et flèche */
}

@keyframes bounce {
  0%,20%,50%,80%,100% { transform: translateY(0); }
  40% { transform: translateY(-15px); }
  60% { transform: translateY(-7px); }
}

@media (max-width: 480px) {
  .scroll-arrow {
    left: 44%;
    transform: translateX(-50%);
  }
}

/* -------------
 * Media Queries
 * -------------*/

/* PC (écrans > 1024px) */
@media (min-width: 1025px) {
    /* Shimmer effect for primary & join buttons (desktop only) - only on hover */
    /* Disable the pseudo-element approach (can conflict with other rules).
       Use a background-image animation on hover instead — more reliable. */
    .btn-primary::before,
    .btn-join::before {
        display: none !important;
    }

    /* Prepare background for shimmer animation */
    .btn-primary,
    .btn-join {
        background-repeat: no-repeat;
        background-position: -150% 0;
        background-size: 250% 100%;
        /* ensure stacked formatting context for background animations */
        will-change: background-position;
    }

    /* Add shimmer overlay only on hover (or when parent anchor is hovered) */
    .btn-primary:hover,
    .btn-join:hover,
    a:hover .btn-primary,
    .fixed-join-btn:hover .btn-join {
        background-image: linear-gradient(270deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.36) 50%, rgba(255,255,255,0) 100%);
        animation: dc-shimmer-bg 0.9s linear;
    }

    @keyframes dc-shimmer-bg {
        0% { background-position: 250% 0; }
        100% { background-position: -150% 0; }
    }

    /* Keep button text and arrow above the shimmer */
    .btn-primary > span,
    .btn-join > span,
    .btn-primary .arrow-svg-wrapper,
    .btn-join .arrow-svg-wrapper {
        position: relative;
        z-index: 5; /* above shimmer */
    }

    @keyframes dc-shimmer {
        0% { transform: skewX(-20deg) translateX(-120%); }
        100% { transform: skewX(-20deg) translateX(220%); }
    }
    
    .testimonial-carousel {
        padding: 0 70px;
        position: relative;
    }

    .carousel-nav {
        display: flex;
        position: absolute;
        top: 48%;
        left: 0;
        right: 0;
        transform: translateY(-50%);
        justify-content: space-between;
        pointer-events: none;
        z-index: 20;
    }

    .carousel-nav button {
        background-color: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.2);
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
        pointer-events: auto;
    }
}

/* Tablette et Mobile (écrans <= 1024px) */
@media (max-width: 1024px) {
    .custom-cursor {
        display: none;
    }
    
    body {
        cursor: auto;
    }

    .hero .container {
        grid-template-columns: 1fr;
        gap: 20px;
        text-align: center;
    }

    .hero-title {
        font-size: clamp(2.5rem, 6vw, 4rem);
        font-weight: 900;
    }
    
    .cta-title-minimalist {
        font-size: 2rem;
    }

    .testimonial-carousel {
        padding: 0;
    }
    
    .testimonial-slider-wrapper {
        padding: 0 16px;
    }

    .carousel-nav {
        display: flex;
        justify-content: center;
        gap: 20px;
        margin-top: 20px;
        position: relative;
        z-index: 10;
    }

    .carousel-nav button {
        background-color: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.2);
        width: 44px;
        height: 44px;
        font-size: 1.2rem;
    }
}

/* Cache le burger-menu sur desktop */
@media (min-width: 769px) {
    .burger-menu {
        display: none !important;
    }
}

/* Responsive nav: mobile/tablette */
@media (max-width: 768px) {
    .header .container {
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
        position: relative;
    }
    .video-container {
        padding-bottom: 56.25%;
    }
    .logo-link {
        margin-right: auto;
        transition: opacity 0.3s;
        z-index: 121;
        margin-left: 2%;
    }
    .logo-text {
        margin-top: 1%;
    }
    .logo-icon {
        margin-top: 2%;
    }
    .header .container.menu-open .logo-link {
        opacity: 0;
        pointer-events: none;
    }
    .burger-menu {
        display: flex;
        position: absolute;
        right: 5%;
        top: 50%;
        transform: translateY(-50%);
        z-index: 130;
        width: 52px;
        height: 52px;
    }
    .header-nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(16,16,16,0.98);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transform: translateY(-40px) scale(0.98);
        opacity: 0;
        pointer-events: none;
        transition: 
            opacity 0.45s cubic-bezier(0.4,0,0.2,1),
            transform 0.45s cubic-bezier(0.4,0,0.2,1);
        z-index: 120;
    }
    .header-nav.open {
        transform: translateY(0) scale(1);
        opacity: 1;
        pointer-events: auto;
    }
    .header-nav-list {
        flex-direction: column;
        gap: 32px;
        align-items: center;
    }
    .header-nav-link {
        font-size: 1.2rem;
        padding: 16px 32px;
        border-radius: 14px;
        background: rgba(255,255,255,0.09);
        border: 1px solid rgba(255,255,255,0.13);
        width: 200px;
        text-align: center;
        display: block;
    }
    .header-nav {
        opacity: 0;
        pointer-events: none;
    }
    .header-nav.open {
        opacity: 1;
        pointer-events: auto;
    }
    .btn-join {
        padding: 12px 24px;
        font-size: 1.1rem;
        border-radius: 12px;
    }
    /* Centre le bouton fixe en bas pour mobile */
    .fixed-join-btn {
        right: 7.5%;
        left: 7.5%;
        bottom: 16px;
        width: auto;
        max-width: calc(100% - 32px);
        display: flex;
        justify-content: center;
        align-items: center;
        pointer-events: auto;
        padding: 0;
    }

    /* Ajuste le bouton interne pour occuper l'espace et rester centré */
    .fixed-join-btn .btn-join {
        width: 100%;
        max-width: 420px;
        box-sizing: border-box;
        margin: 0 auto;
    }
        .container {
        padding: 0 16px;
    }

    .hero-title {
        font-size: clamp(2rem, 6vw, 4rem);
        font-weight: 900;
    }

    .btn-header {
        /* par défaut on cache btn-header sur mobile (design précédent)
           mais on souhaite le montrer quand le menu mobile est ouvert */
        display: none;
    }

    /* Affiche les boutons .btn-header quand la navigation mobile est ouverte */
    .header-nav.open .btn-header {
        display: inline-flex;
    }

    .pixel-font {
        font-size: 0.8rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .section-title-small {
        font-size: 1.8rem;
    }
    
    .cta-title-minimalist {
        font-size: 1.8rem;
    }

    .about-title {
        font-size: 2.5rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 20px;
    }

    .content-title {
        font-size: 1.2rem;
    }

    .ai-grid,
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .header .container {
        justify-content: center;
    }
    
    .testimonial-carousel {
        width: 100%;
        margin-left: 0;
        overflow: hidden;
        margin-bottom: 30px;
    }
    
    .testimonial-slider-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
        scroll-behavior: smooth;
        scroll-snap-type: x mandatory;
        padding: 0 16px;
    }

    .testimonial-slider {
        justify-content: flex-start;
        display: flex;
        gap: 16px;
        padding-bottom: 20px;
        transition: none;
        transform: none !important;
    }
    
    .testimonial-card {
        flex-shrink: 0;
        width: calc(100vw - 32px);
        scroll-snap-align: start;
    }
    
    .content-item {
        flex-direction: column;
        text-align: center;
    }

    .hero {
        padding: 45px 0;
    }

    .accident-section,
    .inscription-section,
    .ai-section,
    .about-section,
    .testimonials,
    .module-section {
        padding: 80px 0;
    }

    .ressources {
        max-width: 350px;
    }

    .carousel-nav {
        position: absolute;
        top: 50%;
        left: 0;
        right: 0;
        transform: translateY(-50%);
        justify-content: space-between;
        pointer-events: none;
        z-index: 10;
        margin-top: 0;
    }

    .carousel-nav button {
        background-color: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.2);
        backdrop-filter: blur(20px);
        width: 44px;
        height: 44px;
        font-size: 1.2rem;
        border-radius: 50%;
        pointer-events: auto;
        margin-left : 10px;
        margin-right : 10px;
    }

    .map-image-container {
        position: relative;
        width: 100%;
        aspect-ratio: 16 / 9;
        max-width: 1920px;
        border-radius: 16px;
        overflow: hidden;
    }

    .map-image {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        transition: transform 0.4s ease;
    }

    .footer {
        padding-bottom: 75px;
    }
}

@media (max-width: 700px) {
  .faq-item {
    padding: 24px;
  }

  .faq-item h4 {
    font-size: 1rem;
  }
}