* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --violet: #6B2D8F;
    --jaune: #FFD700;
    --rouge: #DC143C;
    --violet-clair: #8E44AD;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--violet) 0%, var(--violet-clair) 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

nav {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.menu {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    gap: 3rem;
    list-style: none;
    padding: 0 2rem;
}

.menu a {
    text-decoration: none;
    color: var(--violet);
    font-weight: 600;
    font-size: 1.1rem;
    transition: color 0.3s;
    position: relative;
    padding: 0.5rem 1rem;
}

.menu a:hover,
.menu a.active {
    color: var(--rouge);
}

.menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--jaune);
    transition: width 0.3s;
}

.menu a:hover::after,
.menu a.active::after {
    width: 100%;
}

/* CONTENU PRINCIPAL */
.main-content {
    flex: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 2rem;
    width: 100%;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* GRILLE DES CARTES */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
    width: 100%;
}

.page-header {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 3rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.page-header h1 {
    color: var(--violet);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.page-header p {
    color: #666;
    font-size: 1.2rem;
    line-height: 1.6;
}

/* ✅ CARTES - LES DEUX CORRECTIONS COMBINÉES */
.category-box {
    position: relative;
    height: auto;                      /* ✅ CONTENU : s'adapte complètement */
    min-height: 380px;
    border-radius: 20px;
    overflow: hidden;                  /* ✅ IMAGE : garde l'image dedans */
    cursor: pointer;
    transition: all 0.4s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    display: block;
}

.category-box:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.category-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(107, 45, 143, 0.8) 0%, rgba(142, 68, 173, 0.8) 100%);
    transition: opacity 0.4s;
    z-index: 1;
    border-radius: 20px;
}

.category-box:hover::before {
    opacity: 0.6;
}

.category-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.4s ease;
    border-radius: 20px;
    z-index: 0;                       /* ✅ Sous le contenu */
}

.category-box:hover .category-bg {
    transform: scale(1.05);            /* ✅ Zoom discret, reste dans la box */
}

.m14 .category-bg {
    background-image: url('../image/logoevv.png');
}

.m16 .category-bg {
    background-image: url('../image/logoevv.png');
}

.m19 .category-bg {
    background-image: url('../image/logoevv.png');
}

.seniors .category-bg {
    background-image: url('../image/logoevv.png');
}

/* ✅ CONTENU - TOUT VISIBLE */
.category-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 3rem 2rem;
    color: white;
    overflow: visible;                 /* ✅ Jamais de coupure de texte */
    width: 100%;
    min-height: 100%;
    flex-shrink: 0;
}

.rugby-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    flex-shrink: 0;
}

.category-title {
    font-size: clamp(1.8rem, 6vw, 3rem);
    font-weight: bold;
    margin-bottom: 0.8rem;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.8);
    color: var(--jaune);
    line-height: 1.2;
    hyphens: auto;
    word-break: break-word;
    flex-shrink: 0;
}

.category-subtitle {
    font-size: clamp(1rem, 3.5vw, 1.6rem);
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    line-height: 1.3;
    hyphens: auto;
    word-break: break-word;
    flex-shrink: 0;
}

.category-description {
    font-size: clamp(1rem, 3vw, 1.2rem);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    max-width: 90%;
    line-height: 1.5;
    hyphens: auto;
    word-break: break-word;
}

.contact-badge {
    display: inline-block;
    margin-top: 1.5rem;
    padding: 0.8rem 2rem;
    background: var(--jaune);
    color: var(--violet);
    border-radius: 50px;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}

.category-box:hover .contact-badge {
    background: var(--rouge);
    color: white;
    transform: scale(1.1);
}

/* FOOTER */
footer {
    background: #000;
    color: white;
    padding: 3rem 2rem 1.5rem 2rem;
    width: 100%;
    flex-shrink: 0;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: var(--jaune);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.footer-section p {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.footer-section a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--jaune);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #333;
    font-size: 0.9rem;
}

/* RESPONSIVE */
@media (max-width: 968px) {
    .categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
    
    .category-box {
        min-height: 340px;
    }
}

@media (max-width: 768px) {
    .menu {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .main-content {
        padding: 2rem 1rem;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .category-content {
        padding: 2.5rem 1.5rem;
    }
    
    .rugby-icon {
        font-size: 3rem;
    }
}
