:root {
    /* Modern color palette based on original colors */
    --primary-blue: #4f81bd;
    --primary-brown: #5a3a22;
    --primary-orange: #d5622b;
    --primary-red: #c0504d;
    --primary-green: #7b9b37;
    --background: #f8f9fa;
    --text-color: #333;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

body {
    width: 100%;
    margin: 0 auto;
    font-family: 'Roboto', 'Open Sans', sans-serif;
    font-size: 14px;
    color: var(--text-color);
    line-height: 1.6;
    padding: 0 10px;
    box-sizing: border-box;
}

.container {
    width: 100%;
    min-height: fit-content;
    margin: 0 auto;
    text-align: left;
    background-color: transparent;
    overflow: hidden;
}

.site-logo {
    width: 100%;
    height: fit-content;
    padding: 0;
    text-align: center;
}

.site-logo img {
    max-width: 100%;
    height: auto;
}

/* Fixed layout for category sections - ensure they're in one row */
.category-container {
    width: 100%;
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 20px;
    padding: 0;
    box-sizing: border-box;
}

/* Base styles for all category sections */
.category-item {
    flex: 0 0 160px;
    transition: var(--transition);
    overflow: hidden;
    background-color: transparent;
    height: auto;
    margin-bottom: 20px;
}

/* Section headers */
.category-header {
    list-style-type: none;
    margin: 0;
    padding: 0;
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    display: flex;
    justify-content: center;
    align-items: center;
}

.category-header li {
    width: 100%;
    margin: 0;
    text-align: center;
}

.category-header li a {
    display: block;
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
}

/* Section content */
.category-item p {
    text-align: center;
    margin: 5px 0;
    padding: 0;
    line-height: 1.2;
}

/* Container for the image to maintain aspect ratio */
.category-item p:has(.category-image) {
    margin: 0;
    padding: 0;
    width: 100%;
}

.category-item a {
    text-decoration: none;
    transition: var(--transition);
}

.category-item p a {
    font-size: 14px;
    display: block;
    padding: 5px 0;
}

/* Make images square with 1:1 ratio */
.category-image {
    width: 100%;
    height: 160px; /* Fixed height to match width */
    object-fit: cover;
    transition: var(--transition);
}

/* Ensure the container doesn't add extra space */
.category-item p:nth-of-type(3) {
    margin: 0;
    padding: 0;
    line-height: 0;
}

.category-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;    height: 100%;
    object-fit: cover;
}

/* Center the buttons properly */
.social-button-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 15px 0;
}

/* Color schemes for each section */
.category-sport .category-header { background-color: var(--primary-blue); }
.category-sport a { color: var(--primary-blue); }

.category-seminaire .category-header { background-color: var(--primary-brown); }
.category-seminaire a { color: var(--primary-brown); }

.category-restauration .category-header { background-color: var(--primary-orange); }
.category-restauration a { color: var(--primary-orange); }

.category-hebergement .category-header { background-color: var(--primary-red); }
.category-hebergement a { color: var(--primary-red); }

.category-environnement .category-header { background-color: var(--primary-green); }
.category-environnement a { color: var(--primary-green); }

.category-club .category-header { background-color: var(--primary-blue); }
.category-club a { color: var(--primary-blue); }

/* Modern buttons */
.button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    margin: 0 auto;
    width: 140px;
    height: 42px;
}

.white-text {
    color: white;
}

/* Button colors */
.button.facebook { background-color: var(--primary-blue); }
.button.twitter { background-color: var(--primary-brown); }
.button.instagram { background-color: var(--primary-orange); }
.button.actualites { background-color: var(--primary-red); }
.button.flash { background-color: var(--primary-green); }
.button.evenements { background-color: var(--primary-blue); }

/* Contact button */
.contact-section {
    text-align: center;
    margin: 40px 0;
}

.big-button.contact {
    display: inline-block;
    padding: 15px 40px;
    font-size: 14px;
    background-color: var(--primary-blue);
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: var(--transition);
    box-shadow: var(--shadow);
}

/* Social media section */
.mobile-social-buttons {
    display: none;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin: 30px 0;
}

/* Responsive design */
@media screen and (max-width: 1024px) {
    .category-container {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .category-item {
        flex: 0 0 calc(33.333% - 20px);
        margin-bottom: 20px;
    }
}

@media screen and (max-width: 768px) {
    .category-item {
        flex: 0 0 calc(50% - 15px);
    }
    
    .social-button-container {
        display: none;
    }
    
    .mobile-social-buttons {
        display: flex;
    }
}

@media screen and (max-width: 480px) {
    .category-item {
        flex: 0 0 100%;
    }
    
    .button {
        width: 100%;
    }
    
    /* Ensure images look good on small screens */
    .category-image {
        height: 200px; /* Slightly larger on mobile for better visibility */
    }
    
    /* Improve spacing on mobile */
    .category-container {
        gap: 20px;
        padding: 10px;
    }
    
    /* Make buttons more tappable on mobile */
    .button {
        padding: 12px 20px;
        font-size: 14px;
        height: 48px;
    }
    
    /* Improve contact button on mobile */
    .big-button.contact {
        width: 80%;
        padding: 15px 20px;
    }
}

/* Ensure all images load properly */
img {
    max-width: 100%;
    height: auto;
}

/* Fix for iOS Safari */
@supports (-webkit-touch-callout: none) {
    .category-image {
        height: 160px !important; /* Force height on iOS */
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

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

    50% {
        transform: scale(1.05);
    }

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

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

.fade-in {
    opacity: 0;
    animation: fadeInUp 0.5s ease forwards;
}

/* Add staggered delays to elements */
.stagger-delay > * {
    opacity: 0;
}

.stagger-delay > *:nth-child(1) {
    animation: fadeInUp 0.5s ease 0.1s forwards;
}

.stagger-delay > *:nth-child(2) {
    animation: fadeInUp 0.5s ease 0.2s forwards;
}

.stagger-delay > *:nth-child(3) {
    animation: fadeInUp 0.5s ease 0.3s forwards;
}

.stagger-delay > *:nth-child(4) {
    animation: fadeInUp 0.5s ease 0.4s forwards;
}

.stagger-delay > *:nth-child(5) {
    animation: fadeInUp 0.5s ease 0.5s forwards;
}

.stagger-delay > *:nth-child(6) {
    animation: fadeInUp 0.5s ease 0.6s forwards;
}

.footer-space {
    width: 100%;
    height: 20px;
}