/* Styles personnalisés pour ProGestion Sport */

/* Styles pour les liens et boutons */
/* Les liens textuels ont le soulignement */
a:not(.btn):not(.button):not([class*="bg-"]):not([class*="rounded"]) {
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
}

/* Les boutons n'ont pas de soulignement */
.btn,
.button,
[class*="bg-blue"],
[class*="bg-gray"],
[class*="bg-white"],
a[class*="bg-"],
a[class*="rounded"],
a[class*="px-"],
a[class*="py-"] {
    text-decoration: none !important;
}

/* Liens de navigation spécifiques */
nav a,
#primary-navigation a,
.hidden.md\\:flex a {
    text-decoration: none;
    position: relative;
    transition: color 0.3s ease;
    margin-right: 2rem;
}

nav a:last-child,
#primary-navigation a:last-child,
.hidden.md\\:flex a:last-child {
    margin-right: 0;
}

/* Soulignement au survol */
nav a:hover,
#primary-navigation a:hover,
.hidden.md\\:flex a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
}

/* Page active */
nav a.active,
nav a[aria-current="page"],
#primary-navigation a.active,
#primary-navigation a[aria-current="page"],
.hidden.md\\:flex a.active,
.hidden.md\\:flex a[aria-current="page"] {
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
    font-weight: 600;
}

/* Espacement spécifique pour la navigation desktop */
.hidden.md\\:flex {
    display: flex;
    align-items: center;
}

.hidden.md\\:flex a {
    display: inline-block;
    padding: 0.5rem 0;
}

/* Correction pour les menus WordPress */
.flex.items-center.space-x-8 a {
    margin-right: 0;
    padding: 0.5rem 0;
    display: inline-block;
}

.flex.flex-col.space-y-3 a {
    margin-right: 0;
    padding: 0.5rem 0;
    display: block;
}

/* Espacement spécifique pour les liens de navigation */
nav a,
#primary-navigation a {
    margin-right: 1rem;
    display: inline-block;
}

nav a:last-child,
#primary-navigation a:last-child {
    margin-right: 0;
}

/* Correction pour les menus WordPress avec espacement */
.wp_nav_menu a {
    margin-right: 1rem;
    display: inline-block;
}

.wp_nav_menu a:last-child {
    margin-right: 0;
}

/* Boutons explicites sans soulignement */
.btn-gradient,
.bg-blue-600,
.bg-blue-700 {
    text-decoration: none !important;
}

/* Styles pour le logo WordPress personnalisé */
.custom-logo-link {
    text-decoration: none !important;
    display: flex;
    align-items: center;
}

.custom-logo {
    max-height: 40px;
    width: auto;
    height: auto;
}

/* Classe pour éviter le soulignement sur le logo par défaut */
.no-underline {
    text-decoration: none !important;
}

/* Styles pour le menu mobile */
#primary-menu-toggle {
    transition: transform 0.3s ease;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.375rem;
}

#primary-menu-toggle:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

#primary-menu-toggle svg {
    transition: transform 0.3s ease;
}

#primary-menu-toggle.rotate-90 svg {
    transform: rotate(90deg);
}

#primary-navigation {
    transition: all 0.3s ease;
    transform-origin: top;
}

#primary-navigation:not(.hidden) {
    animation: slideDown 0.3s ease-out;
}



@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Amélioration de l'affichage mobile */
@media (max-width: 768px) {
    #primary-navigation {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        border-top: 1px solid #e5e7eb;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
        z-index: 9999;
        max-height: 80vh;
        overflow-y: auto;
    }
    
    #primary-navigation.hidden {
        display: none !important;
    }
    
    #primary-navigation:not(.hidden) {
        display: block !important;
    }
    
    #primary-navigation nav {
        padding: 1rem;
    }
    
    #primary-navigation a {
        display: block;
        padding: 0.75rem 0;
        border-bottom: 1px solid #f3f4f6;
        transition: all 0.2s ease;
    }
    
    #primary-navigation a:last-child {
        border-bottom: none;
    }
    
    #primary-navigation a:hover {
        background-color: #f9fafb;
        padding-left: 0.5rem;
    }
}

/* Transitions de page */
.page-transition {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.page-transition.loaded {
    opacity: 1;
    transform: translateY(0);
}

/* Animation d'entrée pour les éléments */
.fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

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

/* Animation d'entrée décalée pour les éléments */
.fade-in-delayed {
    animation: fadeIn 0.8s ease-out 0.2s forwards;
    opacity: 0;
}

.fade-in-delayed-2 {
    animation: fadeIn 0.8s ease-out 0.4s forwards;
    opacity: 0;
}

/* Loading spinner */
.page-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.page-loading.active {
    opacity: 1;
    visibility: visible;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e5e7eb;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Section Hero 100vh */
.hero-section {
    min-height: calc(100vh - 80px); /* Soustrait approximativement la hauteur du header */
    min-height: calc(100dvh - 80px); /* Pour les navigateurs modernes */
    padding-top: 2rem;
    padding-bottom: 2rem;
}

/* Ajustement pour mobile avec barres d'adresse */
@supports (height: 100dvh) {
    .hero-section {
        min-height: calc(100dvh - 80px);
    }
}

/* Alternative : Section Hero en vraie 100vh (sans header) */
.hero-section-fullscreen {
    min-height: 100vh;
    min-height: 100dvh;
    padding-top: 2rem;
    padding-bottom: 2rem;
}

/* Variables CSS pour hauteur dynamique */
:root {
    --header-height: 80px;
}

/* Version avec variable CSS pour plus de flexibilité */
.hero-section-dynamic {
    min-height: calc(100vh - var(--header-height));
    min-height: calc(100dvh - var(--header-height));
    padding-top: 2rem;
    padding-bottom: 2rem;
}

/* Ajustements responsive pour la section hero */
@media (max-width: 1023px) {
    .hero-section {
        padding-top: 1.5rem;
        padding-bottom: 1.5rem;
    }
    
    .hero-section .grid {
        gap: 2rem;
    }
}

@media (max-width: 640px) {
    .hero-section {
        padding-top: 1rem;
        padding-bottom: 1rem;
    }
}

/* Animation pour le graphique */
.chart-bar {
    animation: growUp 0.8s ease-out;
}

@keyframes growUp {
    from {
        height: 0;
    }
    to {
        height: var(--bar-height);
    }
}

/* Amélioration des ombres pour un look plus moderne */
.card-shadow {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.3s ease;
}

.card-shadow:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Gradient pour le bouton principal */
.btn-gradient {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transition: all 0.3s ease;
}

.btn-gradient:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    transform: translateY(-1px);
}

/* Amélioration du calendrier */
.calendar-item {
    transition: all 0.3s ease;
}

.calendar-item:hover {
    transform: translateX(4px);
}

/* Responsive amélioré pour les très petits écrans */
@media (max-width: 480px) {
    .hero-title {
        font-size: 2.25rem;
        line-height: 1.2;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Animation pour les cartes de fonctionnalités */
.feature-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 20px -4px rgba(0, 0, 0, 0.1);
}

/* Icônes avec effet de survol */
.feature-icon {
    transition: all 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1);
    background-color: #3b82f6;
    color: white;
}