/* Animation carte média - slide out */
@keyframes mediaSlideOut {
    0% { opacity: 1; }
    70% { transform: var(--card-transform) translateX(60px) rotate(8deg); opacity: 1; }
    100% { transform: var(--card-transform) translateX(350px) rotate(20deg); opacity: 0; }
}

/* Animation du curseur machine à écrire */
.typewriter-cursor {
    animation: blink 0.7s infinite;
    font-weight: 300;
}

@keyframes blink {
    0%, 49% {
        opacity: 1;
    }
    50%, 100% {
        opacity: 0;
    }
}

/* Effet de survol animé sur les logos */
.logos-container img {
    transition: transform 0.3s ease, filter 0.3s ease;
    cursor: pointer;
}

.logos-container img:hover {
    animation: logoLoop 1s linear infinite;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
}

@keyframes logoLoop {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* Appliquer le dégradé à la section hero principale */
.hero-shell {
    background: linear-gradient(180deg, #0b1d4d 0%, #1e3a8a 12%, #4050b5 30%, #5462c0 38%, #6870cb 46%, rgba(121, 122, 214, 1) 55%, rgba(138, 136, 219, 0.96) 58%, rgba(156, 152, 225, 0.91) 61%, rgba(174, 169, 231, 0.85) 64%, rgba(191, 186, 237, 0.77) 67%, rgba(207, 203, 243, 0.68) 70%, rgba(220, 217, 247, 0.57) 73%, rgba(231, 229, 251, 0.45) 76%, rgba(239, 238, 253, 0.33) 79%, rgba(245, 244, 254, 0.22) 82%, rgba(249, 249, 255, 0.13) 85%, rgba(252, 252, 255, 0.06) 88%, rgba(254, 254, 255, 0.02) 92%, rgba(255, 255, 255, 0) 100%);
    position: relative !important;
    overflow: hidden !important;
}

/* Background spécifique pour mobile (format 9:16) */
@media (max-width: 768px) {
    .hero-shell {
        background: linear-gradient(180deg, #0b1d4d 0%, #1e3a8a 12%, #4050b5 30%, #5462c0 38%, #6870cb 46%, rgba(121, 122, 214, 1) 55%, rgba(138, 136, 219, 0.96) 58%, rgba(156, 152, 225, 0.91) 61%, rgba(174, 169, 231, 0.85) 64%, rgba(191, 186, 237, 0.77) 67%, rgba(207, 203, 243, 0.68) 70%, rgba(220, 217, 247, 0.57) 73%, rgba(231, 229, 251, 0.45) 76%, rgba(239, 238, 253, 0.33) 79%, rgba(245, 244, 254, 0.22) 82%, rgba(249, 249, 255, 0.13) 85%, rgba(252, 252, 255, 0.06) 88%, rgba(254, 254, 255, 0.02) 92%, rgba(255, 255, 255, 0) 100%);
    }
}

/* Gradient spécifique pour hero-v2 (section plus courte) */
.hero-v2 {
    background: linear-gradient(180deg, #0b1d4d 0%, #1e3a8a 15%, #4050b5 35%, #797ad6 55%, #b8aee0 65%, #d8d0f0 72%, #f0edfb 80%, #ffffff 85%) !important;
    filter: none !important;
}

/* Motif de boucles en arrière-plan */
.hero-shell::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('img/motif-hero.png');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center center;
    pointer-events: none;
    z-index: 4;
    opacity: 0.6;
}

/* Calque background2 au-dessus du liquid glass - SEULEMENT pour V1 */
.hero-shell:not(.hero-v2)::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('img/background/background2.png');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    background-attachment: fixed;
    pointer-events: none;
    z-index: 2;
}

@media (max-width: 768px) {
    .hero-shell:not(.hero-v2)::after {
        background-image: url('img/background/background-mobile2.png');
        background-repeat: no-repeat;
        background-position: center center;
        background-size: cover;
        background-attachment: scroll;
    }
}

/* Optimisation mobile */
@media (max-width: 768px) {
    .hero-shell::before {
        display: none;
    }
}

/* S'assurer que le contenu reste au-dessus de l'effet verre */
.hero-shell > * {
    position: relative;
    z-index: 3;
}

/* Mettre les textes principaux en blanc avec élévation légère */
.hero-shell h2,
.hero-shell .text-foreground {
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Exception pour la modale d'auth dans le hero */
.hero-shell .fixed h2 {
    color: #092759 !important;
    text-shadow: none !important;
}

.hero-shell .fixed p {
    color: #000000 !important;
    text-shadow: none !important;
}

.hero-shell p {
    color: #ffffff !important;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.15);
}

/* Supprimer tous les dégradés sur les textes */
[style*="background-image:linear-gradient"] {
    background-image: none !important;
    -webkit-background-clip: unset !important;
    background-clip: unset !important;
    -webkit-text-fill-color: unset !important;
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Supprimer les masques de dégradé */
[style*="mask-image:linear-gradient"] {
    mask-image: none !important;
    -webkit-mask-image: none !important;
}

/* Style pour le conteneur de logos */
.logos-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    z-index: 3;
    margin-top: 30px;
}

.logos-container img {
    width: 57.5px;
    height: 57.5px;
    object-fit: contain;
    opacity: 0.9;
    transition: opacity 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.008);
    border-radius: 10px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
}

.logos-container img:hover {
    opacity: 1;
    transform: translateY(-2px);
}

/* Animation de flottement pour les logos */
@keyframes floatLogos {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-3px);
    }
}

.logos-container img {
    animation: floatLogos 4s ease-in-out infinite;
}

.logos-container img:nth-child(2) {
    animation-delay: 0.5s;
}

.logos-container img:nth-child(3) {
    animation-delay: 1s;
}

.logos-container img:nth-child(4) {
    animation-delay: 1.5s;
}

.logos-container img:nth-child(5) {
    animation-delay: 2s;
}

.logos-container img:nth-child(6) {
    animation-delay: 2.5s;
}

/* Optimisation mobile pour les logos */
@media (max-width: 768px) {
    .logos-container {
        gap: 15px;
    }
    
    .logos-container img {
        width: 40.25px;
        height: 40.25px;
        border: 2px solid rgba(255, 255, 255, 0.008);
        border-radius: 8px;
        padding: 6px;
        background: rgba(255, 255, 255, 0.05);
    }
}

/* Hero V2 - titre : stroke fin sur mobile, 1px sur desktop */
.hero-v2-title {
    -webkit-text-stroke: 0.4px currentColor;
}
@media (min-width: 1024px) {
    .hero-v2-title {
        -webkit-text-stroke: 1px currentColor;
    }
}
