/* Variables */
:root {
    --primary-color: #0b008f;
    --primary-light: #3a35c2;
    --primary-dark: #07005a;
    --secondary-color: #ffffff;
    --accent-color: #f8f9fa;
    --highlight-color: #ffcc00;
    --text-color: #333;
    --border-color: #ddd;
    --card-padding: 1.5rem;
    --border-radius: 8px;
    --transition-speed: 0.3s;
    --gap-size: 1.5rem;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    width: 100%;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Roboto', 'Arial', sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
    position: relative;
    background-image: url('../img/background/HBCA.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    z-index: -1;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Montserrat', 'Arial', sans-serif;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

h2 {
    font-size: 2.2rem;
    position: relative;
    padding-bottom: 0.8rem;
    margin-bottom: 1.5rem;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

h3 {
    font-size: 1.8rem;
    margin-bottom: 1.2rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-speed);
}

a:hover {
    color: var(--primary-light);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-speed);
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: 2px solid var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-light);
    border-color: var(--primary-light);
    color: white;
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

/* Header styles */
header {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    padding: 2rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    text-align: center;
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background: radial-gradient(circle, var(--primary-light) 0%, var(--primary-color) 70%);
    z-index: -1;
}

.header-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.header-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
}

.header-text {
    font-size: 2.5rem;
    font-weight: bold;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 2px;
}

.header-logo {
    height: 5.5rem;
    width: auto;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s ease;
}

.header-logo:hover {
    transform: scale(1.05);
}

/* Navigation styles */
nav {
    background-color: var(--accent-color);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

nav ul {
    list-style-type: none;
    padding: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin: 0;
}

nav ul li {
    margin: 0;
}

nav ul li a {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 600;
    padding: 1rem 1.5rem;
    display: block;
    transition: all 0.3s ease;
    position: relative;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background-color: var(--primary-color);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

nav ul li a:hover::after,
nav ul li a.active::after {
    width: 80%;
}

nav ul li a:hover,
nav ul li a.active {
    color: var(--primary-color);
    background-color: rgba(11, 0, 143, 0.1);
}

nav ul li a i {
    margin-right: 6px;
}

/* Main content styles */
main {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    flex: 1;
}

/* Styles pour la bannière statique */
.banner-container {
    position: relative;
    margin-bottom: 2rem;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.banner {
    position: relative;
    width: 100%;
    height: 500px;
}

.banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-content {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    padding: 2rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
}

.banner-content h2 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.banner-content p {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

/* Home sections */
.home-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.home-section {
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.home-section:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.section-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.section-content h3 {
    text-align: center;
    margin-bottom: 1.2rem;
}

.boutique-link {
    text-align: center;
    margin-top: 1.5rem;
}

/* Upcoming events */
.upcoming-events {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.event-card {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.event-image {
    height: 180px;
    overflow: hidden;
}

.event-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.event-card:hover .event-image img {
    transform: scale(1.1);
}

.event-info {
    padding: 1.5rem;
}

.event-info h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.event-info p {
    color: #666;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

.event-info p i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

.more-events-link {
    grid-column: 1 / -1;
    text-align: center;
    margin-top: 1.5rem;
}

/* Training locations */
.training-locations {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    margin-top: 1.5rem;
}

.locations-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.location-item {
    padding: 1rem;
    border-radius: var(--border-radius);
    background-color: rgba(255, 255, 255, 0.8);
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.location-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.location-item i {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.location-item h4 {
    margin-bottom: 0.5rem;
}

.location-item p {
    color: #666;
}

.map-container {
    height: 100%;
    min-height: 300px;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* Card styles */
.card {
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: var(--card-padding);
    margin-bottom: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: var(--shadow-hover);
}

/* Footer styles */
footer {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    padding: 3rem 0 0;
    margin-top: 3rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-logo-img {
    height: 80px;
    margin-bottom: 1rem;
}

.footer-links h4,
.footer-social h4,
.footer-contact h4 {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.footer-links ul {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: white;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    color: white;
    border-radius: 50px;
    transition: transform 0.3s ease;
    /* Pour PC : taille fixe ou adaptée au contenu */
    width: auto;
    /* ou une valeur fixe comme 200px */
}

.social-link:hover {
    transform: translateY(-3px);
}

.instagram {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

.facebook {
    background-color: #1877f2;
}

.tiktok {
    background-color: #000;
}

.footer-contact p {
    display: flex;
    align-items: center;
    margin-bottom: 0.8rem;
}

.footer-contact p i {
    margin-right: 0.8rem;
    width: 20px;
}

.footer-contact a {
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.3s ease;
}

.footer-contact a:hover {
    color: white;
}

.footer-bottom {
    margin-top: 3rem;
    padding: 1rem 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    margin: 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.9);
}

.footer-bottom a:hover {
    color: white;
}

/* Equipes page styles */
.team-section {
    margin-bottom: 3rem;
}

.teams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.team-card {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.team-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.team-image {
    height: 200px;
    overflow: hidden;
}

.team-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.team-card:hover .team-image img {
    transform: scale(1.1);
}

.team-info {
    padding: 1.5rem;
    background-color: white;
}

.team-info h4 {
    margin-bottom: 0.8rem;
    color: var(--primary-color);
}

.team-info p {
    margin-bottom: 0.5rem;
    color: #666;
}

.team-info .training-times {
    display: flex;
    align-items: center;
    margin-top: 1rem;
}

.team-info .training-times i {
    color: var(--primary-color);
    margin-right: 0.5rem;
}

.training-schedule {
    width: 100%;
    margin-top: 2rem;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.training-schedule-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
}

/* Direction page styles */
.direction-section {
    margin-bottom: 3rem;
}

.members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
}

.member-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.member-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.member-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 1rem;
}

.member-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.member-info h4 {
    margin-bottom: 0.5rem;
    text-align: center;
    color: var(--primary-color);
}

.member-info p {
    text-align: center;
    color: #666;
}

/* Contact page styles */
.contact-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    color: white;
    font-size: 1.2rem;
}

.contact-details h4 {
    margin-bottom: 0.5rem;
}

.contact-details p {
    color: #666;
}

.contact-details a {
    color: var(--primary-color);
    transition: color 0.3s ease;
}

.contact-details a:hover {
    color: var(--primary-light);
}

.contact-form {
    padding: 2rem;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    outline: none;
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

/* Social media section */
.social-media-section {
    margin-bottom: 2rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.social-link {
    display: flex;
    align-items: center;
    padding: 1rem 2rem;
    border-radius: 50px;
    color: white;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.social-link i {
    font-size: 1.5rem;
    margin-right: 0.8rem;
}

.social-link:hover {
    transform: translateY(-5px);
    color: white;
}

/* Animations supplémentaires - à inclure dans style.css */

/* Animation pour la timeline */
.timeline-item {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.timeline-item:nth-child(even) {
    transform: translateX(50px);
}

.timeline-item.animate {
    opacity: 1;
    transform: translateX(0);
}

/* Animation du survol des cartes */
.card,
.member-card,
.team-card,
.event-item,
.special-team {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover,
.member-card:hover,
.team-card:hover,
.event-item:hover,
.special-team:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

/* Style amélioré pour le formulaire de contact */
.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(11, 0, 143, 0.2);
    outline: none;
}

/* Animation des headings */
h2,
h3 {
    position: relative;
    overflow: hidden;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background-color: var(--primary-color);
    transition: width 0.5s ease;
}

h2.animate::after {
    width: 80px;
}

/* Animation des boutons */
.btn {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    z-index: -1;
}

.btn:hover::before {
    left: 0;
}

/* Effet de survol des liens sociaux */
.social-link {
    transform: perspective(1px) translateZ(0);
    box-shadow: 0 0 1px rgba(0, 0, 0, 0);
    position: relative;
    transition-property: color;
    transition-duration: 0.3s;
}

.social-link:before {
    content: "";
    position: absolute;
    z-index: -1;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.2);
    transform: scaleX(0);
    transform-origin: 0 50%;
    transition-property: transform;
    transition-duration: 0.3s;
    transition-timing-function: ease-out;
}

.social-link:hover:before {
    transform: scaleX(1);
}

/* Animation de chargement de page */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--primary-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.loaded {
    opacity: 0;
    visibility: hidden;
}

.loader {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Animation des entrées de la timeline */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.timeline-content {
    animation: fadeInUp 0.5s ease forwards;
    animation-delay: 0.2s;
    opacity: 0;
}

/* Style amélioré pour la navigation */
nav ul li a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease, left 0.3s ease;
}

nav ul li a:hover::before,
nav ul li a.active::before {
    width: 80%;
    left: 10%;
}

/* Responsive styles */
@media (max-width: 1024px) {
    .training-locations {
        grid-template-columns: 1fr;
    }

    .map-container {
        height: 400px;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
    }

    .header-text {
        font-size: 2rem;
    }

    main {
        padding: 1.5rem;
    }

    .slider {
        height: 400px;
    }

    .slide-content h2 {
        font-size: 2rem;
    }

    .home-sections {
        grid-template-columns: 1fr;
    }

    .upcoming-events {
        grid-template-columns: 1fr;
    }

    .contact-section {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    h2 {
        font-size: 1.8rem;
    }

    h3 {
        font-size: 1.5rem;
    }

    .slider {
        height: 300px;
    }

    .slide-content {
        padding: 1.5rem;
    }

    .slide-content h2 {
        font-size: 1.5rem;
    }

    .slide-content p {
        font-size: 1rem;
    }

    .slider-controls button {
        width: 40px;
        height: 40px;
    }

    nav ul li a {
        padding: 0.8rem 1rem;
    }

    .social-links {
        flex-direction: column;
    }

    .map-container {
        height: 300px;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .footer-logo-img {
        height: 60px;
    }
}

/* Média queries pour les petits écrans */
@media (max-width: 480px) {
    .social-links {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
        margin: 0;
        box-sizing: border-box;
    }

    .social-link {
        width: 100%;
        margin: 0;
        display: flex;
        justify-content: center;
        padding: 1rem;
        text-align: center;
    }
}

/* Responsive styles */
@media (max-width: 768px) {
    .banner {
        height: 400px;
    }
    
    .banner-content h2 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .banner {
        height: 300px;
    }
    
    .banner-content {
        padding: 1.5rem;
    }
    
    .banner-content h2 {
        font-size: 1.5rem;
    }
    
    .banner-content p {
        font-size: 1rem;
    }
}