/* Design System Uclur - Variables CSS et styles de base - v2.3.0 */

:root {
    /* Palette de couleurs */
    --color-purple-50: #faf5ff;
    --color-purple-100: #f3e8ff;
    --color-purple-200: #e9d5ff;
    --color-purple-300: #d8b4fe;
    --color-purple-400: #c084fc;
    --color-purple-500: #a855f7;
    --color-purple-600: #9333ea;
    --color-purple-700: #7c3aed;
    --color-purple-800: #6b21a8;
    --color-purple-900: #581c87;

    --color-indigo-50: #eef2ff;
    --color-indigo-100: #e0e7ff;
    --color-indigo-200: #c7d2fe;
    --color-indigo-300: #a5b4fc;
    --color-indigo-400: #818cf8;
    --color-indigo-500: #6366f1;
    --color-indigo-600: #4f46e5;
    --color-indigo-700: #4338ca;
    --color-indigo-800: #3730a3;
    --color-indigo-900: #312e81;

    --color-gray-50: #f9fafb;
    --color-gray-100: #f3f4f6;
    --color-gray-200: #e5e7eb;
    --color-gray-300: #d1d5db;
    --color-gray-400: #9ca3af;
    --color-gray-500: #6b7280;
    --color-gray-600: #4b5563;
    --color-gray-700: #374151;
    --color-gray-800: #1f2937;
    --color-gray-900: #111827;

    /* Espacements */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;

    /* Bordures */
    --border-radius-sm: 0.375rem;
    --border-radius-md: 0.5rem;
    --border-radius-lg: 0.75rem;
    --border-radius-xl: 1rem;
    --border-radius-2xl: 1.5rem;
    --border-radius-full: 9999px;

    /* Ombres */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Styles de base */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--color-gray-800);
    background: linear-gradient(135deg, var(--color-purple-50), var(--color-indigo-50));
    min-height: 100vh;
}

/* Typographie */
.text-gradient {
    background: linear-gradient(135deg, var(--color-purple-600), var(--color-indigo-600));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Boutons principaux */
.btn-primary {
    background: linear-gradient(135deg, var(--color-purple-600), var(--color-indigo-600));
    color: white;
    border: none;
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--border-radius-lg);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-normal);
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, var(--color-purple-700), var(--color-indigo-700));
}

.btn-primary:focus-visible {
    outline: 2px solid var(--color-purple-500);
    outline-offset: 2px;
}

/* Cartes */
.card {
    background: white;
    border-radius: var(--border-radius-2xl);
    box-shadow: var(--shadow-md);
    padding: var(--space-lg);
    transition: var(--transition-normal);
    border: 2px solid transparent;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--color-purple-200);
}

/* Champs de formulaire */
.form-input {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    border: 2px solid var(--color-gray-200);
    border-radius: var(--border-radius-lg);
    font-size: 1rem;
    transition: var(--transition-fast);
    background: white;
}

.form-input:focus {
    outline: none;
    border-color: var(--color-purple-500);
    box-shadow: 0 0 0 3px rgba(147, 51, 234, 0.1);
}

/* Navigation */
.nav-link {
    color: var(--color-gray-600);
    text-decoration: none;
    font-weight: 500;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--border-radius-md);
    transition: var(--transition-fast);
}

.nav-link:hover {
    color: var(--color-purple-600);
    background: var(--color-purple-50);
}

.nav-link.active {
    color: var(--color-purple-700);
    background: var(--color-purple-100);
}

/* Badges */
.badge {
    display: inline-block;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--border-radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-purple {
    background: var(--color-purple-100);
    color: var(--color-purple-700);
}

.badge-indigo {
    background: var(--color-indigo-100);
    color: var(--color-indigo-700);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

@keyframes slideIn {
    from {
        transform: translateX(-100%);
    }

    to {
        transform: translateX(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.animate-fade-in {
    animation: fadeIn 0.6s ease-out;
}

.animate-slide-in {
    animation: slideIn 0.4s ease-out;
}

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* Utilitaires */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.hidden {
    display: none;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .card {
        padding: var(--space-md);
    }

    .btn-primary {
        padding: var(--space-md) var(--space-lg);
        font-size: 0.875rem;
    }
}

/* Focus visible pour accessibilité */
.focus-visible:focus {
    outline: 2px solid var(--color-purple-500);
    outline-offset: 2px;
}

/* --- NOUVEAU : Animations Spirituelles & Dynamiques --- */

/* 1. Background Animé (Aurore Boréale / Énergie) */
@keyframes gradient-flow {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.spiritual-bg-animated {
    background: linear-gradient(-45deg, var(--color-purple-50), var(--color-indigo-50), var(--color-purple-100), #fff0f5);
    background-size: 400% 400%;
    animation: gradient-flow 15s ease infinite;
    position: relative;
    overflow-x: hidden;
    /* Évite le scroll horizontal si des éléments débordent */
}

/* Ajout d'une texture subtile (étoiles/particules) via pseudo-élément */
.spiritual-bg-animated::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(white, rgba(255, 255, 255, .2) 2px, transparent 3px),
        radial-gradient(white, rgba(255, 255, 255, .15) 1px, transparent 2px),
        radial-gradient(white, rgba(255, 255, 255, .1) 2px, transparent 3px);
    background-size: 550px 550px, 350px 350px, 250px 250px;
    background-position: 0 0, 40px 60px, 130px 270px;
    opacity: 0.3;
    z-index: -1;
    pointer-events: none;
    animation: stars-move 100s linear infinite;
}

@keyframes stars-move {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-550px);
    }
}

/* 2. Cartes Flottantes avec Mouvements Variés */
@keyframes float-gentle {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-8px) rotate(1deg);
    }
}

@keyframes float-sway {
    0%, 100% {
        transform: translateY(0px) translateX(0px) rotate(0deg);
    }
    25% {
        transform: translateY(-6px) translateX(4px) rotate(-1deg);
    }
    75% {
        transform: translateY(-6px) translateX(-4px) rotate(1deg);
    }
}

@keyframes float-tilt {
    0%, 100% {
        transform: translateY(0px) rotateY(0deg) rotateX(0deg);
    }
    50% {
        transform: translateY(-10px) rotateY(2deg) rotateX(2deg);
    }
}

@keyframes float-pulse {
    0%, 100% {
        transform: translateY(0px) scale(1);
    }
    50% {
        transform: translateY(-7px) scale(1.02);
    }
}

.card-float {
    animation: float-gentle 6s ease-in-out infinite;
    will-change: transform;
    transform-style: preserve-3d;
}

/* Variations d'animations pour éviter l'effet répétitif */
.card-float:nth-child(4n+1) {
    animation: float-gentle 7s ease-in-out infinite;
    animation-delay: 0s;
}

.card-float:nth-child(4n+2) {
    animation: float-sway 8s ease-in-out infinite;
    animation-delay: 0.5s;
}

.card-float:nth-child(4n+3) {
    animation: float-tilt 6.5s ease-in-out infinite;
    animation-delay: 1s;
}

.card-float:nth-child(4n) {
    animation: float-pulse 7.5s ease-in-out infinite;
    animation-delay: 1.5s;
}

.card-float:nth-child(5n) {
    animation-delay: 2s;
}

.card-float:nth-child(7n) {
    animation-delay: 0.3s;
}

.card-float:nth-child(11n) {
    animation-delay: 1.2s;
}

/* 3. Effet de Survol Amélioré avec effets variés */
.card-hover-glow {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
}

.card-hover-glow:hover {
    transform: translateY(-12px) scale(1.03);
    box-shadow: 0 20px 40px -10px rgba(147, 51, 234, 0.4), 
                0 0 0 2px rgba(147, 51, 234, 0.2);
    border-color: var(--color-purple-300);
    z-index: 10;
}

/* Variations de survol pour éviter la monotonie */
.card-hover-glow:nth-child(3n+1):hover {
    transform: translateY(-12px) scale(1.03) rotate(1deg);
}

.card-hover-glow:nth-child(3n+2):hover {
    transform: translateY(-14px) scale(1.04) rotate(-1deg);
}

.card-hover-glow:nth-child(3n):hover {
    transform: translateY(-10px) scale(1.02) rotateY(3deg);
}

/* Style pour les cartes cliquables entières */
.card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.card-link:hover .btn-primary {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(147, 51, 234, 0.4);
}

/* 4. Icônes Animées */
.icon-pulse {
    display: inline-block;
    transition: transform 0.3s ease;
}

.card:hover .icon-pulse {
    animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

/* 5. Effet Étoile Filante (Shooting Star) */
@keyframes shooting-star {
    0% {
        transform: translateX(0) translateY(0) rotate(315deg) scale(0);
        opacity: 0;
    }

    10% {
        transform: translateX(-20px) translateY(20px) rotate(315deg) scale(1);
        opacity: 1;
    }

    100% {
        transform: translateX(-300px) translateY(300px) rotate(315deg) scale(0);
        opacity: 0;
    }
}

.shooting-star {
    position: fixed;
    top: 0;
    right: 0;
    width: 4px;
    height: 4px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.1), 0 0 0 8px rgba(255, 255, 255, 0.1), 0 0 20px rgba(255, 255, 255, 1);
    animation: shooting-star 3s linear infinite;
    z-index: -1;
    opacity: 0;
}

.shooting-star::before {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 300px;
    height: 1px;
    background: linear-gradient(90deg, white, transparent);
}

.shooting-star:nth-child(1) {
    top: 0%;
    right: 20%;
    animation-delay: 0s;
    animation-duration: 3s;
}

.shooting-star:nth-child(2) {
    top: 0%;
    right: 40%;
    animation-delay: 2s;
    animation-duration: 4s;
}

.shooting-star:nth-child(3) {
    top: 0%;
    right: 60%;
    animation-delay: 4s;
    animation-duration: 3.5s;
}