/* ===== HERO AVEC BACKGROUND IMAGE ROBUSTE ===== */

/* HERO SECTION - Approche robuste sans background-attachment */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Image de fond en tant qu'élément séparé - Plus robuste */
.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/hero.webp');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    z-index: 0;
}

/* Overlay léger pour la lisibilité */
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2);
    z-index: 1;
}

/* Zone titre flottante - Transparente - Plus haute et compacte */
.floating-header {
    position: absolute;
    top: 10%;
    right: 5%;
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(15px);
    border-radius: 25px;
    padding: 30px 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    border: 3px solid rgba(255, 255, 255, 0.4);
    max-width: 480px;
    z-index: 10;
    animation: slideInRight 1.2s ease-out;
    transition: all 0.4s ease;
}

.floating-header:hover {
    transform: translateY(-8px);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(255, 255, 255, 0.6);
}

/* Titre principal avec contraste renforcé */
.main-title {
    font-size: 3rem;
    font-weight: 900;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px;
    line-height: 1.1;
    text-align: center;
    animation: titleGlow 4s ease-in-out infinite alternate;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 1)) 
            drop-shadow(2px 2px 4px rgba(255, 255, 255, 0.9))
            drop-shadow(-2px -2px 4px rgba(255, 255, 255, 0.9));
    position: relative;
}

.main-title::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    z-index: -1;
    border-radius: 10px;
}

@keyframes titleGlow {
    0% {
        filter: drop-shadow(0 0 8px rgba(255, 255, 255, 1)) 
                drop-shadow(2px 2px 4px rgba(255, 255, 255, 0.9))
                drop-shadow(-2px -2px 4px rgba(255, 255, 255, 0.9))
                drop-shadow(0 0 15px rgba(102, 126, 234, 0.3));
    }
    100% {
        filter: drop-shadow(0 0 12px rgba(255, 255, 255, 1)) 
                drop-shadow(3px 3px 6px rgba(255, 255, 255, 0.95))
                drop-shadow(-3px -3px 6px rgba(255, 255, 255, 0.95))
                drop-shadow(0 0 25px rgba(118, 75, 162, 0.4));
    }
}

/* Sous-titre avec contraste maximum - Plus compact */
.main-subtitle {
    font-size: 1.2rem;
    color: #222;
    text-align: center;
    line-height: 1.5;
    margin-bottom: 15px;
    font-weight: 700;
    animation: subtitleFloat 5s ease-in-out infinite;
    text-shadow: 0 0 8px rgba(255, 255, 255, 1),
                 2px 2px 4px rgba(255, 255, 255, 0.9),
                 -2px -2px 4px rgba(255, 255, 255, 0.9),
                 0 2px 6px rgba(255, 255, 255, 0.8);
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.8));
    position: relative;
}

.main-subtitle::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
    z-index: -1;
    border-radius: 8px;
}

@keyframes subtitleFloat {
    0%, 100% {
        transform: translateY(0px);
        text-shadow: 0 0 8px rgba(255, 255, 255, 1),
                     2px 2px 4px rgba(255, 255, 255, 0.9),
                     -2px -2px 4px rgba(255, 255, 255, 0.9),
                     0 2px 6px rgba(255, 255, 255, 0.8);
    }
    50% {
        transform: translateY(-3px);
        text-shadow: 0 0 12px rgba(255, 255, 255, 1),
                     3px 3px 6px rgba(255, 255, 255, 0.95),
                     -3px -3px 6px rgba(255, 255, 255, 0.95),
                     0 3px 8px rgba(255, 255, 255, 0.85);
    }
}

/* Badges des fonctionnalités - Grid 2x2 par défaut pour tous les grands écrans */
.features-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px 18px;
    justify-items: center;
    animation: badgesFloat 6s ease-in-out infinite;
    justify-content: center;
    width: 100%;
}

/* Style spécifique pour très grands écrans (>1200px) */
@media (min-width: 1201px) {
    .features-container {
        grid-template-columns: 1fr 1fr;
        gap: 15px 18px;
    }
}

@keyframes badgesFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    33% {
        transform: translateY(-2px);
    }
    66% {
        transform: translateY(2px);
    }
}

.feature-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 800;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4),
                0 0 0 3px rgba(255, 255, 255, 0.3);
    transition: all 0.4s ease;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    animation: badgePulse 4s ease-in-out infinite;
    text-shadow: 0 0 6px rgba(0, 0, 0, 0.5),
                 1px 1px 2px rgba(0, 0, 0, 0.8),
                 -1px -1px 2px rgba(0, 0, 0, 0.8);
}

.feature-badge:nth-child(1) { animation-delay: 0s; }
.feature-badge:nth-child(2) { animation-delay: 1s; }
.feature-badge:nth-child(3) { animation-delay: 2s; }
.feature-badge:nth-child(4) { animation-delay: 3s; }

@keyframes badgePulse {
    0%, 100% {
        box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4),
                    0 0 0 3px rgba(255, 255, 255, 0.3);
    }
    50% {
        box-shadow: 0 12px 35px rgba(118, 75, 162, 0.5),
                    0 0 0 4px rgba(255, 255, 255, 0.4);
    }
}

.feature-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s;
}

.feature-badge:hover::before {
    left: 100%;
}

.feature-badge:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.5);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    border-color: rgba(255, 255, 255, 0.4);
}

.feature-badge:hover .emoji {
    transform: scale(1.3) rotate(15deg);
}

.feature-badge .emoji {
    margin-left: 8px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

/* BADGES DES FONCTIONNALITÉS - EN DEHORS DU FLOATING-HEADER */
.features-badges-section {
    position: absolute;
    top: 50%;
    right: 5%;
    z-index: 10;
    animation: slideInRight 1.4s ease-out;
    max-width: 480px;
    width: 480px;
}

/* ZONE STATS - DÉPLACÉES PLUS HAUT */
.stats-floating {
    position: absolute;
    bottom: 25%; /* Changé de 12% à 25% pour les remonter */
    left: 5%;
    display: flex;
    gap: 15px;
    z-index: 10;
    animation: slideInLeft 1.6s ease-out;
}

/*  Grand écran sous les badges centrés */
.rabbi-nahman-overlay {
    width: 420px;
    border: none;
    background: none;
    border-radius: 0;
    padding: 0;
    position: absolute;
    top: 75%;
    right: 8.5%;
    transform: translateY(-50%);
    box-shadow: none;
    backdrop-filter: none;
    z-index: 10;
    animation: none;
    opacity: 1;
}

.rabbi-nahman-overlay::before {
    display: none !important;
    content: none !important;
}

.rabbi-nahman-overlay .quote {
    font-size: 1.1rem;
    color: #ffd700;
    font-weight: 800;
    line-height: 1.6;
    margin-bottom: 0;
    direction: rtl;
    text-align: center;
    background: #181818;
    padding: 14px 10px;
    border-radius: 15px;
    border: 2px solid rgba(255, 215, 0, 0.3);
    max-width: 95vw;
    width: 420px;
    margin-left: auto;
    margin-right: auto;
}

.rabbi-nahman-overlay .quote-line {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    font-size: 1.25rem;
    font-weight: 900;
    position: relative;
    white-space: nowrap;
    gap: 0.3em;
    overflow: hidden;
    text-shadow: none;
}

.rabbi-nahman-overlay .typewriter-container {
    display: inline;
    align-items: unset;
    margin: 0;
    font-size: inherit;
    font-weight: inherit;
    letter-spacing: 0;
}

.fade-letter {
    color: #ffd700;
    font-weight: 900;
    font-size: inherit;
    animation: letterBounce 4s cubic-bezier(0.6,0,0.4,1) infinite;
    text-shadow: none;
    position: static;
    display: inline;
    min-width: unset;
    text-align: inherit;
    margin: 0;
    padding: 0;
    vertical-align: baseline;
    transition: filter 0.2s;
}

.rabbi-nahman-overlay .sleep-icon,
.rabbi-nahman-overlay .fa-bed,
.rabbi-nahman-overlay .fa-sun,
.rabbi-nahman-overlay .lightbulb {
    font-size: 1.1em;
    max-width: 1.2em;
    max-height: 1.2em;
    filter: none !important;
    text-shadow: none !important;
    box-shadow: none !important;
    vertical-align: middle;
    color: #ffd700;
}

/* Supprime toute ombre sur les icônes même dans les sélecteurs individuels */
.rabbi-nahman-overlay .sleep-icon,
.rabbi-nahman-overlay .fa-bed,
.rabbi-nahman-overlay .fa-sun,
.rabbi-nahman-overlay .lightbulb {
    filter: none !important;
    text-shadow: none !important;
    box-shadow: none !important;
}

@keyframes letterBounce {
    0%, 85%, 100% {
        transform: translateY(0) scale(1);
        opacity: 1;
        filter: blur(0);
    }
    15% {
        transform: translateY(1.3em) scale(0.85);
        opacity: 0.1;
        filter: blur(2px);
    }
    30% {
        transform: translateY(-0.7em) scale(1.15);
        opacity: 1;
        filter: blur(0.5px);
    }
    40% {
        transform: translateY(0.2em) scale(0.98);
        opacity: 0.95;
        filter: blur(0.2px);
    }
    50% {
        transform: translateY(-0.2em) scale(1.04);
        opacity: 1;
        filter: blur(0);
    }
    60% {
        transform: translateY(0) scale(1);
        opacity: 1;
        filter: blur(0);
    }
}

@media (max-width: 600px) {
    .rabbi-nahman-overlay .quote {
        font-size: 0.98rem;
        width: 98vw;
        padding: 10px 2vw;
    }
    .rabbi-nahman-overlay .quote-line {
        font-size: 1.05rem;
    }
    .rabbi-nahman-overlay .typewriter-container {
        min-width: 2.5em;
    }
}

/* Icônes de sommeil magnifiques */
.rabbi-nahman-overlay .sleep-icon {
    color: #ffd700;
    font-size: 1.3rem;
    margin-left: 10px;
    margin-right: 10px;
    animation: sleepFloat 4s ease-in-out infinite;
    filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.8));
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
}

.rabbi-nahman-overlay .fa-bed {
    color: #ffd700;
    font-size: 1.3rem;
    margin-left: 10px;
    margin-right: 10px;
    animation: sleepFloat 4s ease-in-out infinite 2s;
    filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.8));
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
}

/* Icône soleil magnifique */
.rabbi-nahman-overlay .fa-sun {
    color: #ffd700;
    font-size: 1.3rem;
    margin-left: 10px;
    margin-right: 10px;
    animation: sunRotate 6s linear infinite;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.8));
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
}

/* Ampoule magnifique */
.rabbi-nahman-overlay .lightbulb {
    color: #ffd700;
    font-size: 1.3rem;
    margin-left: 10px;
    margin-right: 10px;
    animation: lightbulbGlow 3s ease-in-out infinite;
    filter: drop-shadow(0 0 12px rgba(255, 215, 0, 0.8));
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
}

/* Animations améliorées */
@keyframes sleepFloat {
    0%, 100% {
        transform: translateY(0px) rotate(0deg) scale(1);
        opacity: 0.9;
    }
    25% {
        transform: translateY(-4px) rotate(3deg) scale(1.05);
        opacity: 1;
    }
    50% {
        transform: translateY(-2px) rotate(-2deg) scale(1.1);
        opacity: 0.8;
    }
    75% {
        transform: translateY(-6px) rotate(1deg) scale(1.05);
        opacity: 1;
    }
}

@keyframes sunRotate {
    0% {
        transform: rotate(0deg) scale(1);
    }
    50% {
        transform: rotate(180deg) scale(1.1);
    }
    100% {
        transform: rotate(360deg) scale(1);
    }
}

@keyframes lightbulbGlow {
    0%, 100% {
        transform: scale(1);
        filter: brightness(1) drop-shadow(0 0 8px rgba(255, 215, 0, 0.6));
    }
    25% {
        transform: scale(1.05);
        filter: brightness(1.2) drop-shadow(0 0 12px rgba(255, 215, 0, 0.8));
    }
    50% {
        transform: scale(1.15);
        filter: brightness(1.4) drop-shadow(0 0 15px rgba(255, 215, 0, 1));
    }
    75% {
        transform: scale(1.05);
        filter: brightness(1.2) drop-shadow(0 0 12px rgba(255, 215, 0, 0.8));
    }
}

@keyframes letterChange {
    0%, 45% {
        content: "א";
        opacity: 1;
        transform: scale(1) rotate(0deg);
        text-shadow: 0 0 15px rgba(255, 215, 0, 1);
    }
    50%, 95% {
        content: "ע";
        opacity: 1;
        transform: scale(1.1) rotate(2deg);
        text-shadow: 0 0 20px rgba(255, 215, 0, 1.2);
    }
    100% {
        content: "א";
        opacity: 1;
        transform: scale(1) rotate(0deg);
        text-shadow: 0 0 15px rgba(255, 215, 0, 1);
    }
}

.rabbi-nahman-overlay .attribution {
    font-size: 0.85rem;
    color: #ffd700;
    font-style: italic;
    text-align: left;
    border-top: 1px solid rgba(255, 215, 0, 0.4);
    padding-top: 8px;
    font-weight: 500;
    direction: rtl;
    padding-left: 15px;
}

@keyframes goldenFlow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes goldenPulse {
    0%, 100% { box-shadow: 0 0 5px rgba(255, 215, 0, 0.3); }
    50% { box-shadow: 0 0 15px rgba(255, 215, 0, 0.6); }
}

/* Pause animation au hover */
.rabbi-nahman-overlay .quote:hover {
    animation-play-state: paused;
}

/* Animation d'entrée spécifique pour la citation */
@keyframes slideInQuote {
    0% {
        opacity: 0;
        transform: translateX(50px) translateY(-50%);
    }
    100% {
        opacity: 1;
        transform: translateX(0) translateY(-50%);
    }
}

/* Moyen écran - sous les stats centré */
@media (max-width: 1200px) and (min-width: 769px) {
    .rabbi-nahman-overlay {
        position: absolute;
        bottom: 30px;
        top: auto;
        left: 50%;
        transform: translateX(-50%);
        width: 350px;
    }
}

/* Petit écran - au dessus des stats dans le flow */
@media (max-width: 768px) {
    .hero-section {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding: 30px 20px;
        min-height: 100vh;
    }
    
    .floating-header {
        order: 1;
        margin-bottom: auto;
    }
    
    .stats-floating {
        order: 2;
        margin-bottom: 30px;
    }
    
    .rabbi-nahman-overlay {
        position: static;
        order: 3;
        width: 380px;
        padding: 18px 16px 12px;
        transform: none;
        margin: 0 auto 40px;
        top: auto;
        left: auto;
    }
    
    .rabbi-nahman-overlay .quote {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .rabbi-nahman-overlay {
        width: 360px;
        padding: 16px 14px 10px;
        margin: 25px auto 10px;
    }
    
    .rabbi-nahman-overlay .quote {
        font-size: 1rem;
        line-height: 1.3;
    }
    
    .rabbi-nahman-overlay .attribution {
        font-size: 0.8rem;
    }
}

.stat-bubble {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    width: 100px;
    height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.8);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    padding: 12px 8px;
    gap: 4px;
}

.stat-bubble::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(102, 126, 234, 0.08) 0%, 
        rgba(118, 75, 162, 0.08) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 16px;
}

.stat-bubble:hover::before {
    opacity: 1;
}

.stat-bubble:hover {
    transform: translateY(-8px) scale(1.08);
    box-shadow: 
        0 16px 48px rgba(102, 126, 234, 0.25),
        0 0 0 1px rgba(102, 126, 234, 0.3);
    border-color: rgba(102, 126, 234, 0.6);
    background: rgba(255, 255, 255, 0.98);
}

.stat-bubble:hover .stat-icon {
    transform: rotate(360deg) scale(1.15);
    filter: drop-shadow(0 4px 8px rgba(102, 126, 234, 0.3));
}

.stat-bubble:hover .stat-number {
    color: #667eea;
    transform: scale(1.05);
}

.stat-bubble:hover .stat-label {
    color: #667eea;
    font-weight: 800;
}

/* Icônes des stats - Compactes */
.stat-icon {
    font-size: 1.6rem;
    margin-bottom: 2px;
    position: relative;
    z-index: 3;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
    flex-shrink: 0;
    line-height: 1;
}

/* Chiffres des stats - Bien lisibles */
.stat-number {
    font-size: 1.8rem;
    font-weight: 900;
    color: #2d3748;
    margin: 0;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
    flex-shrink: 0;
    line-height: 0.9;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

/* Labels des stats - Parfaitement lisibles */
.stat-label {
    font-size: 0.7rem;
    color: #4a5568;
    font-weight: 700;
    text-align: center;
    line-height: 1;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-top: 2px;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.6);
    letter-spacing: 0.3px;
}

/* Animations d'entrée */
@keyframes slideInRight {
    0% {
        opacity: 0;
        transform: translateX(50px) translateY(-20px);
    }
    100% {
        opacity: 1;
        transform: translateX(0) translateY(0);
    }
}

@keyframes slideInLeft {
    0% {
        opacity: 0;
        transform: translateX(-50px) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateX(0) translateY(0);
    }
}

/* Animation de flottement continu */
.hero-section.loaded .floating-header {
    animation: gentleFloat 8s ease-in-out infinite;
    animation-delay: 3s;
}

.hero-section.loaded .stats-floating {
    animation: gentleFloat 10s ease-in-out infinite;
    animation-delay: 4s;
}

@keyframes gentleFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* ===== RESPONSIVE DESIGN ===== */

/* Tablettes (1024px et moins) */
@media (max-width: 1024px) {
    .floating-header {
        top: 12%;
        right: 3%;
        padding: 35px 40px;
        max-width: 420px;
    }
    
    .main-title {
        font-size: 2.6rem;
    }
    
    .main-subtitle {
        font-size: 1.2rem;
    }
    
    .stats-floating {
        gap: 12px;
        bottom: 22%; /* Ajusté pour maintenir la position plus haute */
        left: 3%;
    }
    
    .stat-bubble {
        width: 95px;
        height: 95px;
        padding: 10px 6px;
    }
    
    .stat-icon {
        font-size: 1.5rem;
    }
    
    .stat-number {
        font-size: 1.7rem;
    }
    
    .stat-label {
        font-size: 0.65rem;
    }
}

/* Écrans moyens - Stats en 2x2 et badges centrés */
@media (min-width: 769px) and (max-width: 1200px) {
    .stats-floating {
        flex-wrap: wrap;
        width: 200px;
        gap: 10px;
    }
    
    .stat-bubble {
        width: 90px;
        height: 90px;
    }
    
    /* Positionnement des badges pour écran moyen */
    .features-badges-section {
        right: 5%;
        width: 480px;
    }
    
    .features-container {
        justify-content: center;
        width: 100%;
    }
}

/* Tablettes portrait (768px et moins) */
@media (max-width: 768px) {
    .hero-section {
        min-height: 100vh;
        padding: 30px 20px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        align-items: center;
    }
    
    .floating-header {
        position: static;
        order: 1;
        max-width: 100%;
        width: 100%;
        padding: 30px 25px;
        margin-bottom: 0;
        animation: fadeInDown 1s ease;
    }
    
    .main-title {
        font-size: 2.4rem;
        margin-bottom: 15px;
    }
    
    /* Masquer le sous-titre sur petit écran */
    .main-subtitle {
        display: none;
    }
    
    /* Masquer les badges sur petit écran */
    .features-badges-section {
        display: none;
    }
    
    .features-container {
        grid-template-columns: 1fr 1fr;
        gap: 10px 12px;
    }
    
    .feature-badge {
        padding: 10px 20px;
        font-size: 0.85rem;
    }
    
    .stats-floating {
        position: static;
        order: 3;
        gap: 15px;
        justify-content: center;
        flex-wrap: nowrap;
        animation: fadeInUp 1s ease;
        overflow-x: auto;
        padding: 0 10px;
        margin-top: 20px;
    }
    
    .stat-bubble {
        width: 90px;
        height: 90px;
        padding: 10px 6px;
        gap: 3px;
    }
    
    .stat-icon {
        font-size: 1.4rem;
    }
    
    .stat-number {
        font-size: 1.6rem;
    }
    
    .stat-label {
        font-size: 0.6rem;
    }
}

/* Mobile (770px et moins) */
@media (max-width: 770px) {
    .hero-section {
        padding: 20px 15px;
        gap: 25px;
    }
    
    /* Image de fond côté gauche */
    .hero-background {
        background-position: left center;
    }
    

    
    .floating-header {
        padding: 25px 20px;
        border-radius: 20px;
    }
    
    .main-title {
        font-size: 2.1rem;
    }
    
    /* Masquer le sous-titre sur petit écran */
    .main-subtitle {
        display: none;
    }
    
    /* Masquer les badges sur petit écran */
    .features-badges-section {
        display: none;
    }
    
    .features-container {
        grid-template-columns: 1fr 1fr;
        gap: 8px 10px;
    }
    
    .feature-badge {
        padding: 10px 18px;
        font-size: 0.8rem;
    }
    
    .stats-floating {
        gap: 12px;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding: 0 10px;
    }
    
    .stat-bubble {
        width: 85px;
        height: 85px;
        padding: 8px 5px;
        gap: 3px;
    }
    
    .stat-icon {
        font-size: 1.3rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .stat-label {
        font-size: 0.55rem;
    }
}

/* Mobile très petit (480px et moins) */
@media (max-width: 480px) {
    .hero-section {
        padding: 15px 10px;
        gap: 20px;
    }
    
    /* Image de fond côté gauche */
    .hero-background {
        background-position: left center;
    }
    

    
    .floating-header {
        padding: 20px 15px;
    }
    
    .main-title {
        font-size: 1.9rem;
    }
    
    /* Masquer le sous-titre sur petit écran */
    .main-subtitle {
        display: none;
    }
    
    /* Masquer les badges sur petit écran */
    .features-badges-section {
        display: none;
    }
    
    .features-container {
        grid-template-columns: 1fr 1fr;
        gap: 6px 8px;
    }
    
    .feature-badge {
        padding: 8px 15px;
        font-size: 0.75rem;
    }
    
    .stats-floating {
        gap: 10px;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding: 0 5px;
    }
    
    .stat-bubble {
        width: 80px;
        height: 80px;
        padding: 8px 4px;
        gap: 2px;
    }
    
    .stat-icon {
        font-size: 1.2rem;
    }
    
    .stat-number {
        font-size: 1.4rem;
    }
    
    .stat-label {
        font-size: 0.5rem;
        line-height: 1;
    }
}

/* Mode paysage mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-section {
        min-height: 100vh;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 20px;
        padding: 20px;
    }
    
    .floating-header {
        width: 55%;
        order: 1;
        margin-bottom: 0;
    }
    
    .stats-floating {
        width: 40%;
        order: 2;
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }
    
    .stat-bubble {
        width: 85px;
        height: 85px;
        padding: 8px 4px;
        gap: 3px;
    }
    
    .stat-icon {
        font-size: 1.3rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .stat-label {
        font-size: 0.55rem;
    }
}

/* Animations mobiles simplifiées */
@media (max-width: 768px) {
    @keyframes fadeInDown {
        from {
            opacity: 0;
            transform: translateY(-30px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    @keyframes fadeInUp {
        from {
            opacity: 0;
            transform: translateY(30px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    /* Désactiver les animations continues sur mobile */
    .hero-section.loaded .floating-header,
    .hero-section.loaded .stats-floating,
    .main-title,
    .main-subtitle,
    .features-container,
    .feature-badge {
        animation: none !important;
    }
}

/* Latest Stories Section - Arrière-plan Particules Galactiques */
.latest-stories-section {
    padding: 60px 0;
    margin: 0;
    position: relative;
    background: radial-gradient(ellipse at center, #1e3c72 0%, #2a5298 50%, #1a237e 100%);
    overflow: hidden;
}

.latest-stories-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 30%, #ffd700 2px, transparent 2px),
        radial-gradient(circle at 80% 70%, #4facfe 1.5px, transparent 1.5px),
        radial-gradient(circle at 45% 80%, #ffffff 1px, transparent 1px),
        radial-gradient(circle at 70% 20%, #ffb347 1.5px, transparent 1.5px),
        radial-gradient(circle at 30% 60%, #00f2fe 1px, transparent 1px);
    background-size: 120px 120px, 90px 90px, 60px 60px, 150px 150px, 80px 80px;
    animation: galaxyFloat 25s linear infinite;
    opacity: 0.6;
    z-index: 1;
}

.latest-stories-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 60% 40%, rgba(255, 215, 0, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 20% 80%, rgba(79, 172, 254, 0.08) 0%, transparent 60%);
    z-index: 2;
}

@keyframes galaxyFloat {
    0% { transform: translateY(0px) translateX(0px); }
    50% { transform: translateY(-80px) translateX(40px); }
    100% { transform: translateY(-160px) translateX(0px); }
}

/* S'assurer que le contenu reste au-dessus */
.latest-stories-section .container,
.latest-stories-section .stories-grid,
.latest-stories-section .story-card {
    position: relative;
    z-index: 3;
}

.stories-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 50px;
}

.stories-title {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #ffffff, #f8f9fa, #ffd700, #ffffff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.stories-cta {
    text-align: center;
    margin-top: 40px;
}

.btn.btn-premium {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 16px 32px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn.btn-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.btn.btn-premium:hover::before {
    left: 100%;
}

.btn.btn-premium:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4);
}

.btn.btn-premium .btn-icon {
    font-size: 1.3rem;
    transition: transform 0.3s ease;
}

.btn.btn-premium:hover .btn-icon {
    transform: translateX(5px);
}

/* Bouton dans le header des stories */
.btn.btn-premium.btn-header {
    padding: 12px 24px;
    font-size: 0.95rem;
    white-space: nowrap;
}

/* Responsive pour les stats compactes */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .hero.compact-hero {
        padding: 40px 0 20px;
        min-height: 280px;
    }
    
    .hero.compact-hero .hero-content h1 {
        font-size: 2.2rem;
    }
    
    .hero.compact-hero .hero-content p {
        font-size: 1rem;
    }
    
    .stats-section.compact-stats {
        padding: 30px 0;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .compact-stats .stat-card {
        padding: 20px 15px;
    }
    
    .compact-stats .stat-number {
        font-size: 1.8rem;
    }
    
    .compact-stats .stat-label {
        font-size: 1rem;
    }
    
    .stories-title {
        font-size: 2rem;
    }
    
    .stories-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .btn.btn-premium {
        font-size: 1rem;
        padding: 14px 28px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}


/* SECTION TAGS AVEC BACKGROUND GEOMETRIQUE MODERNE */
.tags-section {
    padding: 60px 0;
    margin: 0;
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #4facfe 100%);
    overflow: hidden;
}

/* Effet géométrique avec formes flottantes */
.tags-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(45deg, rgba(255, 215, 0, 0.1) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(255, 215, 0, 0.1) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(79, 172, 254, 0.08) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(79, 172, 254, 0.08) 75%);
    background-size: 60px 60px, 60px 60px, 60px 60px, 60px 60px;
    background-position: 0 0, 0 30px, 30px -30px, -30px 0px;
    animation: geometricFloat 20s linear infinite;
    opacity: 0.4;
    z-index: 1;
}

/* Particules circulaires flottantes */
.tags-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(255, 215, 0, 0.2) 3px, transparent 3px),
        radial-gradient(circle at 75% 75%, rgba(255, 255, 255, 0.15) 2px, transparent 2px),
        radial-gradient(circle at 50% 10%, rgba(79, 172, 254, 0.2) 2.5px, transparent 2.5px),
        radial-gradient(circle at 10% 90%, rgba(255, 215, 0, 0.15) 2px, transparent 2px),
        radial-gradient(circle at 90% 50%, rgba(255, 255, 255, 0.1) 1.5px, transparent 1.5px);
    background-size: 80px 80px, 120px 120px, 100px 100px, 90px 90px, 70px 70px;
    animation: particlesFloat 30s ease-in-out infinite;
    opacity: 0.7;
    z-index: 2;
}

@keyframes geometricFloat {
    0% { transform: translateX(0px) translateY(0px); }
    25% { transform: translateX(-20px) translateY(-10px); }
    50% { transform: translateX(20px) translateY(-20px); }
    75% { transform: translateX(-10px) translateY(-15px); }
    100% { transform: translateX(0px) translateY(0px); }
}

@keyframes particlesFloat {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-15px) rotate(120deg); }
    66% { transform: translateY(15px) rotate(240deg); }
}

/* Container et header */
.tags-section .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
    position: relative;
    z-index: 3;
}

.tags-section .section-header {
    text-align: center;
    margin-bottom: 50px;
}

.tags-title {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #ffffff, #f8f9fa, #ffd700, #ffffff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Grid des tags */
.tags-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

/* Badge de tag */
.tag-badge {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    padding: 16px 20px;
    text-decoration: none;
    color: #2d3748;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.tag-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.6s ease;
}

.tag-badge:hover::before {
    left: 100%;
}

.tag-badge:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 20px 60px rgba(79, 172, 254, 0.3);
    background: rgba(255, 255, 255, 0.98);
    border-color: rgba(79, 172, 254, 0.4);
}

.tag-name {
    font-weight: 700;
    font-size: 1.1rem;
    color: #2d3748;
    transition: color 0.3s ease;
}

.tag-badge:hover .tag-name {
    color: #4facfe;
}

.tag-count {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 14px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 0.9rem;
    min-width: 45px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
}

.tag-badge:hover .tag-count {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(79, 172, 254, 0.4);
}

/* Section no-tags */
.no-tags {
    text-align: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.9);
}

.no-tags p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    font-weight: 600;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* RESPONSIVE */
@media (max-width: 1024px) {
    .tags-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 18px;
    }
    
    .tags-title {
        font-size: 2.6rem;
    }
}

@media (max-width: 768px) {
    .tags-section {
        padding: 50px 0;
    }
    
    .tags-section .container {
        padding: 0 20px;
    }
    
    .tags-title {
        font-size: 2rem;
    }
    
    .tags-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 15px;
    }
    
    .tag-badge {
        padding: 14px 16px;
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .tag-name {
        font-size: 1rem;
    }
    
    .tag-count {
        margin-top: 5px;
    }
}

@media (max-width: 480px) {
    .tags-title {
        font-size: 1.8rem;
    }
    
    .tags-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 12px;
    }
    
    .tag-badge {
        padding: 12px 14px;
    }
} 