/* 📁 public/assets/css/landing.css */
/* Landing page inspirée de Padlet - Style moderne et responsive */

/* Empêcher le scroll sur la page */
html, body {
    height: 100%;
    overflow: hidden;
}

/* Variables CSS pour cohérence des couleurs */
:root {
    --landing-primary: #ff6b35;
    --landing-secondary: #4ecdc4;
    --landing-yellow: #ffd93d;
    --landing-blue: #6bcf7f;
    --landing-green: #4ecdc4;
    --landing-purple: #a8e6cf;
    --landing-orange: #ff6b35;
    --landing-pink: #ff8b94;
    --landing-dark: #2c3e50;
    --landing-light: #f8f9fa;
    --landing-white: #ffffff;
    --landing-shadow: rgba(0, 0, 0, 0.1);
    --landing-shadow-hover: rgba(0, 0, 0, 0.15);
}

/* ============================================
   INFORMATIONS INTÉGRÉES DANS LE HERO
   ============================================ */
/* Barre d'informations intégrée dans le hero (remplace la topbar) */
.hero-topbar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    width: 100vw;
    max-width: 100%;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.85rem;
    font-weight: 500;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #1e3a5f 0%, #2d4a6f 100%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    box-sizing: border-box;
}

/* Espacement entre les items de la topbar (côté droit) */
.hero-topbar-right .hero-topbar-item { 
    margin-left: 10px; 
}

.hero-topbar-right .hero-topbar-item.hero-topbar-user { 
    margin-left: 15px; 
}

.hero-topbar-left,
.hero-topbar-center,
.hero-topbar-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.hero-topbar-center {
    flex: 1;
    justify-content: center;
}

.hero-topbar-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
}

.hero-topbar-item i {
    font-size: 0.9rem;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

/* Icônes colorées dans la hero-topbar */
.hero-topbar-item i.fa-map-marker-alt {
    color: #ff6b35;
}

.hero-topbar-item i.fa-rocket {
    color: #28a745;
}

.hero-topbar-item a {
    color: rgba(255, 255, 255, 0.95);
    text-decoration: none;
    transition: color 0.2s ease;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-topbar-item a:hover {
    color: #ffd93d;
    text-shadow: 0 2px 6px rgba(255, 217, 61, 0.5);
}

/* Responsive : masquer certaines infos sur mobile */
@media (max-width: 968px) {
    .hero-topbar {
        padding: 0.75rem 1rem;
        font-size: 0.75rem;
        flex-wrap: wrap;
    }
    
    .hero-topbar-center {
        display: none; /* Masquer le slogan sur tablette/mobile */
    }
    
    .hero-topbar-left span {
        display: none; /* Masquer le texte, garder juste l'icône */
    }
    
    .hero-topbar-left i {
        font-size: 1rem;
    }
}

@media (max-width: 640px) {
    .hero-topbar {
        padding: 0.5rem 1rem;
        font-size: 0.7rem;
    }
    
    .hero-topbar-left {
        display: none; /* Masquer complètement sur mobile */
    }
    
    .hero-topbar-right {
        width: 100%;
        justify-content: center;
    }
}

/* Reset et base */
/* Reset padding de base - chaque section définit son propre padding */

.container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* ============================================
   HERO SECTION
   ============================================ */
.landing-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--landing-white);
    padding: 0;
    padding-top: 60px; /* Espace pour la hero-topbar */
    height: 100vh;
    max-height: 100vh;
    display: flex;
    align-items: center;
    gap: 3rem;
    position: relative;
    overflow: hidden;
    margin-top: 0;
    box-sizing: border-box;
}

/* Conteneur interne pour le contenu du hero (avec padding) */
.landing-hero .hero-content {
    padding: 2rem;
    margin-top: 60px; /* Espace pour la hero-topbar */
}

.landing-hero .hero-visual {
    padding: 2rem;
    margin-top: 60px; /* Espace pour la hero-topbar */
}

/* Animation du gradient bleu (cohérence avec page login) */
.hero-gradient-animation {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(270deg, #3498db, #6dd5fa, #1e3c72, #2a5298);
    background-size: 800% 800%;
    animation: gradientMove 18s ease-in-out infinite;
    z-index: 0;
    pointer-events: none;
}

/* Animation du fond dégradé (cohérence avec page login) */
@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    25% { background-position: 50% 100%; }
    50% { background-position: 100% 50%; }
    75% { background-position: 50% 0%; }
    100% { background-position: 0% 50%; }
}

/* Image de fond avec effet smooth */
.hero-background-image {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.45;
    transition: opacity 0.6s ease, transform 0.6s ease;
    z-index: 1;
    transform: scale(1.05);
    animation: smoothImageFade 1.2s ease-out;
    /* Background image moved from inline markup to CSS for better caching */
    background-image: url('../img/login.jpeg');
}

/* Animation smooth pour l'image */
@keyframes smoothImageFade {
    from {
        opacity: 0;
        transform: scale(1.1);
    }
    to {
        opacity: 0.45;
        transform: scale(1.05);
    }
}

/* Overlay pour améliorer la lisibilité du texte */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.4) 0%, rgba(30, 60, 114, 0.4) 100%);
    z-index: 1;
    pointer-events: none;
}

/* Pattern de grille en overlay */
.landing-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
    z-index: 1;
}

.hero-content {
    flex: 0 0 50%;
    max-width: 50%;
    z-index: 2;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    /* Assurer l'alignement à gauche du texte */
    align-items: flex-start;
    text-align: left;
    padding: 2rem;
    margin-top: 60px; /* Espace pour la hero-topbar */
}

/* Conteneur des boutons de catégories */
.hero-benefits-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    margin-top: 1.5rem;
}

/* Bouton "Pourquoi choisir GestionEPN ?" dans la section gauche */
.hero-benefits-button {
    width: 100%;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease-out;
}

.title-highlight {
    color: var(--landing-yellow);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.hero-subtitle {
    font-size: 1.3rem;
    line-height: 1.6;
    margin-bottom: 2.5rem;
    opacity: 0.95;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.btn-hero {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-hero.btn-primary {
    background: var(--landing-yellow);
    color: var(--landing-dark);
    box-shadow: 0 4px 15px rgba(255, 217, 61, 0.4);
}

.btn-hero.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 217, 61, 0.6);
}

.btn-hero.btn-secondary {
    background: transparent;
    color: var(--landing-white);
    border: 2px solid var(--landing-white);
}

.btn-hero.btn-secondary:hover {
    background: var(--landing-white);
    color: var(--landing-dark);
    transform: translateY(-2px);
}

.btn-hero.btn-link {
    background: transparent;
    color: var(--landing-white);
    border: none;
    text-decoration: underline;
    text-underline-offset: 4px;
    padding: 0.8rem 1.5rem;
    opacity: 0.9;
}

.btn-hero.btn-link:hover {
    opacity: 1;
    transform: translateY(-2px);
    text-decoration: none;
}

.btn-hero.btn-large {
    padding: 1.2rem 2.5rem;
    font-size: 1.1rem;
}

/* Cartes flottantes dans le hero - Nouveau système avec carrousel */
.hero-visual {
    flex: 0 0 50%;
    max-width: 50%;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    height: 100%;
    max-height: 100vh;
    overflow: hidden;
    /* Limiter la largeur sur très grands écrans pour éviter le débordement */
    max-width: 1400px;
}

/* Boutons de catégorie */
.hero-category-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    max-width: 400px;
}

.category-btn {
    background: var(--landing-yellow);
    color: var(--landing-dark);
    border: none;
    border-radius: 15px;
    padding: 1.2rem 2rem;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 3;
}

.category-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.category-btn.active {
    background: linear-gradient(135deg, var(--landing-primary), var(--landing-secondary));
    color: var(--landing-white);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.4);
}

.category-btn[data-category="benefits"] {
    background: var(--landing-blue);
    color: var(--landing-white);
}

.category-btn[data-category="benefits"]:hover {
    background: linear-gradient(135deg, var(--landing-blue), var(--landing-green));
}

.category-btn[data-category="benefits"].active {
    background: linear-gradient(135deg, var(--landing-primary), var(--landing-secondary));
}

.category-btn[data-category="legal"] {
    background: linear-gradient(135deg, #1e3a5f, #2d4a6f);
    color: var(--landing-white);
}

.category-btn[data-category="legal"]:hover {
    background: linear-gradient(135deg, #2d4a6f, #3d5a7f);
}

.category-btn[data-category="legal"].active {
    background: linear-gradient(135deg, #1e3a5f, #2d4a6f);
    box-shadow: 0 4px 15px rgba(30, 58, 95, 0.4);
}

/* Ajustements responsive pour le bouton légal */
@media (max-width: 968px) {
    .category-btn[data-category="legal"] {
        font-size: 1rem;
        padding: 1rem 1.5rem;
    }
}

@media (max-width: 640px) {
    .category-btn[data-category="legal"] {
        font-size: 0.95rem;
        padding: 0.9rem 1.2rem;
    }
}

@media (max-width: 375px) {
    .category-btn[data-category="legal"] {
        font-size: 0.85rem;
        padding: 0.8rem 1rem;
    }
    
    .category-btn[data-category="legal"] span {
        display: block;
        line-height: 1.3;
    }
}

.category-btn i {
    font-size: 1.3rem;
}

/* Conteneur des cartes */
.hero-cards-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    max-height: calc(100vh - 200px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow: hidden;
}

.cards-group {
    display: none;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    width: 100%;
    max-width: 500px;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
    overflow-x: hidden;
    /* Masquer la barre de scroll pour un affichage fluide */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    /* Optimisation des animations */
    will-change: transform, opacity;
}

/* Masquer la barre de scroll pour Chrome/Safari */
.cards-group::-webkit-scrollbar {
    display: none;
}

.cards-group.active {
    display: grid;
    animation: fadeInGrid 0.5s ease-out;
    /* Optimisation des animations */
    will-change: transform, opacity;
}

@keyframes fadeInGrid {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Style des cartes */
.card-float {
    background: var(--landing-white);
    border-radius: 15px;
    padding: 1rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    color: var(--landing-dark);
    height: 150px;
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.5s ease, transform 0.5s ease;
    overflow: hidden;
}

.card-float.active {
    opacity: 1;
    transform: scale(1);
}

.card-float i {
    font-size: 2.2rem;
    color: var(--landing-primary);
    margin-bottom: 0.3rem;
    flex-shrink: 0;
}

.card-float .card-title {
    font-size: 1.05rem;
    font-weight: 700;
    text-align: center;
    margin: 0;
    color: var(--landing-dark);
    line-height: 1.3;
    flex-shrink: 0;
}

.card-float .card-description {
    font-size: 0.85rem;
    text-align: center;
    line-height: 1.5;
}

/* Cartes légales cliquables */
.card-float.card-link {
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    z-index: 10;
    pointer-events: auto;
}

.card-float.card-link:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.card-float.card-link:hover i {
    color: var(--landing-secondary);
    transform: scale(1.1);
}

.card-float.card-link:hover .card-title {
    color: var(--landing-primary);
}

/* S'assurer que les liens dans les cartes sont cliquables */
.card-float.card-link,
.card-float.card-link * {
    pointer-events: auto;
}
    opacity: 0.85;
    margin: 0;
    color: var(--landing-dark);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
}

/* Animations */
.animate-fade {
    animation: fadeIn 0.6s ease-out forwards;
}

.animate-slide {
    animation: slideIn 0.6s ease-out forwards;
}

.animate-scale {
    animation: scaleIn 0.6s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   FEATURES SECTION (Style Padlet)
   ============================================ */
.landing-features {
    background: #f0f4ff; /* Couleur de base */
    padding: 5rem 2rem;
    position: relative;
    overflow: hidden;
}

/* Animation du gradient pour la section Features (comme le hero) */
.features-gradient-animation {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(270deg, #f0f4ff, #e8f0fe, #e0ecfd, #d8e8fc, #c5d9f8, #f0f4ff);
    background-size: 800% 800%;
    animation: gradientMoveFeatures 20s ease-in-out infinite;
    z-index: 0;
    pointer-events: none;
}

/* Animation du gradient pour la section Features */
@keyframes gradientMoveFeatures {
    0% {
        background-position: 0% 50%;
    }
    25% {
        background-position: 50% 100%;
    }
    50% {
        background-position: 100% 50%;
    }
    75% {
        background-position: 50% 0%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Effet de transition douce depuis le hero */
.landing-features::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(180deg, rgba(102, 126, 234, 0.1) 0%, transparent 100%);
    pointer-events: none;
    z-index: 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--landing-dark);
    margin-bottom: 3rem;
    position: relative;
    z-index: 1;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    position: relative;
    z-index: 1;
}

.feature-card {
    background: var(--landing-white);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 4px 20px var(--landing-shadow);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    border-top: 4px solid;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: inherit;
}

.feature-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 8px 30px var(--landing-shadow-hover);
}

/* Couleurs des cartes (style Padlet) */
.card-yellow {
    border-top-color: var(--landing-yellow);
    background: linear-gradient(135deg, #fff9e6 0%, #ffffff 100%);
}

.card-blue {
    border-top-color: var(--landing-blue);
    background: linear-gradient(135deg, #e6f5f0 0%, #ffffff 100%);
}

.card-green {
    border-top-color: var(--landing-green);
    background: linear-gradient(135deg, #e6f9f7 0%, #ffffff 100%);
}

.card-purple {
    border-top-color: var(--landing-purple);
    background: linear-gradient(135deg, #f0f9f5 0%, #ffffff 100%);
}

.card-orange {
    border-top-color: var(--landing-orange);
    background: linear-gradient(135deg, #ffe6e0 0%, #ffffff 100%);
}

.card-pink {
    border-top-color: var(--landing-pink);
    background: linear-gradient(135deg, #ffe6e8 0%, #ffffff 100%);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: var(--landing-dark);
}

.card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--landing-dark);
    margin-bottom: 1rem;
}

.card-description {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.card-footer {
    margin-top: auto;
}

.card-link {
    color: var(--landing-primary);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.card-link:hover {
    gap: 1rem;
    color: var(--landing-dark);
}

.card-link i {
    transition: transform 0.3s ease;
}

.card-link:hover i {
    transform: translateX(5px);
}

/* ============================================
   BENEFITS SECTION
   ============================================ */
.landing-benefits {
    background: #ffffff; /* Couleur de base */
    padding: 5rem 2rem;
    position: relative;
    overflow: hidden;
}

/* Animation du gradient pour la section Benefits (comme le hero) */
.benefits-gradient-animation {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(270deg, #ffffff, #f8f9ff, #f0f4ff, #e8f0fe, #e0ecfd, #ffffff);
    background-size: 800% 800%;
    animation: gradientMoveBenefits 18s ease-in-out infinite;
    z-index: 0;
    pointer-events: none;
}

/* Animation du gradient pour la section Benefits */
@keyframes gradientMoveBenefits {
    0% {
        background-position: 0% 50%;
    }
    25% {
        background-position: 50% 100%;
    }
    50% {
        background-position: 100% 50%;
    }
    75% {
        background-position: 50% 0%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Motif décoratif subtil animé */
.landing-benefits::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.05) 0%, transparent 70%);
    pointer-events: none;
    animation: pulseGlow 4s ease-in-out infinite;
    z-index: 0;
}

@keyframes pulseGlow {
    0%, 100% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

.benefits-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2.5rem;
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.benefit-item {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.benefit-icon {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--landing-primary), var(--landing-secondary));
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--landing-white);
    font-size: 1.5rem;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.benefit-content h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--landing-dark);
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.benefit-content p {
    color: #555;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

/* ============================================
   CTA SECTION
   ============================================ */
.landing-cta {
    background: linear-gradient(270deg, #667eea, #764ba2, #667eea, #4c63d2);
    background-size: 800% 800%;
    animation: gradientMoveCTA 15s ease-in-out infinite;
    color: var(--landing-white);
    padding: 5rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Animation du gradient pour la section CTA (cohérent avec le hero) */
@keyframes gradientMoveCTA {
    0% {
        background-position: 0% 50%;
    }
    25% {
        background-position: 50% 100%;
    }
    50% {
        background-position: 100% 50%;
    }
    75% {
        background-position: 50% 0%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Effet de transition depuis la section benefits */
.landing-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(180deg, rgba(102, 126, 234, 0.2) 0%, transparent 100%);
    pointer-events: none;
    z-index: 0;
}

/* Motif décoratif subtil animé */
.landing-cta::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(118, 75, 162, 0.15) 0%, transparent 70%);
    pointer-events: none;
    animation: pulseGlowCTA 5s ease-in-out infinite;
    z-index: 0;
}

@keyframes pulseGlowCTA {
    0%, 100% {
        opacity: 0.6;
        transform: scale(1) translate(0, 0);
    }
    33% {
        opacity: 0.9;
        transform: scale(1.2) translate(20px, -20px);
    }
    66% {
        opacity: 0.7;
        transform: scale(0.9) translate(-20px, 20px);
    }
}

.cta-content {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.cta-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.cta-text {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    opacity: 0.95;
}

.cta-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Bouton retour mobile : masqué par défaut sur grands écrans */
.mobile-back-button {
    display: none !important;
}

@media (max-width: 968px) {
    .landing-hero {
        flex-direction: column;
        text-align: center;
        padding: 4rem 2rem;
        min-height: auto;
        position: relative;
    }

    .hero-content {
        max-width: 100%;
        margin-bottom: 3rem;
        /* Transition douce pour disparition/réapparition */
        transition: opacity 0.5s ease, transform 0.4s ease, visibility 0.5s;
    }

    /* Classe ajoutée par JS quand cards actives sur mobile */
    .landing-hero.mobile-cards-active .hero-content {
        opacity: 0;
        transform: translateY(-30px);
        visibility: hidden;
        pointer-events: none;
        position: absolute;
        z-index: -1;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-content,
    .hero-visual {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .hero-visual {
        margin-top: 3rem;
        gap: 1.5rem;
        /* Transition pour apparition des cards */
        transition: opacity 0.5s ease, transform 0.4s ease;
    }

    /* Sur mobile, les cards sont cachées par défaut */
    .hero-visual {
        opacity: 0;
        transform: scale(0.95);
        visibility: hidden;
        height: 0;
        overflow: hidden;
    }

    /* Quand cards actives : visible et prend toute la place */
    .landing-hero.mobile-cards-active .hero-visual {
        opacity: 1;
        transform: scale(1);
        visibility: visible;
        height: calc(100vh - 60px);
        margin-top: 0;
        min-height: calc(100vh - 60px);
        max-height: calc(100vh - 60px);
        overflow-y: auto;
        overflow-x: hidden;
    }

    /* Bouton retour sur mobile (apparaît uniquement quand cards actives) */
    .mobile-back-button {
        display: none;
        position: fixed;
        top: 80px;
        left: 20px;
        z-index: 1000;
        background: rgba(255, 255, 255, 0.95);
        border: 2px solid var(--landing-yellow);
        border-radius: 50%;
        width: 45px;
        height: 45px;
        align-items: center;
        justify-content: center;
        color: var(--landing-dark);
        font-size: 1.2rem;
        cursor: pointer;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
        transition: all 0.3s ease;
    }

    /* Afficher le bouton uniquement quand les cards sont actives sur mobile (toutes catégories) */
    .landing-hero.mobile-cards-active .mobile-back-button {
        display: flex !important;
    }

    .mobile-back-button:hover {
        transform: scale(1.1);
        background: var(--landing-yellow);
        color: var(--landing-white);
    }

    .hero-category-buttons {
        max-width: 100%;
    }
    
    /* S'assurer que les 3 boutons s'empilent correctement */
    .hero-category-buttons .category-btn {
        width: 100%;
    }

    .hero-cards-container {
        max-width: 100%;
        min-height: 200px;
        max-height: none;
        overflow: visible;
    }
    
    .cards-group {
        max-height: 100%;
        overflow-y: auto;
        overflow-x: hidden;
        /* Masquer la barre de scroll pour un affichage fluide */
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE/Edge */
        /* Grille mobile : 1 colonne sur très petit écran, 2 colonnes sur tablette */
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        padding-bottom: 10px;
    }
    
    /* Masquer la barre de scroll pour Chrome/Safari (mobile) */
    .cards-group::-webkit-scrollbar {
        display: none;
    }

    .card-float {
        height: auto;
        min-height: 140px;
        max-height: 150px;
        padding: 0.8rem 0.7rem;
    }
    
    .card-float i {
        font-size: 1.8rem;
    }
    
    .card-float .card-title {
        font-size: 0.9rem;
    }
    
    .card-float .card-description {
        font-size: 0.75rem;
        -webkit-line-clamp: 3;
    }

    /* Ajuster l'opacité de l'image sur mobile pour meilleure lisibilité */
    .hero-background-image {
        opacity: 0.35;
    }

    .hero-overlay {
        background: linear-gradient(135deg, rgba(52, 152, 219, 0.75) 0%, rgba(30, 60, 114, 0.75) 100%);
    }

    .floating-cards {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        height: auto;
    }

    .card-float {
        position: relative;
        top: auto;
        left: auto;
        right: auto;
        bottom: auto;
    }

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

    .benefits-list {
        grid-template-columns: 1fr;
    }

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

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

@media (max-width: 640px) {
    .landing-hero,
    .landing-features,
    .landing-benefits,
    .landing-cta {
        padding: 3rem 1.5rem;
    }

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

    .hero-subtitle {
        font-size: 1rem;
    }

    .btn-hero {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }

    .btn-hero.btn-large {
        padding: 1rem 2rem;
        font-size: 1rem;
    }

    .feature-card {
        padding: 2rem;
    }

    .floating-cards {
        grid-template-columns: 1fr;
    }

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

    .cta-actions .btn-hero {
        width: 100%;
        justify-content: center;
    }

    /* Sur très petit écran : 1 colonne uniquement */
    .cards-group {
        grid-template-columns: 1fr;
        gap: 0.7rem;
    }

    .card-float {
        height: auto;
        min-height: 120px;
        max-height: 130px;
        padding: 0.75rem 0.65rem;
    }
    
    .card-float i {
        font-size: 1.6rem;
    }
    
    .card-float .card-title {
        font-size: 0.88rem;
    }
    
    .card-float .card-description {
        font-size: 0.72rem;
        -webkit-line-clamp: 3;
    }
    
    /* Ajustements pour les cartes légales sur mobile */
    .cards-group[data-group="legal"] .card-float {
        min-height: 115px;
        max-height: 125px;
    }
    
    .cards-group[data-group="legal"] .card-float .card-title {
        font-size: 0.85rem;
    }
    
    .cards-group[data-group="legal"] .card-float .card-description {
        font-size: 0.7rem;
        -webkit-line-clamp: 3;
    }

    /* Bouton retour plus petit sur mobile */
    .mobile-back-button {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        top: 70px;
        left: 15px;
    }
}

/* Very small screens (narrow phones like 375x667) - make the hero flow vertically and fit */
@media (max-width: 375px) {
    .landing-hero {
        height: 100vh; /* Garder la hauteur de la viewport */
        max-height: 100vh;
        padding: 0.5rem 0.8rem;
        align-items: flex-start;
        overflow: hidden; /* Empêcher le scroll sur le hero */
    }

    .hero-content {
        flex-basis: 100%;
        max-width: 100%;
        padding: 0 8px;
        gap: 8px;
    }

    .hero-title { 
        font-size: 1.5rem; 
        line-height: 1.15; 
        margin-bottom: 0.5rem;
    }
    
    .hero-subtitle { 
        font-size: 0.85rem; 
        margin-bottom: 0.8rem;
    }

    .hero-actions { 
        gap: 0.5rem; 
    }

    /* Ensure benefit and features buttons are visible and don't get cropped */
    .hero-benefits-buttons { 
        margin-top: 6px; 
        gap: 6px; 
        width: 100%; 
    }
    
    .hero-category-buttons, 
    .hero-benefits-button, 
    .category-btn { 
        width: 100%; 
    }
    
    .category-btn {
        padding: 0.8rem 1.2rem;
        font-size: 0.85rem;
    }
    
    .category-btn i {
        font-size: 1rem;
    }

    /* Make sure hero-visual takes full available height when cards are active */
    .hero-visual { 
        flex-basis: 100%; 
        max-width: 100%; 
        padding: 4px; 
        height: calc(100vh - 180px); /* Hauteur disponible moins le contenu du haut */
        max-height: calc(100vh - 180px);
    }
    
    .hero-cards-container { 
        max-height: 100%;
        height: 100%;
        overflow-y: auto;
        overflow-x: hidden;
        padding-bottom: 10px;
        /* Masquer la barre de scroll pour un affichage fluide */
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE/Edge */
    }
    
    /* Masquer la barre de scroll pour Chrome/Safari (tablette) */
    .hero-cards-container::-webkit-scrollbar {
        display: none;
    }
    
    .cards-group {
        gap: 0.6rem;
        max-height: 100%;
        overflow-y: auto;
        /* Masquer la barre de scroll pour un affichage fluide */
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE/Edge */
    }
    
    /* Masquer la barre de scroll pour Chrome/Safari (tablette) */
    .cards-group::-webkit-scrollbar {
        display: none;
        padding-bottom: 10px;
    }
    
    /* Réduire la taille des cards pour qu'elles tiennent toutes */
    .card-float {
        height: auto;
        min-height: 110px;
        max-height: 120px;
        padding: 0.7rem 0.6rem;
        gap: 0.3rem;
    }
    
    .card-float i {
        font-size: 1.5rem;
        margin-bottom: 0.2rem;
    }
    
    .card-float .card-title {
        font-size: 0.85rem;
        line-height: 1.2;
        margin-bottom: 0.2rem;
    }
    
    .card-float .card-description {
        font-size: 0.7rem;
        line-height: 1.3;
        -webkit-line-clamp: 3; /* Limiter à 3 lignes */
    }
    
    /* Ajustements spécifiques pour les cartes légales */
    .cards-group[data-group="legal"] .card-float {
        min-height: 105px;
        max-height: 115px;
    }
    
    .cards-group[data-group="legal"] .card-float .card-title {
        font-size: 0.8rem;
    }
    
    .cards-group[data-group="legal"] .card-float .card-description {
        font-size: 0.65rem;
        -webkit-line-clamp: 3;
    }
    
    /* Bouton retour ajusté */
    .mobile-back-button {
        width: 38px;
        height: 38px;
        font-size: 0.9rem;
        top: 60px;
        left: 12px;
        z-index: 1000;
    }
    
    /* Quand les cards sont actives, ajuster le hero-visual pour utiliser toute la hauteur disponible */
    .landing-hero.mobile-cards-active .hero-visual {
        height: calc(100vh - 80px);
        max-height: calc(100vh - 80px);
        min-height: calc(100vh - 80px);
    }
    
    .landing-hero.mobile-cards-active .hero-cards-container {
        height: 100%;
        max-height: 100%;
    }
    
    .landing-hero.mobile-cards-active .cards-group {
        height: 100%;
        max-height: 100%;
        overflow-y: auto;
        /* Masquer la barre de scroll pour un affichage fluide */
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE/Edge */
    }
    
    /* Masquer la barre de scroll pour Chrome/Safari (mobile active) */
    .landing-hero.mobile-cards-active .cards-group::-webkit-scrollbar {
        display: none;
    }
}

/* Extra large screens - ensure centered layout inside viewport */
@media (min-width: 1600px) {
    /* Desktop XL: keep hero flush-left while maintaining comfortable widths */
    .landing-hero { 
        padding-left: 2rem; 
        padding-right: 2rem; 
    }
    
    .hero-content { 
        max-width: 720px; 
    }
    
    .hero-visual { 
        max-width: 600px; 
    }
}
