/* ====================================
   CHIPO HERO SECTION - STYLES
   ==================================== */

.chipo-hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 2rem;
    padding-top: 140px; /* CORRECTION DÉFINITIVE : Encore plus d'espace pour le header (était 100px) */
    opacity: 0;
    transform: scale(1.1);
    transition: opacity 1s ease-out, transform 1s ease-out;
}

.chipo-hero-section.loaded {
    opacity: 1;
    transform: scale(1);
}

/* Animation Speed Variants */
.chipo-hero-section[data-animation-speed="fast"] {
    transition-duration: 0.5s;
}

.chipo-hero-section[data-animation-speed="slow"] {
    transition-duration: 1.5s;
}

/* ====================================
   BULLES D'ARRIÈRE-PLAN
   ==================================== */

.chipo-bubbles-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.chipo-bubble {
    position: absolute;
    border-radius: 50%;
    background: currentColor;
    animation: float 8s infinite ease-in-out;
    will-change: transform;
}

.chipo-bubble:nth-child(1) {
    width: 80px;
    height: 80px;
    left: 10%;
    top: 20%;
    animation-delay: 0s;
    animation-duration: 7s;
}

.chipo-bubble:nth-child(2) {
    width: 60px;
    height: 60px;
    left: 70%;
    top: 30%;
    animation-delay: 1s;
    animation-duration: 9s;
}

.chipo-bubble:nth-child(3) {
    width: 100px;
    height: 100px;
    left: 85%;
    top: 70%;
    animation-delay: 2s;
    animation-duration: 11s;
}

.chipo-bubble:nth-child(4) {
    width: 40px;
    height: 40px;
    left: 20%;
    top: 80%;
    animation-delay: 0.5s;
    animation-duration: 8s;
}

.chipo-bubble:nth-child(5) {
    width: 70px;
    height: 70px;
    left: 50%;
    top: 10%;
    animation-delay: 1.5s;
    animation-duration: 10s;
}

.chipo-bubble:nth-child(6) {
    width: 50px;
    height: 50px;
    left: 30%;
    top: 50%;
    animation-delay: 2.5s;
    animation-duration: 7.5s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(20px, -20px) scale(1.1);
    }
    50% {
        transform: translate(-15px, 15px) scale(0.9);
    }
    75% {
        transform: translate(10px, -10px) scale(1.05);
    }
}

/* ====================================
   CONTAINER
   ==================================== */

.chipo-hero-container {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

/* ====================================
   BADGE FLOTTANT
   ==================================== */

.chipo-hero-badge {
    position: absolute;
    top: -80px;
    left: 0;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transform: translateY(-20px);
    animation: slideDown 0.6s ease-out 0.3s forwards;
    z-index: 10000; /* CORRECTION DÉFINITIVE : Au-dessus du header (1000) ET de tout le reste */
}

@keyframes slideDown {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animation de flottement du badge */
.chipo-hero-badge span {
    display: inline-block;
    animation: gentle-float 3s ease-in-out infinite;
}

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

/* ====================================
   CONTENU
   ==================================== */

.chipo-hero-content {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease-out 0.5s forwards;
}

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

/* ====================================
   TITRE
   ==================================== */

.chipo-hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 2rem;
    letter-spacing: -0.02em;
}

.chipo-highlight {
    position: relative;
    display: inline-block;
    font-weight: 700;
    transition: all 0.3s ease;
}

.chipo-highlight:hover {
    transform: translateY(-2px);
}

/* ====================================
   ICÔNES RÉSEAUX SOCIAUX
   ==================================== */

.chipo-social-icons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
    opacity: 0;
    animation: fadeIn 0.6s ease-out 0.8s forwards;
}

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

.chipo-social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: #51a4b4;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: popIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) backwards;
}

.chipo-social-icon:nth-child(2) { animation-delay: 0.9s; }
.chipo-social-icon:nth-child(4) { animation-delay: 1.0s; }
.chipo-social-icon:nth-child(6) { animation-delay: 1.1s; }
.chipo-social-icon:nth-child(8) { animation-delay: 1.2s; }
.chipo-social-icon:nth-child(10) { animation-delay: 1.3s; }
.chipo-social-icon:nth-child(12) { animation-delay: 1.4s; }

@keyframes popIn {
    0% {
        opacity: 0;
        transform: scale(0);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.chipo-social-icon:hover {
    transform: translateY(-3px) scale(1.1);
    filter: drop-shadow(0 5px 10px rgba(81, 164, 180, 0.3));
}

.chipo-social-icon svg {
    width: 24px;
    height: 24px;
}

.chipo-social-separator {
    color: #95a5a6;
    font-size: 1.2rem;
    margin: 0 0.2rem;
}

/* ====================================
   BOUTONS
   ==================================== */

.chipo-hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeInUp 0.6s ease-out 1s forwards;
}

.chipo-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 50px;
    border: 2px solid transparent;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.chipo-btn span:first-child {
    position: relative;
    z-index: 2;
}

.chipo-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.chipo-btn:active {
    transform: translateY(-1px);
}

.chipo-btn-primary:hover {
    filter: brightness(1.1);
}

.chipo-btn-secondary {
    border: 2px solid currentColor;
}

.chipo-btn-secondary:hover {
    background-color: rgba(81, 164, 180, 0.1) !important;
}

/* Ripple Effect */
.chipo-btn-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    width: 0;
    height: 0;
    transform: translate(-50%, -50%);
    opacity: 0;
    pointer-events: none;
}

.chipo-btn.ripple-active .chipo-btn-ripple {
    animation: ripple 0.6s ease-out;
}

@keyframes ripple {
    0% {
        width: 0;
        height: 0;
        opacity: 0.5;
    }
    100% {
        width: 300px;
        height: 300px;
        opacity: 0;
    }
}

/* ====================================
   IMAGE MASCOTTE
   ==================================== */

.chipo-hero-image {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.8) rotate(-5deg);
    animation: imageReveal 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55) 0.6s forwards;
}

@keyframes imageReveal {
    to {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

.chipo-mascot {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s ease;
}

.chipo-mascot:hover {
    transform: scale(1.05) rotate(2deg);
}

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

@media (max-width: 1024px) {
    .chipo-hero-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .chipo-hero-badge {
        left: 50%;
        transform: translateX(-50%) translateY(-20px);
        text-align: center;
    }
    
    .chipo-hero-badge.loaded {
        transform: translateX(-50%) translateY(0);
    }
    
    .chipo-hero-content {
        text-align: center;
    }
    
    .chipo-social-icons {
        justify-content: center;
    }
    
    .chipo-hero-buttons {
        justify-content: center;
    }
    
    .chipo-hero-image {
        order: 2;
    }
}

@media (max-width: 768px) {
    .chipo-hero-section {
        padding: 1rem;
        min-height: auto;
        padding-top: 6rem; /* CORRECTION : Plus d'espace en haut sur mobile */
        padding-bottom: 3rem;
    }
    
    .chipo-hero-badge {
        top: -60px; /* CORRECTION MOBILE : Position relative au container */
        left: 50%;
        transform: translateX(-50%); /* Centrer horizontalement */
        font-size: 0.8rem;
        padding: 0.5rem 1rem;
        z-index: 10000; /* CORRECTION : Z-index au maximum pour passer AU-DESSUS de TOUT */
        position: absolute; /* CORRECTION : Reste relatif au container, pas fixed */
    }
    
    .chipo-hero-container {
        position: relative; /* CORRECTION : Container positionné pour que le badge soit relatif à lui */
        padding-top: 70px; /* CORRECTION : Espace pour que le badge ne chevauche pas le titre */
    }
    
    .chipo-hero-title {
        font-size: 2rem;
        margin-bottom: 1.5rem;
        margin-top: 0; /* CORRECTION : Pas de margin-top supplémentaire */
    }
    
    .chipo-social-icons {
        margin-bottom: 2rem;
    }
    
    .chipo-social-icon {
        width: 35px;
        height: 35px;
    }
    
    .chipo-social-icon svg {
        width: 20px;
        height: 20px;
    }
    
    .chipo-hero-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .chipo-btn {
        width: 100%;
        padding: 0.875rem 1.5rem;
    }
    
    .chipo-hero-image {
        max-width: 300px;
        margin: 0 auto;
    }
}

/* ====================================
   INTERACTIONS SOURIS
   ==================================== */

.chipo-hero-section[data-mouse-effect="yes"] .chipo-bubble {
    transition: transform 0.3s ease-out;
}

.chipo-hero-section.mouse-active .chipo-bubble {
    will-change: transform;
}

/* ====================================
   PERFORMANCE
   ==================================== */

.chipo-hero-section * {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Optimisation GPU */
.chipo-hero-badge,
.chipo-hero-content,
.chipo-hero-image,
.chipo-bubble,
.chipo-btn {
    will-change: auto;
}

/* Préchargement des animations */
@media (prefers-reduced-motion: no-preference) {
    .chipo-hero-section {
        animation: none;
    }
}

/* Désactiver les animations si demandé par l'utilisateur */
@media (prefers-reduced-motion: reduce) {
    .chipo-hero-section,
    .chipo-hero-badge,
    .chipo-hero-content,
    .chipo-hero-image,
    .chipo-social-icon,
    .chipo-bubble {
        animation: none !important;
        transition: none !important;
    }
    
    .chipo-hero-section {
        opacity: 1;
        transform: none;
    }
    
    .chipo-hero-badge,
    .chipo-hero-content,
    .chipo-hero-image,
    .chipo-social-icons,
    .chipo-hero-buttons {
        opacity: 1;
        transform: none;
    }
}
